完成邮件配置模块
This commit is contained in:
		
							parent
							
								
									68ab7e257b
								
							
						
					
					
						commit
						e7d5aa1971
					
				
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,5 +1,5 @@ | |||||||
| /.idea | /.idea | ||||||
| /.vscode | /.vscode | ||||||
| /vendor | /vendor | ||||||
| /runtime/* | runtime | ||||||
| *.log | *.log | ||||||
|  | |||||||
| @ -14,7 +14,8 @@ use app\admin\model\AdminUserGroup; | |||||||
| use app\admin\model\AdminConfig; | use app\admin\model\AdminConfig; | ||||||
| use app\admin\model\ZIconfont; | use app\admin\model\ZIconfont; | ||||||
| use app\admin\model\MailConfig; | use app\admin\model\MailConfig; | ||||||
| use \PHPMailer\PHPMailer\PHPMailer; | use PHPMailer\PHPMailer\PHPMailer; | ||||||
|  | use PHPMailer\PHPMailer\Exception; | ||||||
| 
 | 
 | ||||||
| class YunzerController extends Base | class YunzerController extends Base | ||||||
| { | { | ||||||
|  | |||||||
| @ -31,14 +31,14 @@ | |||||||
|     <div class="layui-form-item"> |     <div class="layui-form-item"> | ||||||
|         <label class="layui-form-label">发件人名称</label> |         <label class="layui-form-label">发件人名称</label> | ||||||
|         <div class="layui-input-block"> |         <div class="layui-input-block"> | ||||||
|             <input type="text" name="smtp_name" value="学创网络" placeholder="请输入发件人名称" class="layui-input"> |             <input type="text" name="smtp_name" value="" placeholder="请输入发件人名称" class="layui-input"> | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
|      |      | ||||||
|     <div class="layui-form-item"> |     <div class="layui-form-item"> | ||||||
|         <div class="layui-input-block"> |         <div class="layui-input-block"> | ||||||
|             <button class="layui-btn" lay-submit lay-filter="saveMailConfig">保存配置</button> |             <button class="layui-btn" lay-submit lay-filter="saveMailConfig">保存配置</button> | ||||||
|             <button class="layui-btn layui-btn-primary" lay-filter="testMailConfig">测试发送</button> |             <button type="button" class="layui-btn layui-btn-primary" lay-submit lay-filter="testMailConfig">测试发送</button> | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
| </div> | </div> | ||||||
| @ -50,14 +50,14 @@ layui.use(['form', 'layer'], function(){ | |||||||
|      |      | ||||||
|     // 加载配置
 |     // 加载配置
 | ||||||
|     $.get('/admin/yunzer/getMailConfig', function(res){ |     $.get('/admin/yunzer/getMailConfig', function(res){ | ||||||
|         if(res.code === 1){ |         if(res.code === 0){ | ||||||
|             form.val('mailConfigForm', res.data); |             form.val('mailConfigForm', res.data); | ||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
|      |      | ||||||
|     // 保存配置
 |     // 保存配置
 | ||||||
|     form.on('submit(saveMailConfig)', function(data){ |     form.on('submit(saveMailConfig)', function(data){ | ||||||
|         $.post('/admin/yunzer/saveMailConfig', data.field, function(res){ |         $.post('/admin/yunzer/mailconfig', data.field, function(res){ | ||||||
|             if(res.code === 1){ |             if(res.code === 1){ | ||||||
|                 layer.msg('保存成功'); |                 layer.msg('保存成功'); | ||||||
|             }else{ |             }else{ | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| <div style="display: flex;flex-direction: column;"> | <div style="display: flex;flex-direction: column;"> | ||||||
| <div class="topbar-one"> |     <div class="topbar-one"> | ||||||
|         <div class="container"> |         <div class="container"> | ||||||
|             <div style="width: 70%;"> |             <div style="width: 70%;"> | ||||||
|                 <ul class="list-unstyled topbar-one__info"> |                 <ul class="list-unstyled topbar-one__info"> | ||||||
| @ -14,8 +14,6 @@ | |||||||
|                 </ul> |                 </ul> | ||||||
|             </div> |             </div> | ||||||
|             <div class="topbar-one__social" style="width: 30%;"> |             <div class="topbar-one__social" style="width: 30%;"> | ||||||
|                 <a href="/index/user/login" class="mr-10"><i class="layui-icon layui-icon-username"></i> 登录</a> |  | ||||||
|                 <a href="/index/user/register" class="mr-10"><i class="layui-icon layui-icon-user"></i> 注册</a> |  | ||||||
|                 <a href="javascript:;" class="qrcode-trigger"><i class="layui-icon layui-icon-qrcode"></i> 公众号</a> |                 <a href="javascript:;" class="qrcode-trigger"><i class="layui-icon layui-icon-qrcode"></i> 公众号</a> | ||||||
|                 <div class="qrcode-popup" |                 <div class="qrcode-popup" | ||||||
|                     style="display:none;position:absolute;right:54px;top:32px;background:#fff;padding:10px;box-shadow:0 0 10px rgba(0,0,0,0.1); z-index: 1000;"> |                     style="display:none;position:absolute;right:54px;top:32px;background:#fff;padding:10px;box-shadow:0 0 10px rgba(0,0,0,0.1); z-index: 1000;"> | ||||||
| @ -40,26 +38,34 @@ | |||||||
|             </div> |             </div> | ||||||
|             <div class="main-menu__right"> |             <div class="main-menu__right"> | ||||||
|                 <div class="layui-inline"> |                 <div class="layui-inline"> | ||||||
|                     <div class="layui-inline" style="position: relative;"> |                     <!-- 根据登录状态显示不同的内容 --> | ||||||
|                         <img src="__IMAGES__/avatar.webp" class="layui-circle" |                     <?php if ($isLoggedIn): ?>
 | ||||||
|                             style="width: 40px; height: 40px; cursor: pointer;" id="userAvatarMain"> |                         <div class="layui-inline" style="position: relative;"> | ||||||
|                         <div class="user-dropdown" id="userDropdownMain"> |                             <img src="__IMAGES__/avatar.webp" class="layui-circle" | ||||||
|                             <ul> |                                 style="width: 40px; height: 40px; cursor: pointer;" id="userAvatarSticky"> | ||||||
|                                 <li> |                             <div class="user-dropdown" id="userDropdownSticky"> | ||||||
|                                     <a href="/index/user/profile"><i |                                 <ul> | ||||||
|                                             class="layui-icon layui-icon-user"></i><span>个人中心</span></a> |                                     <li> | ||||||
|                                 </li> |                                         <a href="/index/user/profile"><i | ||||||
|                                 <li> |                                                 class="layui-icon layui-icon-user"></i><span>个人中心</span></a> | ||||||
|                                     <a href="/index/user/settings"><i |                                     </li> | ||||||
|                                             class="layui-icon layui-icon-set"></i><span>账号管理</span></a> |                                     <li> | ||||||
|                                 </li> |                                         <a href="/index/user/settings"><i | ||||||
|                                 <li> |                                                 class="layui-icon layui-icon-set"></i><span>账号管理</span></a> | ||||||
|                                     <a href="javascript:;" class="logout-btn"><i |                                     </li> | ||||||
|                                             class="layui-icon layui-icon-logout"></i><span>退出登录</span></a> |                                     <li> | ||||||
|                                 </li> |                                         <a href="javascript:;" class="logout-btn"><i | ||||||
|                             </ul> |                                                 class="layui-icon layui-icon-logout"></i><span>退出登录</span></a> | ||||||
|  |                                     </li> | ||||||
|  |                                 </ul> | ||||||
|  |                             </div> | ||||||
|                         </div> |                         </div> | ||||||
|                     </div> |                     <?php else: ?>
 | ||||||
|  |                         <div class="layui-inline"> | ||||||
|  |                             <a href="/index/user/login" class="layui-btn layui-btn-normal">登录</a> | ||||||
|  |                             <a href="/index/user/register" class="layui-btn layui-btn-primary">注册</a> | ||||||
|  |                         </div> | ||||||
|  |                     <?php endif; ?>
 | ||||||
|                 </div> |                 </div> | ||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
| @ -83,26 +89,34 @@ | |||||||
|         <div class="sticky-nav__right"> |         <div class="sticky-nav__right"> | ||||||
|             <div class="main-menu__right"> |             <div class="main-menu__right"> | ||||||
|                 <div class="layui-inline"> |                 <div class="layui-inline"> | ||||||
|                     <div class="layui-inline" style="position: relative;"> |                     <!-- 根据登录状态显示不同的内容 --> | ||||||
|                         <img src="__IMAGES__/avatar.webp" class="layui-circle" |                     <?php if ($isLoggedIn): ?>
 | ||||||
|                             style="width: 40px; height: 40px; cursor: pointer;" id="userAvatarSticky"> |                         <div class="layui-inline" style="position: relative;"> | ||||||
|                         <div class="user-dropdown" id="userDropdownSticky"> |                             <img src="__IMAGES__/avatar.webp" class="layui-circle" | ||||||
|                             <ul> |                                 style="width: 40px; height: 40px; cursor: pointer;" id="userAvatarSticky"> | ||||||
|                                 <li> |                             <div class="user-dropdown" id="userDropdownSticky"> | ||||||
|                                     <a href="/index/user/profile"><i |                                 <ul> | ||||||
|                                             class="layui-icon layui-icon-user"></i><span>个人中心</span></a> |                                     <li> | ||||||
|                                 </li> |                                         <a href="/index/user/profile"><i | ||||||
|                                 <li> |                                                 class="layui-icon layui-icon-user"></i><span>个人中心</span></a> | ||||||
|                                     <a href="/index/user/settings"><i |                                     </li> | ||||||
|                                             class="layui-icon layui-icon-set"></i><span>账号管理</span></a> |                                     <li> | ||||||
|                                 </li> |                                         <a href="/index/user/settings"><i | ||||||
|                                 <li> |                                                 class="layui-icon layui-icon-set"></i><span>账号管理</span></a> | ||||||
|                                     <a href="javascript:;" class="logout-btn"><i |                                     </li> | ||||||
|                                             class="layui-icon layui-icon-logout"></i><span>退出登录</span></a> |                                     <li> | ||||||
|                                 </li> |                                         <a href="javascript:;" class="logout-btn"><i | ||||||
|                             </ul> |                                                 class="layui-icon layui-icon-logout"></i><span>退出登录</span></a> | ||||||
|  |                                     </li> | ||||||
|  |                                 </ul> | ||||||
|  |                             </div> | ||||||
|                         </div> |                         </div> | ||||||
|                     </div> |                     <?php else: ?>
 | ||||||
|  |                         <div class="layui-inline"> | ||||||
|  |                             <a href="/index/user/login" class="layui-btn layui-btn-normal">登录</a> | ||||||
|  |                             <a href="/index/user/register" class="layui-btn layui-btn-primary">注册</a> | ||||||
|  |                         </div> | ||||||
|  |                     <?php endif; ?>
 | ||||||
|                 </div> |                 </div> | ||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|  | |||||||
| @ -1,3 +1,8 @@ | |||||||
|  | <?php | ||||||
|  | // 获取当前登录状态
 | ||||||
|  | $isLoggedIn = session('user_id') ? true : false; | ||||||
|  | ?>
 | ||||||
|  | 
 | ||||||
| <div style="display: flex;flex-direction: column;"> | <div style="display: flex;flex-direction: column;"> | ||||||
|     <div class="topbar-one"> |     <div class="topbar-one"> | ||||||
|         <div class="container"> |         <div class="container"> | ||||||
| @ -14,8 +19,6 @@ | |||||||
|                 </ul> |                 </ul> | ||||||
|             </div> |             </div> | ||||||
|             <div class="topbar-one__social" style="width: 30%;"> |             <div class="topbar-one__social" style="width: 30%;"> | ||||||
|                 <a href="/index/user/login" class="mr-10"><i class="layui-icon layui-icon-username"></i> 登录</a> |  | ||||||
|                 <a href="/index/user/register" class="mr-10"><i class="layui-icon layui-icon-user"></i> 注册</a> |  | ||||||
|                 <a href="javascript:;" class="qrcode-trigger"><i class="layui-icon layui-icon-qrcode"></i> 公众号</a> |                 <a href="javascript:;" class="qrcode-trigger"><i class="layui-icon layui-icon-qrcode"></i> 公众号</a> | ||||||
|                 <div class="qrcode-popup" |                 <div class="qrcode-popup" | ||||||
|                     style="display:none;position:absolute;right:54px;top:32px;background:#fff;padding:10px;box-shadow:0 0 10px rgba(0,0,0,0.1); z-index: 1000;"> |                     style="display:none;position:absolute;right:54px;top:32px;background:#fff;padding:10px;box-shadow:0 0 10px rgba(0,0,0,0.1); z-index: 1000;"> | ||||||
| @ -40,26 +43,34 @@ | |||||||
|             </div> |             </div> | ||||||
|             <div class="main-menu__right"> |             <div class="main-menu__right"> | ||||||
|                 <div class="layui-inline"> |                 <div class="layui-inline"> | ||||||
|                     <div class="layui-inline" style="position: relative;"> |                     <!-- 根据登录状态显示不同的内容 --> | ||||||
|                         <img src="__IMAGES__/avatar.webp" class="layui-circle" |                     <?php if ($isLoggedIn): ?>
 | ||||||
|                             style="width: 40px; height: 40px; cursor: pointer;" id="userAvatarMain"> |                         <div class="layui-inline" style="position: relative;"> | ||||||
|                         <div class="user-dropdown" id="userDropdownMain"> |                             <img src="__IMAGES__/avatar.webp" class="layui-circle" | ||||||
|                             <ul> |                                 style="width: 40px; height: 40px; cursor: pointer;" id="userAvatarMain"> | ||||||
|                                 <li> |                             <div class="user-dropdown" id="userDropdownMain"> | ||||||
|                                     <a href="/index/user/profile"><i |                                 <ul> | ||||||
|                                             class="layui-icon layui-icon-user"></i><span>个人中心</span></a> |                                     <li> | ||||||
|                                 </li> |                                         <a href="/index/user/profile"><i | ||||||
|                                 <li> |                                                 class="layui-icon layui-icon-user"></i><span>个人中心</span></a> | ||||||
|                                     <a href="/index/user/settings"><i |                                     </li> | ||||||
|                                             class="layui-icon layui-icon-set"></i><span>账号管理</span></a> |                                     <li> | ||||||
|                                 </li> |                                         <a href="/index/user/settings"><i | ||||||
|                                 <li> |                                                 class="layui-icon layui-icon-set"></i><span>账号管理</span></a> | ||||||
|                                     <a href="javascript:;" class="logout-btn"><i |                                     </li> | ||||||
|                                             class="layui-icon layui-icon-logout"></i><span>退出登录</span></a> |                                     <li> | ||||||
|                                 </li> |                                         <a href="javascript:;" class="logout-btn"><i | ||||||
|                             </ul> |                                                 class="layui-icon layui-icon-logout"></i><span>退出登录</span></a> | ||||||
|  |                                     </li> | ||||||
|  |                                 </ul> | ||||||
|  |                             </div> | ||||||
|                         </div> |                         </div> | ||||||
|                     </div> |                     <?php else: ?>
 | ||||||
|  |                         <div class="layui-inline"> | ||||||
|  |                             <a href="/index/user/login" class="layui-btn layui-btn-normal">登录</a> | ||||||
|  |                             <a href="/index/user/register" class="layui-btn layui-btn-primary">注册</a> | ||||||
|  |                         </div> | ||||||
|  |                     <?php endif; ?>
 | ||||||
|                 </div> |                 </div> | ||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
| @ -90,26 +101,34 @@ | |||||||
|         <div class="sticky-nav__right"> |         <div class="sticky-nav__right"> | ||||||
|             <div class="main-menu__right"> |             <div class="main-menu__right"> | ||||||
|                 <div class="layui-inline"> |                 <div class="layui-inline"> | ||||||
|                     <div class="layui-inline" style="position: relative;"> |                     <!-- 根据登录状态显示不同的内容 --> | ||||||
|                         <img src="__IMAGES__/avatar.webp" class="layui-circle" |                     <?php if ($isLoggedIn): ?>
 | ||||||
|                             style="width: 40px; height: 40px; cursor: pointer;" id="userAvatarSticky"> |                         <div class="layui-inline" style="position: relative;"> | ||||||
|                         <div class="user-dropdown" id="userDropdownSticky"> |                             <img src="__IMAGES__/avatar.webp" class="layui-circle" | ||||||
|                             <ul> |                                 style="width: 40px; height: 40px; cursor: pointer;" id="userAvatarSticky"> | ||||||
|                                 <li> |                             <div class="user-dropdown" id="userDropdownSticky"> | ||||||
|                                     <a href="/index/user/profile"><i |                                 <ul> | ||||||
|                                             class="layui-icon layui-icon-user"></i><span>个人中心</span></a> |                                     <li> | ||||||
|                                 </li> |                                         <a href="/index/user/profile"><i | ||||||
|                                 <li> |                                                 class="layui-icon layui-icon-user"></i><span>个人中心</span></a> | ||||||
|                                     <a href="/index/user/settings"><i |                                     </li> | ||||||
|                                             class="layui-icon layui-icon-set"></i><span>账号管理</span></a> |                                     <li> | ||||||
|                                 </li> |                                         <a href="/index/user/settings"><i | ||||||
|                                 <li> |                                                 class="layui-icon layui-icon-set"></i><span>账号管理</span></a> | ||||||
|                                     <a href="javascript:;" class="logout-btn"><i |                                     </li> | ||||||
|                                             class="layui-icon layui-icon-logout"></i><span>退出登录</span></a> |                                     <li> | ||||||
|                                 </li> |                                         <a href="javascript:;" class="logout-btn"><i | ||||||
|                             </ul> |                                                 class="layui-icon layui-icon-logout"></i><span>退出登录</span></a> | ||||||
|  |                                     </li> | ||||||
|  |                                 </ul> | ||||||
|  |                             </div> | ||||||
|                         </div> |                         </div> | ||||||
|                     </div> |                     <?php else: ?>
 | ||||||
|  |                         <div class="layui-inline"> | ||||||
|  |                             <a href="/index/user/login" class="layui-btn layui-btn-normal">登录</a> | ||||||
|  |                             <a href="/index/user/register" class="layui-btn layui-btn-primary">注册</a> | ||||||
|  |                         </div> | ||||||
|  |                     <?php endif; ?>
 | ||||||
|                 </div> |                 </div> | ||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|  | |||||||
							
								
								
									
										4
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							| @ -2093,12 +2093,12 @@ | |||||||
|     ], |     ], | ||||||
|     "aliases": [], |     "aliases": [], | ||||||
|     "minimum-stability": "stable", |     "minimum-stability": "stable", | ||||||
|     "stability-flags": {}, |     "stability-flags": [], | ||||||
|     "prefer-stable": false, |     "prefer-stable": false, | ||||||
|     "prefer-lowest": false, |     "prefer-lowest": false, | ||||||
|     "platform": { |     "platform": { | ||||||
|         "php": ">=7.2.5" |         "php": ">=7.2.5" | ||||||
|     }, |     }, | ||||||
|     "platform-dev": {}, |     "platform-dev": [], | ||||||
|     "plugin-api-version": "2.6.0" |     "plugin-api-version": "2.6.0" | ||||||
| } | } | ||||||
|  | |||||||
| @ -6,11 +6,11 @@ body { | |||||||
| 
 | 
 | ||||||
| a { | a { | ||||||
|   text-decoration: none !important; |   text-decoration: none !important; | ||||||
|   color: var(--bs-white) !important; |   color: var(--bs-white); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| a:hover { | a:hover { | ||||||
|   color: var(--bs-orange) !important; |   color: var(--bs-orange); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .fas { | .fas { | ||||||
| @ -211,12 +211,20 @@ pre code { | |||||||
|   position: relative; |   position: relative; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .main-menu .container a { | .main-menu .container .main-menu__right .layui-btn-primary:hover,.sticky-nav .container .main-menu__right .layui-btn-primary:hover { | ||||||
|  |   color: #3492ed; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .main-menu .container .main-menu__nav a { | ||||||
|   color: #3492ed !important; |   color: #3492ed !important; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | .main-menu .container .main-menu__nav a:hover { | ||||||
|  |   color: #fff !important; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| .main-menu .container a:hover { | .main-menu .container a:hover { | ||||||
|   color: var(--bs-white) !important; |   color: var(--bs-white); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #userDropdownMain a:hover { | #userDropdownMain a:hover { | ||||||
| @ -318,6 +326,7 @@ pre code { | |||||||
| 
 | 
 | ||||||
| /* 轮播动画 */ | /* 轮播动画 */ | ||||||
| @keyframes slide { | @keyframes slide { | ||||||
|  | 
 | ||||||
|   0%, |   0%, | ||||||
|   33% { |   33% { | ||||||
|     transform: translateX(0); |     transform: translateX(0); | ||||||
| @ -556,13 +565,15 @@ pre code { | |||||||
|   -webkit-line-clamp: 2; |   -webkit-line-clamp: 2; | ||||||
|   -webkit-box-orient: vertical; |   -webkit-box-orient: vertical; | ||||||
| } | } | ||||||
|  | 
 | ||||||
| .layui-layer-btn .layui-layer-btn1 { | .layui-layer-btn .layui-layer-btn1 { | ||||||
|   background: #fff; |   background: #fff; | ||||||
|   color: #212529 !important; |   color: #212529 !important; | ||||||
|   border: 1px solid #212529; |   border: 1px solid #212529; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .program-content img,.game-content img { | .program-content img, | ||||||
|  | .game-content img { | ||||||
|   width: 100%; |   width: 100%; | ||||||
|   margin: 20px auto; |   margin: 20px auto; | ||||||
| } | } | ||||||
| @ -1108,7 +1108,7 @@ a cite { | |||||||
| 	height: 100%; | 	height: 100%; | ||||||
| 	line-height: 60px; | 	line-height: 60px; | ||||||
| 	text-align: center; | 	text-align: center; | ||||||
| 	color: #16baaa; | 	color: #1e9fff; | ||||||
| 	font-size: 16px; | 	font-size: 16px; | ||||||
| 	box-shadow: 0 1px 2px 0 rgb(0 0 0 / 15%) | 	box-shadow: 0 1px 2px 0 rgb(0 0 0 / 15%) | ||||||
| } | } | ||||||
| @ -2298,7 +2298,7 @@ a cite { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-bg-green { | .layui-bg-green { | ||||||
| 	background-color: #16baaa !important; | 	background-color: #1e9fff !important; | ||||||
| 	color: #fff !important | 	color: #fff !important | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -2371,8 +2371,8 @@ a cite { | |||||||
| .layui-border-green { | .layui-border-green { | ||||||
| 	border-width: 1px; | 	border-width: 1px; | ||||||
| 	border-style: solid; | 	border-style: solid; | ||||||
| 	border-color: #16baaa !important; | 	border-color: #1e9fff !important; | ||||||
| 	color: #16baaa !important | 	color: #1e9fff !important | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-border-cyan { | .layui-border-cyan { | ||||||
| @ -2578,7 +2578,7 @@ hr.layui-border-red { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-font-green { | .layui-font-green { | ||||||
| 	color: #16baaa !important | 	color: #1e9fff !important | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-font-cyan { | .layui-font-cyan { | ||||||
| @ -2608,7 +2608,7 @@ hr.layui-border-red { | |||||||
| 	line-height: 38px; | 	line-height: 38px; | ||||||
| 	border: 1px solid transparent; | 	border: 1px solid transparent; | ||||||
| 	padding: 0 18px; | 	padding: 0 18px; | ||||||
| 	background-color: #16baaa; | 	background-color: #1e9fff; | ||||||
| 	color: #fff; | 	color: #fff; | ||||||
| 	white-space: nowrap; | 	white-space: nowrap; | ||||||
| 	text-align: center; | 	text-align: center; | ||||||
| @ -2668,7 +2668,7 @@ hr.layui-border-red { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-btn-primary:hover { | .layui-btn-primary:hover { | ||||||
| 	border-color: #16baaa; | 	border-color: #1e9fff; | ||||||
| 	color: #333 | 	color: #333 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -2742,7 +2742,7 @@ hr.layui-border-red { | |||||||
| 
 | 
 | ||||||
| .layui-btn-group .layui-btn-primary:hover { | .layui-btn-group .layui-btn-primary:hover { | ||||||
| 	border-color: #d2d2d2; | 	border-color: #d2d2d2; | ||||||
| 	color: #16baaa | 	color: #1e9fff | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-btn-group .layui-btn:first-child { | .layui-btn-group .layui-btn:first-child { | ||||||
| @ -3747,7 +3747,7 @@ hr.layui-border-red { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-laypage a:hover { | .layui-laypage a:hover { | ||||||
| 	color: #16baaa | 	color: #1e9fff | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-laypage em { | .layui-laypage em { | ||||||
| @ -3775,7 +3775,7 @@ hr.layui-border-red { | |||||||
| 	padding: 1px; | 	padding: 1px; | ||||||
| 	width: 100%; | 	width: 100%; | ||||||
| 	height: 100%; | 	height: 100%; | ||||||
| 	background-color: #16baaa | 	background-color: #1e9fff | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-laypage-em { | .layui-laypage-em { | ||||||
| @ -3841,7 +3841,7 @@ hr.layui-border-red { | |||||||
| 
 | 
 | ||||||
| .layui-laypage input:focus, | .layui-laypage input:focus, | ||||||
| .layui-laypage select:focus { | .layui-laypage select:focus { | ||||||
| 	border-color: #16baaa !important | 	border-color: #1e9fff !important | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-laypage button { | .layui-laypage button { | ||||||
| @ -4708,11 +4708,11 @@ body .layui-table-tips .layui-layer-content { | |||||||
| 
 | 
 | ||||||
| .layui-upload-drag .layui-icon { | .layui-upload-drag .layui-icon { | ||||||
| 	font-size: 50px; | 	font-size: 50px; | ||||||
| 	color: #16baaa | 	color: #1e9fff | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-upload-drag[lay-over] { | .layui-upload-drag[lay-over] { | ||||||
| 	border-color: #16baaa | 	border-color: #1e9fff | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-upload-form { | .layui-upload-form { | ||||||
| @ -5063,7 +5063,7 @@ body .layui-table-tips .layui-layer-content { | |||||||
| 
 | 
 | ||||||
| .layui-tabs-header .layui-this, | .layui-tabs-header .layui-this, | ||||||
| .layui-tabs-header li:hover { | .layui-tabs-header li:hover { | ||||||
| 	color: #16baaa | 	color: #1e9fff | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-tabs-header .layui-this:after { | .layui-tabs-header .layui-this:after { | ||||||
| @ -5074,7 +5074,7 @@ body .layui-table-tips .layui-layer-content { | |||||||
| 	z-index: 1; | 	z-index: 1; | ||||||
| 	width: 100%; | 	width: 100%; | ||||||
| 	height: 100%; | 	height: 100%; | ||||||
| 	border-bottom: 3px solid #16baaa; | 	border-bottom: 3px solid #1e9fff; | ||||||
| 	box-sizing: border-box; | 	box-sizing: border-box; | ||||||
| 	pointer-events: none | 	pointer-events: none | ||||||
| } | } | ||||||
| @ -5367,7 +5367,7 @@ body .layui-table-tips .layui-layer-content { | |||||||
| .layui-nav-tree .layui-this, | .layui-nav-tree .layui-this, | ||||||
| .layui-nav-tree .layui-this>a, | .layui-nav-tree .layui-this>a, | ||||||
| .layui-nav-tree .layui-this>a:hover { | .layui-nav-tree .layui-this>a:hover { | ||||||
| 	background-color: #16baaa; | 	background-color: #1e9fff; | ||||||
| 	color: #fff | 	color: #fff | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -5382,7 +5382,7 @@ body .layui-table-tips .layui-layer-content { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-nav-tree .layui-nav-bar { | .layui-nav-tree .layui-nav-bar { | ||||||
| 	background-color: #16baaa | 	background-color: #1e9fff | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-nav-tree .layui-nav-child { | .layui-nav-tree .layui-nav-child { | ||||||
| @ -5638,7 +5638,7 @@ body .layui-table-tips .layui-layer-content { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-tab-brief>.layui-tab-title .layui-this { | .layui-tab-brief>.layui-tab-title .layui-this { | ||||||
| 	color: #16baaa | 	color: #1e9fff | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-tab-brief>.layui-tab-more li.layui-this:after, | .layui-tab-brief>.layui-tab-more li.layui-this:after, | ||||||
| @ -6665,7 +6665,7 @@ body .layui-util-face .layui-layer-content { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-slider-input-btn i:hover { | .layui-slider-input-btn i:hover { | ||||||
| 	color: #16baaa | 	color: #1e9fff | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-slider-vertical { | .layui-slider-vertical { | ||||||
| @ -8022,7 +8022,7 @@ html #layuicss-laydate { | |||||||
| 
 | 
 | ||||||
| .laydate-theme-molv .layui-laydate-header { | .laydate-theme-molv .layui-laydate-header { | ||||||
| 	border: none; | 	border: none; | ||||||
| 	background-color: #16baaa | 	background-color: #1e9fff | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .laydate-theme-molv .layui-laydate-header i, | .laydate-theme-molv .layui-laydate-header i, | ||||||
| @ -8047,7 +8047,7 @@ html #layuicss-laydate { | |||||||
| 
 | 
 | ||||||
| .laydate-theme-molv .layui-this, | .laydate-theme-molv .layui-this, | ||||||
| .laydate-theme-molv .layui-this>div { | .laydate-theme-molv .layui-this>div { | ||||||
| 	background-color: #16baaa !important | 	background-color: #1e9fff !important | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .laydate-theme-molv .layui-laydate-footer { | .laydate-theme-molv .layui-laydate-footer { | ||||||
| @ -8064,7 +8064,7 @@ html #layuicss-laydate { | |||||||
| .layui-laydate-linkage.laydate-theme-grid .laydate-selected, | .layui-laydate-linkage.laydate-theme-grid .laydate-selected, | ||||||
| .layui-laydate-linkage.laydate-theme-grid .laydate-selected:hover { | .layui-laydate-linkage.laydate-theme-grid .laydate-selected:hover { | ||||||
| 	background-color: #f2f2f2 !important; | 	background-color: #f2f2f2 !important; | ||||||
| 	color: #16baaa !important | 	color: #1e9fff !important | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .layui-laydate-linkage.laydate-theme-grid .laydate-selected.laydate-day-next, | .layui-laydate-linkage.laydate-theme-grid .laydate-selected.laydate-day-next, | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| <?php /*a:4:{s:49:"E:\Demo\PHP\yunzer\app\index\view\index\index.php";i:1746890051;s:54:"E:\Demo\PHP\yunzer\app\index\view\component\header.php";i:1747416219;s:52:"E:\Demo\PHP\yunzer\app\index\view\component\main.php";i:1747748380;s:54:"E:\Demo\PHP\yunzer\app\index\view\component\footer.php";i:1747649140;}*/ ?>
 | <?php /*a:4:{s:49:"E:\Demo\PHP\yunzer\app\index\view\index\index.php";i:1746890051;s:54:"E:\Demo\PHP\yunzer\app\index\view\component\header.php";i:1748266393;s:52:"E:\Demo\PHP\yunzer\app\index\view\component\main.php";i:1747748380;s:54:"E:\Demo\PHP\yunzer\app\index\view\component\footer.php";i:1747649140;}*/ ?>
 | ||||||
| <!DOCTYPE html> | <!DOCTYPE html> | ||||||
| <html> | <html> | ||||||
| 
 | 
 | ||||||
| @ -16,7 +16,12 @@ | |||||||
| </head> | </head> | ||||||
| 
 | 
 | ||||||
| <body> | <body> | ||||||
|     <div style="display: flex;flex-direction: column;"> |     <?php | ||||||
|  | // 获取当前登录状态
 | ||||||
|  | $isLoggedIn = session('user_id') ? true : false; | ||||||
|  | ?>
 | ||||||
|  | 
 | ||||||
|  | <div style="display: flex;flex-direction: column;"> | ||||||
|     <div class="topbar-one"> |     <div class="topbar-one"> | ||||||
|         <div class="container"> |         <div class="container"> | ||||||
|             <div style="width: 70%;"> |             <div style="width: 70%;"> | ||||||
| @ -32,8 +37,6 @@ | |||||||
|                 </ul> |                 </ul> | ||||||
|             </div> |             </div> | ||||||
|             <div class="topbar-one__social" style="width: 30%;"> |             <div class="topbar-one__social" style="width: 30%;"> | ||||||
|                 <a href="/index/user/login" class="mr-10"><i class="layui-icon layui-icon-username"></i> 登录</a> |  | ||||||
|                 <a href="/index/user/register" class="mr-10"><i class="layui-icon layui-icon-user"></i> 注册</a> |  | ||||||
|                 <a href="javascript:;" class="qrcode-trigger"><i class="layui-icon layui-icon-qrcode"></i> 公众号</a> |                 <a href="javascript:;" class="qrcode-trigger"><i class="layui-icon layui-icon-qrcode"></i> 公众号</a> | ||||||
|                 <div class="qrcode-popup" |                 <div class="qrcode-popup" | ||||||
|                     style="display:none;position:absolute;right:54px;top:32px;background:#fff;padding:10px;box-shadow:0 0 10px rgba(0,0,0,0.1); z-index: 1000;"> |                     style="display:none;position:absolute;right:54px;top:32px;background:#fff;padding:10px;box-shadow:0 0 10px rgba(0,0,0,0.1); z-index: 1000;"> | ||||||
| @ -58,26 +61,34 @@ | |||||||
|             </div> |             </div> | ||||||
|             <div class="main-menu__right"> |             <div class="main-menu__right"> | ||||||
|                 <div class="layui-inline"> |                 <div class="layui-inline"> | ||||||
|                     <div class="layui-inline" style="position: relative;"> |                     <!-- 根据登录状态显示不同的内容 --> | ||||||
|                         <img src="/static/images/avatar.webp" class="layui-circle" |                     <?php if ($isLoggedIn): ?>
 | ||||||
|                             style="width: 40px; height: 40px; cursor: pointer;" id="userAvatarMain"> |                         <div class="layui-inline" style="position: relative;"> | ||||||
|                         <div class="user-dropdown" id="userDropdownMain"> |                             <img src="/static/images/avatar.webp" class="layui-circle" | ||||||
|                             <ul> |                                 style="width: 40px; height: 40px; cursor: pointer;" id="userAvatarMain"> | ||||||
|                                 <li> |                             <div class="user-dropdown" id="userDropdownMain"> | ||||||
|                                     <a href="/index/user/profile"><i |                                 <ul> | ||||||
|                                             class="layui-icon layui-icon-user"></i><span>个人中心</span></a> |                                     <li> | ||||||
|                                 </li> |                                         <a href="/index/user/profile"><i | ||||||
|                                 <li> |                                                 class="layui-icon layui-icon-user"></i><span>个人中心</span></a> | ||||||
|                                     <a href="/index/user/settings"><i |                                     </li> | ||||||
|                                             class="layui-icon layui-icon-set"></i><span>账号管理</span></a> |                                     <li> | ||||||
|                                 </li> |                                         <a href="/index/user/settings"><i | ||||||
|                                 <li> |                                                 class="layui-icon layui-icon-set"></i><span>账号管理</span></a> | ||||||
|                                     <a href="javascript:;" class="logout-btn"><i |                                     </li> | ||||||
|                                             class="layui-icon layui-icon-logout"></i><span>退出登录</span></a> |                                     <li> | ||||||
|                                 </li> |                                         <a href="javascript:;" class="logout-btn"><i | ||||||
|                             </ul> |                                                 class="layui-icon layui-icon-logout"></i><span>退出登录</span></a> | ||||||
|  |                                     </li> | ||||||
|  |                                 </ul> | ||||||
|  |                             </div> | ||||||
|                         </div> |                         </div> | ||||||
|                     </div> |                     <?php else: ?>
 | ||||||
|  |                         <div class="layui-inline"> | ||||||
|  |                             <a href="/index/user/login" class="layui-btn layui-btn-normal">登录</a> | ||||||
|  |                             <a href="/index/user/register" class="layui-btn layui-btn-primary">注册</a> | ||||||
|  |                         </div> | ||||||
|  |                     <?php endif; ?>
 | ||||||
|                 </div> |                 </div> | ||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
| @ -108,26 +119,34 @@ | |||||||
|         <div class="sticky-nav__right"> |         <div class="sticky-nav__right"> | ||||||
|             <div class="main-menu__right"> |             <div class="main-menu__right"> | ||||||
|                 <div class="layui-inline"> |                 <div class="layui-inline"> | ||||||
|                     <div class="layui-inline" style="position: relative;"> |                     <!-- 根据登录状态显示不同的内容 --> | ||||||
|                         <img src="/static/images/avatar.webp" class="layui-circle" |                     <?php if ($isLoggedIn): ?>
 | ||||||
|                             style="width: 40px; height: 40px; cursor: pointer;" id="userAvatarSticky"> |                         <div class="layui-inline" style="position: relative;"> | ||||||
|                         <div class="user-dropdown" id="userDropdownSticky"> |                             <img src="/static/images/avatar.webp" class="layui-circle" | ||||||
|                             <ul> |                                 style="width: 40px; height: 40px; cursor: pointer;" id="userAvatarSticky"> | ||||||
|                                 <li> |                             <div class="user-dropdown" id="userDropdownSticky"> | ||||||
|                                     <a href="/index/user/profile"><i |                                 <ul> | ||||||
|                                             class="layui-icon layui-icon-user"></i><span>个人中心</span></a> |                                     <li> | ||||||
|                                 </li> |                                         <a href="/index/user/profile"><i | ||||||
|                                 <li> |                                                 class="layui-icon layui-icon-user"></i><span>个人中心</span></a> | ||||||
|                                     <a href="/index/user/settings"><i |                                     </li> | ||||||
|                                             class="layui-icon layui-icon-set"></i><span>账号管理</span></a> |                                     <li> | ||||||
|                                 </li> |                                         <a href="/index/user/settings"><i | ||||||
|                                 <li> |                                                 class="layui-icon layui-icon-set"></i><span>账号管理</span></a> | ||||||
|                                     <a href="javascript:;" class="logout-btn"><i |                                     </li> | ||||||
|                                             class="layui-icon layui-icon-logout"></i><span>退出登录</span></a> |                                     <li> | ||||||
|                                 </li> |                                         <a href="javascript:;" class="logout-btn"><i | ||||||
|                             </ul> |                                                 class="layui-icon layui-icon-logout"></i><span>退出登录</span></a> | ||||||
|  |                                     </li> | ||||||
|  |                                 </ul> | ||||||
|  |                             </div> | ||||||
|                         </div> |                         </div> | ||||||
|                     </div> |                     <?php else: ?>
 | ||||||
|  |                         <div class="layui-inline"> | ||||||
|  |                             <a href="/index/user/login" class="layui-btn layui-btn-normal">登录</a> | ||||||
|  |                             <a href="/index/user/register" class="layui-btn layui-btn-primary">注册</a> | ||||||
|  |                         </div> | ||||||
|  |                     <?php endif; ?>
 | ||||||
|                 </div> |                 </div> | ||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| <?php /*a:5:{s:49:"E:\Demo\PHP\yunzer\app\index\view\game\detail.php";i:1747757578;s:52:"E:\Demo\PHP\yunzer\app\index\view\component\head.php";i:1747649140;s:61:"E:\Demo\PHP\yunzer\app\index\view\component\header-simple.php";i:1747754938;s:54:"E:\Demo\PHP\yunzer\app\index\view\component\footer.php";i:1747649140;s:52:"E:\Demo\PHP\yunzer\app\index\view\component\foot.php";i:1746808046;}*/ ?>
 | <?php /*a:5:{s:49:"E:\Demo\PHP\yunzer\app\index\view\game\detail.php";i:1748261449;s:52:"E:\Demo\PHP\yunzer\app\index\view\component\head.php";i:1747649140;s:61:"E:\Demo\PHP\yunzer\app\index\view\component\header-simple.php";i:1748261449;s:54:"E:\Demo\PHP\yunzer\app\index\view\component\footer.php";i:1747649140;s:52:"E:\Demo\PHP\yunzer\app\index\view\component\foot.php";i:1746808046;}*/ ?>
 | ||||||
| <!DOCTYPE html> | <!DOCTYPE html> | ||||||
| <html> | <html> | ||||||
| 
 | 
 | ||||||
| @ -48,7 +48,7 @@ | |||||||
|     <div class="main-menu"> |     <div class="main-menu"> | ||||||
|         <div class="container"> |         <div class="container"> | ||||||
|             <div class="main-menu__logo"> |             <div class="main-menu__logo"> | ||||||
|                 <a href="index.html"><img src="/static/images/logo1.png" width="186" alt="Logo"></a> |                 <a href="/index.html"><img src="/static/images/logo1.png" width="186" alt="Logo"></a> | ||||||
|             </div> |             </div> | ||||||
|             <div class="main-menu__nav"> |             <div class="main-menu__nav"> | ||||||
|                 <ul class="main-menu__list"> |                 <ul class="main-menu__list"> | ||||||
| @ -90,7 +90,7 @@ | |||||||
| <div class="sticky-nav" style="display: none;"> | <div class="sticky-nav" style="display: none;"> | ||||||
|     <div class="container"> |     <div class="container"> | ||||||
|         <div class="sticky-nav__logo"> |         <div class="sticky-nav__logo"> | ||||||
|             <a href="index.html"><img src="/static/images/logo1.png" width="150" alt="Logo"></a> |             <a href="/index.html"><img src="/static/images/logo1.png" width="150" alt="Logo"></a> | ||||||
|         </div> |         </div> | ||||||
|         <div class="sticky-nav__menu"> |         <div class="sticky-nav__menu"> | ||||||
|             <ul> |             <ul> | ||||||
| @ -446,76 +446,137 @@ | |||||||
|     }); |     }); | ||||||
| </script> | </script> | ||||||
| <div class="main"> | <div class="main"> | ||||||
|     <div class="location"> |     <div class="main-top"> | ||||||
|         <div class="container"> |         <div class="main-top-main"> | ||||||
|             <div class="location-item"> |             <div class="main-title"> | ||||||
|                 <a href="/">首页</a> |                 <?php echo $game['title']; ?>
 | ||||||
|                 <span>></span> |             </div> | ||||||
|                 <a href="/index/game/list" id="cateLink"><?php echo $cateName; ?></a>
 |             <div class="location"> | ||||||
|  |                 <div class="container"> | ||||||
|  |                     <div class="location-item"> | ||||||
|  |                         <a href="/">首页</a> | ||||||
|  |                         <span>></span> | ||||||
|  |                         <a href="/index/game/list" id="cateLink"><?php echo $cateName; ?></a>
 | ||||||
|  |                     </div> | ||||||
|  |                 </div> | ||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
| 
 | 
 | ||||||
|     <div class="game-detail"> |     <div class="detail-main"> | ||||||
|         <div class="game-info"> |         <div class="detail-top"> | ||||||
|             <div class="game-header"> |             <div class="detail-top-card"> | ||||||
|                 <h1 class="game-title"><?php echo $game['title']; ?></h1>
 |                 <div class="detail-top-card-left"> | ||||||
|                 <div class="game-meta"> |                     <div class="article-cover"> | ||||||
|                     <span class="game-category"><?php echo $cateName; ?></span>
 |                         <img src="<?php echo $game['icon'] ?: '/static/images/default-game.png'; ?>"> | ||||||
|                     <span class="game-views"><i class="fa-solid fa-eye"></i> <?php echo $game['views']; ?> </span>
 |                         <!-- <img src="https://www.yunzer.cn/storage/uploads/20250523/b75a51fa606fd3a18261a6ea283d35fe.jpg" alt=""> --> | ||||||
|                     <span class="game-downloads"><i class="fa-solid fa-download"></i> <span |                     </div> | ||||||
|                             id="gameDownloads"><?php echo $game['downloads']; ?></span> </span>
 |  | ||||||
|                 </div> |                 </div> | ||||||
|             </div> |                 <div class="detail-top-card-right"> | ||||||
|             <div class="game-content"> |                     <div class="detail-top-card-right-top"> | ||||||
|                 <div class="game-cover"> |                         <div class="collect-btn"> | ||||||
|                     <img src="<?php echo $game['icon'] ?: '/static/images/default-game.png'; ?>" |                             <button class="btn btn-primary" id="collectBtn" data-game-id="<?php echo $game['id']; ?>"> | ||||||
|                         alt="<?php echo $game['title']; ?>"> |                                 <i class="fa-solid fa-heart"></i> 收藏 | ||||||
|                 </div> |                             </button> | ||||||
|                 <div class="game-desc"> |                         </div> | ||||||
|                     <?php echo $game['content']; ?>
 |                         <div class="report-btn"> | ||||||
|                 </div> |                             <button class="btn btn-primary" id="reportBtn" style="margin-left: 20px;"> | ||||||
|             </div> |                                 <i class="fa-solid fa-flag"></i> 举报 | ||||||
|             <div class="game-actions"> |                             </button> | ||||||
|                 <div style="display: flex;gap: 30px;}"> |                         </div> | ||||||
|                     <button id="downloadBtn" class="btn btn-primary"> |                     </div> | ||||||
|                         <i class="fa-solid fa-download"></i> 立即下载 |                     <div class="detail-top-card-right-middle"> | ||||||
|                     </button> |                         <div class="game-info"> | ||||||
|                     <button id="codeBtn" class="codebtn"> |                             <div class="title">Free</div> | ||||||
|                         <i class="fa-solid fa-download"></i> 分享码:<?php echo $game['code']; ?>
 |                             <div class="infos"> | ||||||
|                     </button> |                                 <div class="infoitem"><span>更新时间:</span><?php echo date('Y-m-d', $game['create_time']); ?></div>
 | ||||||
|                 </div> |                                 <div class="infoitem"><span>所属分类:</span><?php echo $cateName; ?></div>
 | ||||||
|             </div> |                                 <div class="infoitem"><span>程序编号:</span><?php echo $game['number']; ?></div>
 | ||||||
|         </div> |                                 <div class="infoitem"><span>查看:</span><?php echo $game['views']; ?></div>
 | ||||||
| 
 |                                 <div class="infoitem"><span>下载:</span><?php echo $game['downloads']; ?></div>
 | ||||||
|         <div class="game-navigation"> |  | ||||||
|             <div class="prev-game" id="prevGame"> |  | ||||||
|             </div> |  | ||||||
|             <div class="next-game" id="nextGame"> |  | ||||||
|             </div> |  | ||||||
|         </div> |  | ||||||
| 
 |  | ||||||
|         <!-- 相关游戏 --> |  | ||||||
|         <?php if (!empty($relatedGames)): ?>
 |  | ||||||
|             <div class="related-games"> |  | ||||||
|                 <h3>相关游戏</h3> |  | ||||||
|                 <div class="game-list"> |  | ||||||
|                     <?php foreach ($relatedGames as $related): ?>
 |  | ||||||
|                         <div class="game-item" |  | ||||||
|                             onclick="window.location.href='/index/game/detail?id=<?php echo $related['id']; ?>'"> |  | ||||||
|                             <div class="game-cover"> |  | ||||||
|                                 <img src="<?php echo $related['icon'] ?: '/static/images/default-game.png'; ?>" |  | ||||||
|                                     alt="<?php echo $related['title']; ?>"> |  | ||||||
|                             </div> |  | ||||||
|                             <div class="game-info"> |  | ||||||
|                                 <h4 class="game-title-1"><?php echo $related['title']; ?></h4>
 |  | ||||||
|                             </div> |                             </div> | ||||||
|                         </div> |                         </div> | ||||||
|                     <?php endforeach; ?>
 |                     </div> | ||||||
|  |                     <div class="detail-top-card-right-bottom"> | ||||||
|  |                         <div class="game-actions1"> | ||||||
|  |                             <div style="display: flex;gap: 30px;}"> | ||||||
|  |                                 <button id="downloadBtn" class="btn btn-primary"> | ||||||
|  |                                     <i class="fa-solid fa-download"></i> 立即下载 | ||||||
|  |                                 </button> | ||||||
|  |                                 <button id="codeBtn" class="codebtn"> | ||||||
|  |                                     <i class="fa-solid fa-download"></i> 分享码:<?php echo $game['code']; ?>
 | ||||||
|  |                                 </button> | ||||||
|  |                             </div> | ||||||
|  |                         </div> | ||||||
|  |                     </div> | ||||||
|                 </div> |                 </div> | ||||||
|             </div> |             </div> | ||||||
|         <?php endif; ?>
 |         </div> | ||||||
|  |         <div class="detail-middle"> | ||||||
|  |             <div class="detial-middle-left"> | ||||||
|  |                 <div class="game-detail"> | ||||||
|  |                     <div class="game-info"> | ||||||
|  |                         <div class="game-content"> | ||||||
|  |                             <div class="game-desc"> | ||||||
|  |                                 <?php echo $game['content']; ?>
 | ||||||
|  |                             </div> | ||||||
|  |                         </div> | ||||||
|  |                         <div class="game-actions"> | ||||||
|  |                             <div style="display: flex;gap: 30px;}"> | ||||||
|  |                                 <button id="downloadBtn" class="btn btn-primary"> | ||||||
|  |                                     <i class="fa-solid fa-download"></i> 立即下载 | ||||||
|  |                                 </button> | ||||||
|  |                                 <button id="codeBtn" class="codebtn"> | ||||||
|  |                                     <i class="fa-solid fa-download"></i> 分享码:<?php echo $game['code']; ?>
 | ||||||
|  |                                 </button> | ||||||
|  |                             </div> | ||||||
|  |                         </div> | ||||||
|  |                     </div> | ||||||
|  | 
 | ||||||
|  |                     <div class="disclaimers"> | ||||||
|  |                         <div class="disclaimer-item"> | ||||||
|  |                             <div class="disclaimer-title">免责声明:</div> | ||||||
|  |                             <div class="disclaimer-content"> | ||||||
|  |                                 <?php echo $config['disclaimers'] ?>
 | ||||||
|  |                             </div> | ||||||
|  |                         </div> | ||||||
|  |                     </div> | ||||||
|  | 
 | ||||||
|  |                     <div class="game-navigation"> | ||||||
|  |                         <div class="prev-game" id="prevGame"> | ||||||
|  |                         </div> | ||||||
|  |                         <div class="next-game" id="nextGame"> | ||||||
|  |                         </div> | ||||||
|  |                     </div> | ||||||
|  | 
 | ||||||
|  |                     <!-- 相关游戏 --> | ||||||
|  |                     <?php if (!empty($relatedGames)): ?>
 | ||||||
|  |                         <div class="related-games"> | ||||||
|  |                             <h3>相关游戏</h3> | ||||||
|  |                             <div class="game-list"> | ||||||
|  |                                 <?php foreach ($relatedGames as $related): ?>
 | ||||||
|  |                                     <div class="game-item" | ||||||
|  |                                         onclick="window.location.href='/index/game/detail?id=<?php echo $related['id']; ?>'"> | ||||||
|  |                                         <div class="game-cover"> | ||||||
|  |                                             <img src="<?php echo $related['icon'] ?: '/static/images/default-game.png'; ?>" | ||||||
|  |                                                 alt="<?php echo $related['title']; ?>"> | ||||||
|  |                                         </div> | ||||||
|  |                                         <div class="game-info"> | ||||||
|  |                                             <h4 class="game-title-1"><?php echo $related['title']; ?></h4>
 | ||||||
|  |                                         </div> | ||||||
|  |                                     </div> | ||||||
|  |                                 <?php endforeach; ?>
 | ||||||
|  |                             </div> | ||||||
|  |                         </div> | ||||||
|  |                     <?php endif; ?>
 | ||||||
|  |                 </div> | ||||||
|  |             </div> | ||||||
|  |             <div class="detial-middle-right"> | ||||||
|  | 
 | ||||||
|  |             </div> | ||||||
|  |         </div> | ||||||
|     </div> |     </div> | ||||||
|  | 
 | ||||||
| </div> | </div> | ||||||
| 
 | 
 | ||||||
| <!-- 返回顶部按钮 --> | <!-- 返回顶部按钮 --> | ||||||
| @ -582,7 +643,7 @@ | |||||||
| 
 | 
 | ||||||
| <script> | <script> | ||||||
|     // 页面加载完成后执行
 |     // 页面加载完成后执行
 | ||||||
|     document.addEventListener('DOMContentLoaded', function () { |     document.addEventListener('DOMContentLoaded', function() { | ||||||
|         // 获取游戏ID
 |         // 获取游戏ID
 | ||||||
|         const gameId = new URLSearchParams(window.location.search).get('id'); |         const gameId = new URLSearchParams(window.location.search).get('id'); | ||||||
|         if (!gameId) { |         if (!gameId) { | ||||||
| @ -592,41 +653,41 @@ | |||||||
| 
 | 
 | ||||||
|         // 获取游戏详情
 |         // 获取游戏详情
 | ||||||
|         fetch('/index/game/detail?id=' + gameId, { |         fetch('/index/game/detail?id=' + gameId, { | ||||||
|             headers: { |                 headers: { | ||||||
|                 'X-Requested-With': 'XMLHttpRequest' |                     'X-Requested-With': 'XMLHttpRequest' | ||||||
|             } |                 } | ||||||
|         }) |             }) | ||||||
|         .then(response => response.json()) |             .then(response => response.json()) | ||||||
|         .then(result => { |             .then(result => { | ||||||
|             if (result.code === 1) { |                 if (result.code === 1) { | ||||||
|                 // 渲染上一篇
 |                     // 渲染上一篇
 | ||||||
|                 const prevGame = document.getElementById('prevGame'); |                     const prevGame = document.getElementById('prevGame'); | ||||||
|                 if (result.data.prevGame) { |                     if (result.data.prevGame) { | ||||||
|                     prevGame.innerHTML = ` |                         prevGame.innerHTML = ` | ||||||
|                         <a href="/index/game/detail?id=${result.data.prevGame.id}"> |                         <a href="/index/game/detail?id=${result.data.prevGame.id}"> | ||||||
|                             <i class="fa fa-arrow-left"></i> 上一篇:${result.data.prevGame.title} |                             <i class="fa fa-arrow-left"></i> 上一篇:${result.data.prevGame.title} | ||||||
|                         </a> |                         </a> | ||||||
|                     `; |                     `; | ||||||
|                 } else { |                     } else { | ||||||
|                     prevGame.innerHTML = '<span class="disabled"><i class="fa fa-arrow-left"></i> 没有上一篇了</span>'; |                         prevGame.innerHTML = '<span class="disabled"><i class="fa fa-arrow-left"></i> 没有上一篇了</span>'; | ||||||
|                 } |                     } | ||||||
| 
 | 
 | ||||||
|                 // 渲染下一篇
 |                     // 渲染下一篇
 | ||||||
|                 const nextGame = document.getElementById('nextGame'); |                     const nextGame = document.getElementById('nextGame'); | ||||||
|                 if (result.data.nextGame) { |                     if (result.data.nextGame) { | ||||||
|                     nextGame.innerHTML = ` |                         nextGame.innerHTML = ` | ||||||
|                         <a href="/index/game/detail?id=${result.data.nextGame.id}"> |                         <a href="/index/game/detail?id=${result.data.nextGame.id}"> | ||||||
|                             下一篇:${result.data.nextGame.title} <i class="fa fa-arrow-right"></i> |                             下一篇:${result.data.nextGame.title} <i class="fa fa-arrow-right"></i> | ||||||
|                         </a> |                         </a> | ||||||
|                     `; |                     `; | ||||||
|                 } else { |                     } else { | ||||||
|                     nextGame.innerHTML = '<span class="disabled">没有下一篇了 <i class="fa fa-arrow-right"></i></span>'; |                         nextGame.innerHTML = '<span class="disabled">没有下一篇了 <i class="fa fa-arrow-right"></i></span>'; | ||||||
|  |                     } | ||||||
|                 } |                 } | ||||||
|             } |             }) | ||||||
|         }) |             .catch(error => { | ||||||
|         .catch(error => { |                 console.error('获取游戏详情失败:', error); | ||||||
|             console.error('获取游戏详情失败:', error); |             }); | ||||||
|         }); |  | ||||||
| 
 | 
 | ||||||
|         // 更新访问次数
 |         // 更新访问次数
 | ||||||
|         updateGameViews(gameId); |         updateGameViews(gameId); | ||||||
| @ -634,19 +695,26 @@ | |||||||
|         // 下载功能
 |         // 下载功能
 | ||||||
|         const downloadBtn = document.getElementById('downloadBtn'); |         const downloadBtn = document.getElementById('downloadBtn'); | ||||||
|         if (downloadBtn) { |         if (downloadBtn) { | ||||||
|             downloadBtn.addEventListener('click', function () { |             downloadBtn.addEventListener('click', function() { | ||||||
|                 fetch('/index/game/downloadurl?id=' + gameId, { |                 fetch('/index/game/downloadurl?id=' + gameId, { | ||||||
|                     method: 'GET', |                         method: 'GET', | ||||||
|                     headers: { |                         headers: { | ||||||
|                         'X-Requested-With': 'XMLHttpRequest' |                             'X-Requested-With': 'XMLHttpRequest' | ||||||
|                     } |                         } | ||||||
|                 }) |                     }) | ||||||
|                     .then(response => response.json()) |                     .then(response => { | ||||||
|  |                         if (!response.ok) { | ||||||
|  |                             throw new Error('网络响应失败'); | ||||||
|  |                         } | ||||||
|  |                         return response.json(); | ||||||
|  |                     }) | ||||||
|                     .then(data => { |                     .then(data => { | ||||||
|                         if (data.code === 1) { |                         if (data.code === 1) { | ||||||
|                             const downloadsElement = document.getElementById('gameDownloads'); |                             const downloadsElement = document.getElementById('gameDownloads'); | ||||||
|                             let downloads = parseInt(downloadsElement.textContent); |                             if (downloadsElement) { | ||||||
|                             downloadsElement.textContent = downloads + 1; |                                 let downloads = parseInt(downloadsElement.textContent); | ||||||
|  |                                 downloadsElement.textContent = downloads + 1; | ||||||
|  |                             } | ||||||
| 
 | 
 | ||||||
|                             // 直接使用返回的URL
 |                             // 直接使用返回的URL
 | ||||||
|                             if (data.data && data.data.url) { |                             if (data.data && data.data.url) { | ||||||
| @ -676,7 +744,7 @@ | |||||||
|                     tempInput.value = code; |                     tempInput.value = code; | ||||||
|                     document.body.appendChild(tempInput); |                     document.body.appendChild(tempInput); | ||||||
|                     tempInput.select(); |                     tempInput.select(); | ||||||
|                      | 
 | ||||||
|                     try { |                     try { | ||||||
|                         // 尝试使用传统的复制方法
 |                         // 尝试使用传统的复制方法
 | ||||||
|                         document.execCommand('copy'); |                         document.execCommand('copy'); | ||||||
| @ -698,7 +766,7 @@ | |||||||
|         const goToTop = document.getElementById('goToTop'); |         const goToTop = document.getElementById('goToTop'); | ||||||
| 
 | 
 | ||||||
|         // 监听滚动事件
 |         // 监听滚动事件
 | ||||||
|         window.addEventListener('scroll', function () { |         window.addEventListener('scroll', function() { | ||||||
|             if (window.pageYOffset > 300) { |             if (window.pageYOffset > 300) { | ||||||
|                 goToTop.classList.add('show'); |                 goToTop.classList.add('show'); | ||||||
|             } else { |             } else { | ||||||
| @ -707,7 +775,7 @@ | |||||||
|         }); |         }); | ||||||
| 
 | 
 | ||||||
|         // 点击返回顶部
 |         // 点击返回顶部
 | ||||||
|         goToTop.addEventListener('click', function () { |         goToTop.addEventListener('click', function() { | ||||||
|             window.scrollTo({ |             window.scrollTo({ | ||||||
|                 top: 0, |                 top: 0, | ||||||
|                 behavior: 'smooth' |                 behavior: 'smooth' | ||||||
| @ -718,13 +786,13 @@ | |||||||
|     // 更新游戏访问次数
 |     // 更新游戏访问次数
 | ||||||
|     function updateGameViews(gameId) { |     function updateGameViews(gameId) { | ||||||
|         fetch('/index/game/updateViews', { |         fetch('/index/game/updateViews', { | ||||||
|             method: 'POST', |                 method: 'POST', | ||||||
|             headers: { |                 headers: { | ||||||
|                 'Content-Type': 'application/x-www-form-urlencoded', |                     'Content-Type': 'application/x-www-form-urlencoded', | ||||||
|                 'X-Requested-With': 'XMLHttpRequest' |                     'X-Requested-With': 'XMLHttpRequest' | ||||||
|             }, |                 }, | ||||||
|             body: 'id=' + gameId |                 body: 'id=' + gameId | ||||||
|         }) |             }) | ||||||
|             .then(response => response.json()) |             .then(response => response.json()) | ||||||
|             .then(result => { |             .then(result => { | ||||||
|                 if (result.code === 1) { |                 if (result.code === 1) { | ||||||
| @ -741,14 +809,137 @@ | |||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
| <style> | <style> | ||||||
|     .location { |     .main-top { | ||||||
|  |         width: 100%; | ||||||
|  |         height: 400px; | ||||||
|  |         background-color: #0081ff;
 | ||||||
|  |         /* background: url('/static/images/top-bg.jpg') no-repeat center center; */ | ||||||
|  |         position: relative; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     .main-top-card { | ||||||
|  |         max-width: 1400px; | ||||||
|  |         margin: 0 auto; | ||||||
|  |         margin-top: 30px; | ||||||
|  |         border-radius: 8px; | ||||||
|  |         background-color: #fff;
 | ||||||
|  |         height: 300px; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     .main-top-main { | ||||||
|  |         max-width: 1400px; | ||||||
|  |         margin: 0 auto; | ||||||
|  |         padding-top: 50px; | ||||||
|  |         display: flex; | ||||||
|  |         justify-content: space-between; | ||||||
|  |         position: absolute; | ||||||
|  |         top: 0; | ||||||
|  |         left: 50%; | ||||||
|  |         transform: translateX(-50%); | ||||||
|  |         width: 100%; | ||||||
|  |         z-index: 1; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     .main-top-main .main-title { | ||||||
|  |         font-size: 30px; | ||||||
|  |         font-weight: 700; | ||||||
|         max-width: 1000px; |         max-width: 1000px; | ||||||
|  |         color: #fff;
 | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     .detail-top { | ||||||
|  |         max-width: 1400px; | ||||||
|  |         /* height: 300px; */ | ||||||
|         margin: 30px auto; |         margin: 30px auto; | ||||||
|  |         position: relative; | ||||||
|  |         background-color: #fff;
 | ||||||
|  |         border-radius: 8px; | ||||||
|  |         box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1); | ||||||
|  |         display: flex; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     .detail-top-card { | ||||||
|  |         width: 100%; | ||||||
|  |         display: flex; | ||||||
|  |         justify-content: space-between; | ||||||
|  |         align-items: center; | ||||||
|  |         padding: 20px; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     .detail-top-card img { | ||||||
|  |         width: 400px; | ||||||
|  |         height: auto; | ||||||
|  |         border-radius: 8px; | ||||||
|  |         overflow: hidden; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     .detail-top-card-right { | ||||||
|  |         /* height: 230px; */ | ||||||
|  |         display: flex; | ||||||
|  |         width: 100%; | ||||||
|  |         margin-left: 20px; | ||||||
|  |         flex-direction: column; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     .detail-top-card-right-top { | ||||||
|  |         display: flex; | ||||||
|  |         justify-content: flex-end; | ||||||
|  |         align-items: center; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     .detail-top-card-right-middle {} | ||||||
|  | 
 | ||||||
|  |     .detail-top-card-right-middle .game-info { | ||||||
|  |         display: flex; | ||||||
|  |         flex-direction: column; | ||||||
|  |         justify-content: space-between; | ||||||
|  |         height: 100%; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     .detail-top-card-right-middle .game-info .title { | ||||||
|  |         font-size: 40px; | ||||||
|  |         font-weight: 700; | ||||||
|  |         color: #42d697;
 | ||||||
|  |         margin-bottom: 15px; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     .detail-top-card-right-middle .game-info .infos { | ||||||
|  |         display: flex; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     .detail-top-card-right-middle .game-info .infos .infoitem { | ||||||
|  |         margin-right: 60px; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     .detail-top-card-right-middle .game-info .infos .infoitem span { | ||||||
|  |         color: #7d879c;
 | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     .detail-middle { | ||||||
|  |         max-width: 1400px; | ||||||
|  |         margin: 0 auto; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     .detail-main { | ||||||
|  |         position: relative; | ||||||
|  |         top: -200px; | ||||||
|  |         left: 0; | ||||||
|  |         width: 100%; | ||||||
|  |         z-index: 2; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     .location { | ||||||
|  |         color: #fff;
 | ||||||
|  |         display: flex; | ||||||
|  |         align-items: center; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     .location a { | ||||||
|  |         color: #fff !important;
 | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     .game-detail { |     .game-detail { | ||||||
|         max-width: 1000px; |  | ||||||
|         margin: 30px auto; |  | ||||||
|         padding: 50px; |         padding: 50px; | ||||||
|         background: #fff;
 |         background: #fff;
 | ||||||
|         box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1); |         box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1); | ||||||
| @ -834,6 +1025,11 @@ | |||||||
|         border-bottom: 1px solid #eee;
 |         border-bottom: 1px solid #eee;
 | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     .game-actions1 { | ||||||
|  |         display: flex; | ||||||
|  |         margin: 20px 0; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     .game-navigation { |     .game-navigation { | ||||||
|         display: flex; |         display: flex; | ||||||
|         justify-content: space-between; |         justify-content: space-between; | ||||||
| @ -860,7 +1056,7 @@ | |||||||
|     .btn { |     .btn { | ||||||
|         /* background: #f57005; */ |         /* background: #f57005; */ | ||||||
|         color: #fff;
 |         color: #fff;
 | ||||||
|         padding: 15px 30px; |         padding: 5px 15px; | ||||||
|         border-radius: 8px; |         border-radius: 8px; | ||||||
|         cursor: pointer; |         cursor: pointer; | ||||||
|         transition: all 0.3s ease; |         transition: all 0.3s ease; | ||||||
| @ -871,8 +1067,8 @@ | |||||||
|         transform: translateY(-2px); |         transform: translateY(-2px); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     .codebtn{ |     .codebtn { | ||||||
|         color:#0d6efd;
 |         color: #0d6efd;
 | ||||||
|         padding: 15px 30px; |         padding: 15px 30px; | ||||||
|         border-radius: 8px; |         border-radius: 8px; | ||||||
|         border: 1px solid #0d6efd;
 |         border: 1px solid #0d6efd;
 | ||||||
| @ -889,7 +1085,7 @@ | |||||||
|         margin: 40px 0; |         margin: 40px 0; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     .related-games h3{ |     .related-games h3 { | ||||||
|         font-size: 20px; |         font-size: 20px; | ||||||
|         font-weight: 600; |         font-weight: 600; | ||||||
|         margin-bottom: 20px; |         margin-bottom: 20px; | ||||||
| @ -988,8 +1184,26 @@ | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     .location-item a { |     .disclaimers { | ||||||
|         color: #000 !important;
 |         color: #b1b1b1;
 | ||||||
|  |         width: 80%; | ||||||
|  |         margin: 20px auto; | ||||||
|  |         margin-bottom: 60px; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     .disclaimer-title { | ||||||
|  |         font-size: 16px; | ||||||
|  |         font-weight: 600; | ||||||
|  |         margin-bottom: 10px; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     .disclaimer-content { | ||||||
|  |         font-size: 14px; | ||||||
|  |         line-height: 1.6; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     .disclaimer-content p { | ||||||
|  |         margin-bottom: 0; | ||||||
|     } |     } | ||||||
| </style> | </style> | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 云泽网
						云泽网