| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
- <title>游戏下载页面</title>
- <!-- 引入jQuery -->
- <script type="text/javascript" src="__STATIC__/js/jquery_v3.3.1.js"></script>
- <style>
- html, body {
- margin: 0;
- padding: 0;
- height: 100%;
- overflow-x: hidden;
- overflow-y: auto;
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
- background: linear-gradient(45deg, #f0f2f5, #e8ecef);
- }
- /* 背景图片容器 */
- .bg-image-container {
- position: fixed;
- top: 0;
- left: 0;
- width: 100vw;
- height: 100vh;
- z-index: 1;
- overflow: hidden;
- }
- .bg-image {
- width: 100%;
- height: 100%;
- object-fit: cover;
- object-position: center;
- opacity: 1;
- }
- .bg-text-container {
- position: fixed;
- top: -100%;
- left: -100%;
- width: 300vw;
- height: 300vh;
- transform: rotate(-30deg);
- pointer-events: none;
- z-index: 2;
- display: flex;
- flex-wrap: wrap;
- font-family: sans-serif;
- opacity: 1;
- }
- .bg-text {
- width: 200px;
- height: 80px;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 24px;
- white-space: nowrap;
- color: #000;
- transition: transform 0.3s ease;
- }
- /* 主内容容器 */
- .main-content {
- position: relative;
- z-index: 10;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- min-height: 100vh;
- width: 100vw;
- text-align: center;
- padding: 20px;
- box-sizing: border-box;
- background: rgba(255, 255, 255, 0.1);
- /*backdrop-filter: blur(10px);*/
- }
- /* 游戏Logo样式 */
- .game-logo {
- width: 120px;
- height: 120px;
- border-radius: 50%;
- object-fit: cover;
- /*margin-bottom: 20px;*/
- box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
- border: 4px solid rgba(255, 255, 255, 0.8);
- transition: all 0.3s ease;
- }
- .game-logo:hover {
- transform: scale(1.05);
- box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
- }
- /* 标题区域 */
- .title-section {
- margin-bottom: 40px;
- margin-top: 40px;
- }
- .game-title {
- font-size: 2.5rem;
- font-weight: bold;
- color: #333;
- margin-bottom: 20px;
- text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
- }
- .game-subtitle {
- font-size: 1.2rem;
- color: #666;
- margin-bottom: 30px;
- max-width: 60%;
- margin-left: auto;
- margin-right: auto;
- line-height: 1.6;
- text-align: left;
- background: rgb(190 181 181 / 80%);
- padding: 20px;
- border-radius: 15px;
- backdrop-filter: blur(10px);
- box-shadow: 0 4px 15px rgba(0,0,0,0.1);
- }
- /* UEditor内容样式 */
- .game-subtitle img {
- max-width: 100%;
- height: auto;
- border-radius: 8px;
- margin: 10px 0;
- }
- .game-subtitle p {
- margin: 10px 0;
- text-align: left;
- }
- .game-subtitle ul, .game-subtitle ol {
- text-align: left;
- margin: 10px 0;
- padding-left: 20px;
- }
- .game-subtitle h1, .game-subtitle h2, .game-subtitle h3, .game-subtitle h4, .game-subtitle h5, .game-subtitle h6 {
- margin: 15px 0 10px 0;
- color: #333;
- }
- .game-subtitle table {
- width: 100%;
- border-collapse: collapse;
- margin: 15px 0;
- }
- .game-subtitle table th, .game-subtitle table td {
- border: 1px solid #ddd;
- padding: 8px;
- text-align: left;
- }
- .game-subtitle table th {
- background-color: #f2f2f2;
- }
- /* 下载按钮样式 */
- .download-btn {
- padding: 20px 40px;
- font-size: 20px;
- font-weight: bold;
- color: #fff;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- border: none;
- border-radius: 50px;
- cursor: pointer;
- box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
- transition: all 0.3s ease;
- outline: none;
- min-width: 250px;
- text-align: center;
- position: relative;
- overflow: hidden;
- }
- .download-btn:before {
- content: '';
- position: absolute;
- top: 0;
- left: -100%;
- width: 100%;
- height: 100%;
- background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
- transition: left 0.5s;
- }
- .download-btn:hover:before {
- left: 100%;
- }
- .download-btn:hover {
- transform: translateY(-3px);
- box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
- background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
- }
- .download-btn:active {
- transform: translateY(-1px);
- box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
- }
- /* 功能介绍区域 */
- .features {
- margin-top: 40px;
- margin-bottom: 40px;
- display: flex;
- justify-content: center;
- gap: 30px;
- flex-wrap: wrap;
- }
- .feature-item {
- background: rgba(255, 255, 255, 0.8);
- padding: 20px;
- border-radius: 15px;
- backdrop-filter: blur(10px);
- box-shadow: 0 4px 15px rgba(0,0,0,0.1);
- min-width: 120px;
- text-align: center;
- cursor: pointer;
- transition: all 0.3s ease;
- position: relative;
- overflow: hidden;
- }
- .feature-item:before {
- content: '';
- position: absolute;
- top: 0;
- left: -100%;
- width: 100%;
- height: 100%;
- background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
- transition: left 0.5s;
- }
- .feature-item:hover:before {
- left: 100%;
- }
- .feature-item:hover {
- transform: translateY(-3px);
- box-shadow: 0 8px 20px rgba(0,0,0,0.15);
- background: rgba(102, 126, 234, 0.1);
- }
- .feature-item:active {
- transform: translateY(-1px);
- box-shadow: 0 4px 15px rgba(0,0,0,0.1);
- }
- /* 按钮点击特效 - 已移除所有loading相关样式 */
- .feature-item.clicked {
- pointer-events: none;
- opacity: 0.9;
- background: rgba(102, 126, 234, 0.2);
- }
- /* 所有loading相关的动画和样式已全部移除 */
- /* 加载动画 */
- .loading {
- display: inline-block;
- width: 20px;
- height: 20px;
- border: 3px solid rgba(255,255,255,.3);
- border-radius: 50%;
- border-top-color: #fff;
- animation: spin 1s ease-in-out infinite;
- margin-right: 10px;
- }
- @keyframes spin {
- to { transform: rotate(360deg); }
- }
- /* 弹框样式 */
- .modal {
- display: none;
- position: fixed;
- z-index: 1000;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- background-color: rgba(0, 0, 0, 0.6);
- backdrop-filter: blur(5px);
- }
- .modal-content {
- background-color: #fefefe;
- margin: 15% auto;
- padding: 25px;
- border: none;
- border-radius: 15px;
- width: 80%;
- max-width: 400px;
- text-align: center;
- box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
- animation: modalSlideIn 0.3s ease-out;
- }
- @keyframes modalSlideIn {
- from {
- transform: translateY(-50px);
- opacity: 0;
- }
- to {
- transform: translateY(0);
- opacity: 1;
- }
- }
- .modal-content h3 {
- margin-top: 0;
- color: #333;
- font-size: 1.3rem;
- }
- .modal-content p {
- color: #666;
- margin: 15px 0;
- line-height: 1.5;
- }
- .close-btn {
- background-color: #f44336;
- color: white;
- padding: 12px 25px;
- border: none;
- border-radius: 8px;
- cursor: pointer;
- font-size: 14px;
- transition: background-color 0.3s ease;
- }
- .close-btn:hover {
- background-color: #da190b;
- }
- /* 手机端弹框适配 */
- @media (max-width: 767px) {
- .modal-content {
- margin: 25% auto;
- width: 90%;
- padding: 20px;
- }
- }
- /* 平板适配 */
- @media (min-width: 768px) and (max-width: 1024px) {
- .game-title {
- font-size: 2.2rem;
- }
- .game-subtitle {
- font-size: 1.1rem;
- max-width: 95%;
- padding: 18px;
- }
- .download-btn {
- padding: 18px 35px;
- font-size: 18px;
- min-width: 220px;
- }
- .features {
- gap: 25px;
- }
- }
- /* 手机端适配 */
- @media (max-width: 767px) {
- .main-content {
- padding: 15px;
- }
- .game-title {
- font-size: 1.8rem;
- margin-bottom: 15px;
- }
- .game-subtitle {
- font-size: 0.95rem;
- margin-bottom: 25px;
- max-width: 100%;
- padding: 15px;
- }
- .title-section {
- margin-bottom: 30px;
- margin-top: 20px;
- }
- .download-btn {
- padding: 15px 30px;
- font-size: 16px;
- min-width: 200px;
- }
- .features {
- margin-top: 30px;
- gap: 15px;
- }
- .feature-item {
- padding: 15px;
- min-width: 100px;
- }
- .feature-icon {
- font-size: 1.5rem;
- }
- .feature-text {
- font-size: 0.8rem;
- }
- }
- </style>
- </head>
- <body>
- <!-- 背景图片容器 -->
- <div class="bg-image-container">
- {if condition="$info.bg_image"}
- <img src="{$info.bg_image}" alt="背景图片" class="bg-image">
- {/if}
- </div>
- <div id="bgTextContainer" class="bg-text-container"></div>
- <!-- 主内容区域 -->
- <div class="main-content">
- <div class="title-section">
- {if condition="$info.logo_url"}
- <img src="{$info.logo_url}" alt="游戏Logo" class="game-logo">
- {/if}
- <h1 class="game-title" id="gameTitle">{$info.name}</h1>
- {if condition="$info.remarks"}
- <div class="game-subtitle" id="gameSubtitle" style="white-space: pre-wrap;">{$info.remarks}</div>
- {/if}
- </div>
- <div class="features">
- {if condition="$info.path_url"}
- <div class="feature-item" id="downloadGame" value="{$info.path_url}">
- <div class="feature-icon">🎮</div>
- <div class="feature-text">游戏包 下载</div>
- </div>
- {/if}
- {if condition="$info.material_url"}
- <div class="feature-item" id="downloadMaterial" value="{$info.material_url}">
- <div class="feature-icon">🚀</div>
- <div class="feature-text">物料 下载</div>
- </div>
- {/if}
- </div>
- </div>
- <!-- 弹框 -->
- <div id="errorModal" class="modal">
- <div class="modal-content">
- <h3>提示</h3>
- <p id="modalMessage">下载地址缺失,请联系管理员!</p>
- <button class="close-btn" id="closeModalBtn">确定</button>
- </div>
- </div>
- <script>
- $(document).ready(function() {
- // ========== 背景文字生成 ==========
- function generateBackground() {
- const text = "{$info.name}";
- const container = $('#bgTextContainer');
- container.empty();
- const vw = $(window).width() * 3;
- const vh = $(window).height() * 3;
- const blockWidth = 200;
- const blockHeight = 80;
- const cols = Math.ceil(vw / blockWidth);
- const rows = Math.ceil(vh / blockHeight);
- for (let row = 0; row < rows; row++) {
- const offset = Math.floor(Math.random() * 60) - 30;
- for (let col = 0; col < cols; col++) {
- const div = $('<div class="bg-text"></div>');
- div.text(text);
- const angle = (Math.random() * 10 - 5).toFixed(2);
- div.css('transform', `translateX(${offset}px) rotate(${angle}deg)`);
- container.append(div);
- }
- }
- }
- // ========== 下载功能 ==========
- function handleDownload(downloadUrl) {
- const $btn = $('#downloadBtn');
- const $btnText = $('#btnText');
- $btn.prop('disabled', true);
- $btnText.html('<span class="loading"></span>准备下载...');
- setTimeout(() => {
- if (downloadUrl && downloadUrl.trim() !== '') {
- window.open(downloadUrl, '_blank');
- showSuccessMessage('下载已开始,请查看浏览器下载页面');
- } else {
- showErrorModal('下载地址缺失,请联系管理员!');
- }
- $btn.prop('disabled', false);
- $btnText.text('立即下载');
- }, 1000);
- }
- // ========== 功能项下载功能 ==========
- function handleFeatureDownload($element, downloadUrl, itemName) {
- const $icon = $element.find('.feature-icon');
- const $text = $element.find('.feature-text');
- const originalText = $text.text();
- // 简化的点击效果,移除所有loading相关代码
- $element.addClass('clicked');
- $text.text('正在准备下载...');
- setTimeout(() => {
- if (downloadUrl && downloadUrl.trim() !== '') {
- window.open(downloadUrl, '_blank');
- showSuccessMessage(itemName + '下载已开始,请查看浏览器下载页面');
- } else {
- showErrorModal(itemName + '下载地址缺失,请联系管理员!');
- }
- $element.removeClass('clicked');
- $text.text(originalText);
- }, 1000);
- }
- // ========== 弹框控制 ==========
- function showErrorModal(message) {
- $('#modalMessage').text(message);
- $('#errorModal').fadeIn(300);
- }
- function closeModal() {
- $('#errorModal').fadeOut(300);
- }
- function showSuccessMessage(message) {
- const $successDiv = $('<div style="position:fixed;top:20px;left:50%;transform:translateX(-50%);background:#4CAF50;color:white;padding:10px 20px;border-radius:5px;z-index:9999;">' + message + '</div>');
- $('body').append($successDiv);
- setTimeout(() => {
- $successDiv.fadeOut(300, function() {
- $(this).remove();
- });
- }, 3000);
- }
- // ========== 设备适配检测 ==========
- function isMobile() {
- return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || $(window).width() <= 768;
- }
- // ========== 公共API函数 ==========
- window.GameDownloadPage = {
- triggerDownload: function() {
- handleDownload();
- }
- };
- // ========== 事件绑定 ==========
- $('#downloadBtn').on('click', handleDownload);
- $('#closeModalBtn').on('click', closeModal);
- $('#downloadGame').on('click', function() {
- const downloadUrl = $(this).attr('value');
- handleFeatureDownload($(this), downloadUrl, '游戏包');
- });
- $('#downloadMaterial').on('click', function() {
- const downloadUrl = $(this).attr('value');
- handleFeatureDownload($(this), downloadUrl, '物料');
- });
- $('#errorModal').on('click', function(e) {
- if (e.target === this) {
- closeModal();
- }
- });
- $(document).on('keyup', function(e) {
- if (e.keyCode === 27) {
- closeModal();
- }
- });
- $(window).on('resize', function() {
- // generateBackground();
- });
- // ========== 页面初始化 ==========
- // generateBackground();
- console.log('游戏下载页面已加载完成');
- console.log('可用API:', Object.keys(window.GameDownloadPage));
- });
- </script>
- </body>
- </html>
|