Compare commits
	
		
			No commits in common. "4f8f621c2c61967685e7740b71689487767179d0" and "9aeaf40ad3ad31a3819780709487cd27970241f9" have entirely different histories.
		
	
	
		
			4f8f621c2c
			...
			9aeaf40ad3
		
	
		
@ -122,7 +122,7 @@
 | 
				
			|||||||
                        <div class="layui-upload-list upload-preview" id="yulan_{$lists_v['config_name']}" style="width:90%;">
 | 
					                        <div class="layui-upload-list upload-preview" id="yulan_{$lists_v['config_name']}" style="width:90%;">
 | 
				
			||||||
                            {if !empty($lists_v['config_value'])}
 | 
					                            {if !empty($lists_v['config_value'])}
 | 
				
			||||||
                                <div class="upload_pic_li" style="position:relative;width:120px;margin:0 10px 10px 0">
 | 
					                                <div class="upload_pic_li" style="position:relative;width:120px;margin:0 10px 10px 0">
 | 
				
			||||||
                                    <img style="background-color: #efefef;height:120px;object-fit:cover;" src="{$lists_v['config_value']}" class="layui-upload-img" onmouseover="show_img(this)" onmouseleave="hide_img()">
 | 
					                                    <img style="height:120px;object-fit:cover;" src="{$lists_v['config_value']}" class="layui-upload-img" onmouseover="show_img(this)" onmouseleave="hide_img()">
 | 
				
			||||||
                                    <input type="hidden" name="{$lists_v['config_name']}" value="{$lists_v['config_value']}"/>
 | 
					                                    <input type="hidden" name="{$lists_v['config_name']}" value="{$lists_v['config_value']}"/>
 | 
				
			||||||
                                </div>
 | 
					                                </div>
 | 
				
			||||||
                            {/if}
 | 
					                            {/if}
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,7 @@
 | 
				
			|||||||
        <div class="row" style="width: 100%;">
 | 
					        <div class="row" style="width: 100%;">
 | 
				
			||||||
            <div class="row-main">
 | 
					            <div class="row-main">
 | 
				
			||||||
                <div class="mr-20">
 | 
					                <div class="mr-20">
 | 
				
			||||||
                    <img src="{$config['logo']}" alt="" height="70">
 | 
					                    <img src="__IMAGES__/logo-l-w.png" alt="" height="70">
 | 
				
			||||||
                    <p class="text-white-50 my-4 f18" style="width: 400px;">美天智能科技,这里是介绍!</p>
 | 
					                    <p class="text-white-50 my-4 f18" style="width: 400px;">美天智能科技,这里是介绍!</p>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                <div style="display: flex; justify-content: space-between;width: 100%;margin-right: 200px;">
 | 
					                <div style="display: flex; justify-content: space-between;width: 100%;margin-right: 200px;">
 | 
				
			||||||
@ -35,7 +35,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                <div>
 | 
					                <div>
 | 
				
			||||||
                    <div class="text-center">
 | 
					                    <div class="text-center">
 | 
				
			||||||
                        <img src="{$config['admin_wechat']}" alt="微信二维码" class="img-fluid" style="max-width: 150px;">
 | 
					                        <img src="__IMAGES__/code.png" alt="微信二维码" class="img-fluid" style="max-width: 150px;">
 | 
				
			||||||
                        <p class="text-white-50 mt-2">微信公众号</p>
 | 
					                        <p class="text-white-50 mt-2">微信公众号</p>
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
 | 
				
			|||||||
@ -3,24 +3,17 @@
 | 
				
			|||||||
        <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">
 | 
				
			||||||
                    <li class="topbar-one__info__item">
 | 
					                    <li class="topbar-one__info__item"><span class="topbar-one__info__icon fas fa-phone-alt"></span><a
 | 
				
			||||||
                        <span class="topbar-one__info__icon fas fa-phone-alt" style="margin-right: 10px;"></span>
 | 
					                            href="tel:629-555-0129">(629) 555-0129</a></li>
 | 
				
			||||||
                        <a href="{$config['admin_phone']}">{$config['admin_phone']}</a>
 | 
					                    <li class="topbar-one__info__item"><span class="topbar-one__info__icon fas fa-envelope"></span><a
 | 
				
			||||||
                    </li>
 | 
					                            href="mailto:info@example.com">info@example.com</a></li>
 | 
				
			||||||
                    <li class="topbar-one__info__item">
 | 
					 | 
				
			||||||
                        <span class="topbar-one__info__icon fas fa-envelope" style="margin-right: 10px;"></span>
 | 
					 | 
				
			||||||
                        <a href="mailto:{$config['admin_email']}">{$config['admin_email']}</a>
 | 
					 | 
				
			||||||
                    </li>
 | 
					 | 
				
			||||||
                </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="https://facebook.com"><i class="fab fa-facebook-f"></i></a>
 | 
				
			||||||
                <a href="/index/user/register" class="mr-10"><i class="layui-icon layui-icon-user"></i> 注册</a>
 | 
					                <a href="https://twitter.com"><i class="fab fa-twitter"></i></a>
 | 
				
			||||||
                <a href="javascript:;" class="qrcode-trigger"><i class="layui-icon layui-icon-qrcode"></i> 公众号</a>
 | 
					                <a href="https://instagram.com"><i class="fab fa-instagram"></i></a>
 | 
				
			||||||
                <div class="qrcode-popup"
 | 
					                <a href="https://www.youtube.com/"><i class="fab fa-linkedin"></i></a>
 | 
				
			||||||
                    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;">
 | 
					 | 
				
			||||||
                    <img src="{$config['admin_wechat']}" alt="公众号二维码" style="width:180px;height:180px;">
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
@ -28,7 +21,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="{$config['logo1']}" width="186" alt="Logo"></a>
 | 
					                <a href="index.html"><img src="__IMAGES__/logo.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">
 | 
				
			||||||
@ -39,28 +32,8 @@
 | 
				
			|||||||
                </ul>
 | 
					                </ul>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            <div class="main-menu__right">
 | 
					            <div class="main-menu__right">
 | 
				
			||||||
                <div class="layui-inline">
 | 
					                <a href="#" class="main-menu__search"><i class="layui-icon layui-icon-search"></i></a>
 | 
				
			||||||
                    <div class="layui-inline" style="position: relative;">
 | 
					                <a href="login.html" class="main-menu__login"><i class="layui-icon layui-icon-username"></i></a>
 | 
				
			||||||
                        <img src="__IMAGES__/avatar.webp" class="layui-circle"
 | 
					 | 
				
			||||||
                            style="width: 40px; height: 40px; cursor: pointer;" id="userAvatarMain">
 | 
					 | 
				
			||||||
                        <div class="user-dropdown" id="userDropdownMain">
 | 
					 | 
				
			||||||
                            <ul>
 | 
					 | 
				
			||||||
                                <li>
 | 
					 | 
				
			||||||
                                    <a href="/index/user/profile"><i
 | 
					 | 
				
			||||||
                                            class="layui-icon layui-icon-user"></i><span>个人中心</span></a>
 | 
					 | 
				
			||||||
                                </li>
 | 
					 | 
				
			||||||
                                <li>
 | 
					 | 
				
			||||||
                                    <a href="/index/user/settings"><i
 | 
					 | 
				
			||||||
                                            class="layui-icon layui-icon-set"></i><span>账号管理</span></a>
 | 
					 | 
				
			||||||
                                </li>
 | 
					 | 
				
			||||||
                                <li>
 | 
					 | 
				
			||||||
                                    <a href="javascript:;" class="logout-btn"><i
 | 
					 | 
				
			||||||
                                            class="layui-icon layui-icon-logout"></i><span>退出登录</span></a>
 | 
					 | 
				
			||||||
                                </li>
 | 
					 | 
				
			||||||
                            </ul>
 | 
					 | 
				
			||||||
                        </div>
 | 
					 | 
				
			||||||
                    </div>
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
@ -114,7 +87,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="{$config['logo1']}" width="150" alt="Logo"></a>
 | 
					            <a href="index.html"><img src="__IMAGES__/logo.png" width="150" alt="Logo"></a>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div class="sticky-nav__menu">
 | 
					        <div class="sticky-nav__menu">
 | 
				
			||||||
            <ul>
 | 
					            <ul>
 | 
				
			||||||
@ -125,199 +98,55 @@
 | 
				
			|||||||
            </ul>
 | 
					            </ul>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div class="sticky-nav__right">
 | 
					        <div class="sticky-nav__right">
 | 
				
			||||||
            <div class="main-menu__right">
 | 
					            <a href="#" class="main-menu__search"><i class="layui-icon layui-icon-search"></i></a>
 | 
				
			||||||
                <div class="layui-inline">
 | 
					            <a href="login.html" class="main-menu__login"><i class="layui-icon layui-icon-username"></i></a>
 | 
				
			||||||
                    <div class="layui-inline" style="position: relative;">
 | 
					 | 
				
			||||||
                        <img src="__IMAGES__/avatar.webp" class="layui-circle"
 | 
					 | 
				
			||||||
                            style="width: 40px; height: 40px; cursor: pointer;" id="userAvatarSticky">
 | 
					 | 
				
			||||||
                        <div class="user-dropdown" id="userDropdownSticky">
 | 
					 | 
				
			||||||
                            <ul>
 | 
					 | 
				
			||||||
                                <li>
 | 
					 | 
				
			||||||
                                    <a href="/index/user/profile"><i
 | 
					 | 
				
			||||||
                                            class="layui-icon layui-icon-user"></i><span>个人中心</span></a>
 | 
					 | 
				
			||||||
                                </li>
 | 
					 | 
				
			||||||
                                <li>
 | 
					 | 
				
			||||||
                                    <a href="/index/user/settings"><i
 | 
					 | 
				
			||||||
                                            class="layui-icon layui-icon-set"></i><span>账号管理</span></a>
 | 
					 | 
				
			||||||
                                </li>
 | 
					 | 
				
			||||||
                                <li>
 | 
					 | 
				
			||||||
                                    <a href="javascript:;" class="logout-btn"><i
 | 
					 | 
				
			||||||
                                            class="layui-icon layui-icon-logout"></i><span>退出登录</span></a>
 | 
					 | 
				
			||||||
                                </li>
 | 
					 | 
				
			||||||
                            </ul>
 | 
					 | 
				
			||||||
                        </div>
 | 
					 | 
				
			||||||
                    </div>
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style>
 | 
					 | 
				
			||||||
    /* 用户头像样式 */
 | 
					 | 
				
			||||||
    #userAvatar {
 | 
					 | 
				
			||||||
        width: 40px;
 | 
					 | 
				
			||||||
        height: 40px;
 | 
					 | 
				
			||||||
        cursor: pointer;
 | 
					 | 
				
			||||||
        transition: all 0.3s ease;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    #userAvatar:hover {
 | 
					 | 
				
			||||||
        transform: scale(1.05);
 | 
					 | 
				
			||||||
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* 下拉菜单容器 */
 | 
					 | 
				
			||||||
    .user-dropdown {
 | 
					 | 
				
			||||||
        position: absolute;
 | 
					 | 
				
			||||||
        top: 50px;
 | 
					 | 
				
			||||||
        right: 0;
 | 
					 | 
				
			||||||
        width: 160px;
 | 
					 | 
				
			||||||
        background: #fff;
 | 
					 | 
				
			||||||
        border-radius: 4px;
 | 
					 | 
				
			||||||
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
 | 
					 | 
				
			||||||
        opacity: 0;
 | 
					 | 
				
			||||||
        visibility: hidden;
 | 
					 | 
				
			||||||
        transform: translateY(-10px);
 | 
					 | 
				
			||||||
        transition: all 0.3s ease;
 | 
					 | 
				
			||||||
        z-index: 9999;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    .user-dropdown.show {
 | 
					 | 
				
			||||||
        opacity: 1;
 | 
					 | 
				
			||||||
        visibility: visible;
 | 
					 | 
				
			||||||
        transform: translateY(0);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* 下拉菜单列表 */
 | 
					 | 
				
			||||||
    .user-dropdown ul {
 | 
					 | 
				
			||||||
        margin: 0;
 | 
					 | 
				
			||||||
        padding: 5px 0;
 | 
					 | 
				
			||||||
        list-style: none;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* 下拉菜单项 */
 | 
					 | 
				
			||||||
    .user-dropdown li {
 | 
					 | 
				
			||||||
        margin: 0;
 | 
					 | 
				
			||||||
        padding: 0;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* 下拉菜单链接 */
 | 
					 | 
				
			||||||
    .user-dropdown li a {
 | 
					 | 
				
			||||||
        display: flex;
 | 
					 | 
				
			||||||
        align-items: center;
 | 
					 | 
				
			||||||
        padding: 10px 15px;
 | 
					 | 
				
			||||||
        color: #333;
 | 
					 | 
				
			||||||
        text-decoration: none;
 | 
					 | 
				
			||||||
        transition: all 0.3s ease;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* 下拉菜单图标 */
 | 
					 | 
				
			||||||
    .user-dropdown li a i {
 | 
					 | 
				
			||||||
        margin-right: 10px;
 | 
					 | 
				
			||||||
        font-size: 16px;
 | 
					 | 
				
			||||||
        color: #666;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* 下拉菜单文字 */
 | 
					 | 
				
			||||||
    .user-dropdown li a span {
 | 
					 | 
				
			||||||
        font-size: 14px;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* 下拉菜单悬停效果 */
 | 
					 | 
				
			||||||
    .user-dropdown li a:hover {
 | 
					 | 
				
			||||||
        background: #f5f5f5;
 | 
					 | 
				
			||||||
        color: #1E9FFF;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    .user-dropdown li a:hover i {
 | 
					 | 
				
			||||||
        color: #1E9FFF;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* 分隔线 */
 | 
					 | 
				
			||||||
    .user-dropdown li:not(:last-child) {
 | 
					 | 
				
			||||||
        border-bottom: 1px solid #f0f0f0;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    .user-dropdown {
 | 
					 | 
				
			||||||
        position: absolute;
 | 
					 | 
				
			||||||
        top: 50px;
 | 
					 | 
				
			||||||
        right: 0;
 | 
					 | 
				
			||||||
        width: 160px;
 | 
					 | 
				
			||||||
        background: #fff;
 | 
					 | 
				
			||||||
        border-radius: 4px;
 | 
					 | 
				
			||||||
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
 | 
					 | 
				
			||||||
        opacity: 0;
 | 
					 | 
				
			||||||
        visibility: hidden;
 | 
					 | 
				
			||||||
        transform: translateY(-10px);
 | 
					 | 
				
			||||||
        transition: all 0.3s ease;
 | 
					 | 
				
			||||||
        z-index: 9999;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    .user-dropdown.show {
 | 
					 | 
				
			||||||
        opacity: 1;
 | 
					 | 
				
			||||||
        visibility: visible;
 | 
					 | 
				
			||||||
        transform: translateY(0);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    #userDropdownSticky a {
 | 
					 | 
				
			||||||
        color: #0d6efd !important;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
</style>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
    layui.use(['carousel', 'form', 'layer'], function () {
 | 
					layui.use(['carousel', 'form'], function(){
 | 
				
			||||||
        var carousel = layui.carousel,
 | 
					  var carousel = layui.carousel
 | 
				
			||||||
            form = layui.form,
 | 
					  ,form = layui.form;
 | 
				
			||||||
            layer = layui.layer,
 | 
					 | 
				
			||||||
            $ = layui.$;
 | 
					 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  //图片轮播
 | 
					  //图片轮播
 | 
				
			||||||
  carousel.render({
 | 
					  carousel.render({
 | 
				
			||||||
            elem: '#test10',
 | 
					    elem: '#test10'
 | 
				
			||||||
            width: '100%',
 | 
					    ,width: '100%'
 | 
				
			||||||
            height: '86vh',
 | 
					    ,height: '86vh'
 | 
				
			||||||
            interval: 4000
 | 
					    ,interval: 4000
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
        $(document).ready(function () {
 | 
					  var $ = layui.$, active = {
 | 
				
			||||||
            // 主导航头像
 | 
					    set: function(othis){
 | 
				
			||||||
            $("#userAvatarMain").click(function (e) {
 | 
					      var THIS = 'layui-bg-normal'
 | 
				
			||||||
                e.stopPropagation();
 | 
					      ,key = othis.data('key')
 | 
				
			||||||
                $("#userDropdownMain").toggleClass("show");
 | 
					      ,options = {};
 | 
				
			||||||
                $("#userDropdownSticky").removeClass("show"); // 保证只显示一个
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
            // 固定导航头像
 | 
					 | 
				
			||||||
            $("#userAvatarSticky").click(function (e) {
 | 
					 | 
				
			||||||
                e.stopPropagation();
 | 
					 | 
				
			||||||
                $("#userDropdownSticky").toggleClass("show");
 | 
					 | 
				
			||||||
                $("#userDropdownMain").removeClass("show"); // 保证只显示一个
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
            // 点击页面其他地方隐藏所有菜单
 | 
					      othis.css('background-color', '#5FB878').siblings().removeAttr('style'); 
 | 
				
			||||||
            $(document).click(function (e) {
 | 
					      options[key] = othis.data('value');
 | 
				
			||||||
                if (!$(e.target).closest('.user-dropdown, #userAvatarMain, #userAvatarSticky').length) {
 | 
					      ins3.reload(options);
 | 
				
			||||||
                    $("#userDropdownMain, #userDropdownSticky").removeClass("show");
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
            });
 | 
					  };
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
            // 点击菜单项时隐藏菜单
 | 
					  //监听开关
 | 
				
			||||||
            $("#userDropdownMain li a, #userDropdownSticky li a").click(function () {
 | 
					  form.on('switch(autoplay)', function(){
 | 
				
			||||||
                $("#userDropdownMain, #userDropdownSticky").removeClass("show");
 | 
					    ins3.reload({
 | 
				
			||||||
 | 
					      autoplay: this.checked
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
        // 退出登录
 | 
					  $('.demoSet').on('keyup', function(){
 | 
				
			||||||
        $('.logout-btn').on('click', function () {
 | 
					    var value = this.value
 | 
				
			||||||
            layer.confirm('确定要退出登录吗?', {
 | 
					    ,options = {};
 | 
				
			||||||
                btn: ['确定', '取消']
 | 
					    if(!/^\d+$/.test(value)) return;
 | 
				
			||||||
            }, function () {
 | 
					    
 | 
				
			||||||
                window.location.href = '/index/user/logout';
 | 
					    options[this.name] = value;
 | 
				
			||||||
            });
 | 
					    ins3.reload(options);
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  // 监听滚动事件
 | 
					  // 监听滚动事件
 | 
				
			||||||
        $(window).scroll(function () {
 | 
					  $(window).scroll(function() {
 | 
				
			||||||
    var scrollTop = $(window).scrollTop();
 | 
					    var scrollTop = $(window).scrollTop();
 | 
				
			||||||
    if (scrollTop > 150) { // 当滚动超过150px时显示固定导航
 | 
					    if (scrollTop > 150) { // 当滚动超过150px时显示固定导航
 | 
				
			||||||
      $('.sticky-nav').fadeIn();
 | 
					      $('.sticky-nav').fadeIn();
 | 
				
			||||||
@ -325,29 +154,5 @@
 | 
				
			|||||||
      $('.sticky-nav').fadeOut();
 | 
					      $('.sticky-nav').fadeOut();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
        // 公众号二维码
 | 
					 | 
				
			||||||
        const trigger = document.querySelector('.qrcode-trigger');
 | 
					 | 
				
			||||||
        const popup = document.querySelector('.qrcode-popup');
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 鼠标移入显示二维码
 | 
					 | 
				
			||||||
        trigger.addEventListener('mouseenter', function () {
 | 
					 | 
				
			||||||
            popup.style.display = 'block';
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 鼠标移出隐藏二维码
 | 
					 | 
				
			||||||
        trigger.addEventListener('mouseleave', function () {
 | 
					 | 
				
			||||||
            popup.style.display = 'none';
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 鼠标移入二维码区域时保持显示
 | 
					 | 
				
			||||||
        popup.addEventListener('mouseenter', function () {
 | 
					 | 
				
			||||||
            popup.style.display = 'block';
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 鼠标移出二维码区域时隐藏
 | 
					 | 
				
			||||||
        popup.addEventListener('mouseleave', function () {
 | 
					 | 
				
			||||||
            popup.style.display = 'none';
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
    });
 | 
					 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
@ -4,19 +4,6 @@ body {
 | 
				
			|||||||
  color: rgb(52, 58, 64);
 | 
					  color: rgb(52, 58, 64);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
a {
 | 
					 | 
				
			||||||
  text-decoration: none !important;
 | 
					 | 
				
			||||||
  color: var(--bs-white) !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
a:hover {
 | 
					 | 
				
			||||||
  color: var(--bs-orange) !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.fas {
 | 
					 | 
				
			||||||
  color: #fff !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/* 字体大小类 */
 | 
					/* 字体大小类 */
 | 
				
			||||||
.f20,
 | 
					.f20,
 | 
				
			||||||
.f-20 {
 | 
					.f-20 {
 | 
				
			||||||
@ -125,13 +112,6 @@ a:hover {
 | 
				
			|||||||
  /* height: 800px; */
 | 
					  /* height: 800px; */
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.topbar-one__social {
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  align-items: center;
 | 
					 | 
				
			||||||
  gap: 10px;
 | 
					 | 
				
			||||||
  justify-content: end;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/* 主导航菜单 */
 | 
					/* 主导航菜单 */
 | 
				
			||||||
.main-menu {
 | 
					.main-menu {
 | 
				
			||||||
  background: #f8f9fa;
 | 
					  background: #f8f9fa;
 | 
				
			||||||
@ -146,18 +126,6 @@ a:hover {
 | 
				
			|||||||
  position: relative;
 | 
					  position: relative;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.main-menu .container a {
 | 
					 | 
				
			||||||
  color: #3492ed !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.main-menu .container a:hover {
 | 
					 | 
				
			||||||
  color: var(--bs-white) !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#userDropdownMain a:hover{
 | 
					 | 
				
			||||||
  color: #0d6efd !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.main-menu__logo {
 | 
					.main-menu__logo {
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  align-items: center;
 | 
					  align-items: center;
 | 
				
			||||||
@ -281,10 +249,6 @@ a:hover {
 | 
				
			|||||||
  position: relative;
 | 
					  position: relative;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.sticky-nav__menu a {
 | 
					 | 
				
			||||||
  color: #212529 !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.sticky-nav__menu ul {
 | 
					.sticky-nav__menu ul {
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  justify-content: center;
 | 
					  justify-content: center;
 | 
				
			||||||
@ -340,10 +304,6 @@ a:hover {
 | 
				
			|||||||
  gap: 20px;
 | 
					  gap: 20px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.topbar-one .container .topbar-one__info a {
 | 
					 | 
				
			||||||
  color: #fff !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.topbar-one .container ul {
 | 
					.topbar-one .container ul {
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  align-items: center;
 | 
					  align-items: center;
 | 
				
			||||||
@ -517,7 +477,7 @@ a:hover {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.introduction .title {
 | 
					.introduction .title {
 | 
				
			||||||
  height: 50px;
 | 
					  height:50px;
 | 
				
			||||||
  font-size: 17px;
 | 
					  font-size: 17px;
 | 
				
			||||||
  font-weight: 500;
 | 
					  font-weight: 500;
 | 
				
			||||||
  color: #404040;
 | 
					  color: #404040;
 | 
				
			||||||
@ -540,8 +500,3 @@ a:hover {
 | 
				
			|||||||
  -webkit-line-clamp: 2;
 | 
					  -webkit-line-clamp: 2;
 | 
				
			||||||
  -webkit-box-orient: vertical;
 | 
					  -webkit-box-orient: vertical;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.layui-layer-btn .layui-layer-btn1 {
 | 
					 | 
				
			||||||
	background: #fff;
 | 
					 | 
				
			||||||
	color: #212529 !important;
 | 
					 | 
				
			||||||
  border: 1px solid #212529;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 27 KiB  | 
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 27 KiB  | 
@ -9051,24 +9051,22 @@ html #layuicss-layer {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.layui-layer-lan .layui-layer-btn .layui-layer-btn1 {
 | 
					.layui-layer-lan .layui-layer-btn .layui-layer-btn1 {
 | 
				
			||||||
	background: #c9c5c5;
 | 
						background: #c9c5c5
 | 
				
			||||||
	/* color: #fff !important; */
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.layui-layer-molv .layui-layer-title {
 | 
					.layui-layer-molv .layui-layer-title {
 | 
				
			||||||
	background: #1b6dfd;
 | 
						background: #009f95;
 | 
				
			||||||
	color: #fff;
 | 
						color: #fff;
 | 
				
			||||||
	border: none
 | 
						border: none
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.layui-layer-molv .layui-layer-btn a {
 | 
					.layui-layer-molv .layui-layer-btn a {
 | 
				
			||||||
	background: #1b6dfd;
 | 
						background: #009f95;
 | 
				
			||||||
	border-color: #1b6dfd
 | 
						border-color: #009f95
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.layui-layer-molv .layui-layer-btn .layui-layer-btn1 {
 | 
					.layui-layer-molv .layui-layer-btn .layui-layer-btn1 {
 | 
				
			||||||
	background: #337efd;
 | 
						background: #92b8b1
 | 
				
			||||||
	/* color: #fff !important; */
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.layui-layer-lan .layui-layer-setwin .layui-icon,
 | 
					.layui-layer-lan .layui-layer-setwin .layui-icon,
 | 
				
			||||||
 | 
				
			|||||||
@ -8485,8 +8485,7 @@ html #layuicss-layer {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.layui-layer-lan .layui-layer-btn .layui-layer-btn1 {
 | 
					.layui-layer-lan .layui-layer-btn .layui-layer-btn1 {
 | 
				
			||||||
	background: #c9c5c5;
 | 
						background: #c9c5c5
 | 
				
			||||||
	/* color: #fff !important; */
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.layui-layer-molv .layui-layer-title {
 | 
					.layui-layer-molv .layui-layer-title {
 | 
				
			||||||
 | 
				
			|||||||
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 27 KiB  | 
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 7.8 KiB  | 
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 16 KiB  | 
@ -1,4 +1,4 @@
 | 
				
			|||||||
<?php /*a:3:{s:65:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzer\configedit.php";i:1746709977;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1746849526;s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\tail.php";i:1746709977;}*/ ?>
 | 
					<?php /*a:3:{s:65:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzer\configedit.php";i:1745482530;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1745500576;s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\tail.php";i:1745482530;}*/ ?>
 | 
				
			||||||
<!DOCTYPE html>
 | 
					<!DOCTYPE html>
 | 
				
			||||||
<html>
 | 
					<html>
 | 
				
			||||||
	<head>
 | 
						<head>
 | 
				
			||||||
@ -6,9 +6,7 @@
 | 
				
			|||||||
		<meta name="renderer" content="webkit">
 | 
							<meta name="renderer" content="webkit">
 | 
				
			||||||
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
 | 
							<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
 | 
				
			||||||
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
 | 
							<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
 | 
				
			||||||
		<link rel="stylesheet" type="text/css" href="/static/layui/css/layui.css" media="all"/>
 | 
							<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.css" media="all"/>
 | 
				
			||||||
		<link rel="stylesheet" type="text/css" href="/static/css/moban.css" media="all"/>
 | 
					 | 
				
			||||||
		<link rel="stylesheet" type="text/css" href="/static/css/wangeditor.css" media="all"/>
 | 
					 | 
				
			||||||
		<style type="text/css">
 | 
							<style type="text/css">
 | 
				
			||||||
			.header span{background:#009688;margin-left:30px;padding:10px;color:#ffffff;}
 | 
								.header span{background:#009688;margin-left:30px;padding:10px;color:#ffffff;}
 | 
				
			||||||
			.header div{border-bottom:solid 2px #009688;margin-top: 8px;}
 | 
								.header div{border-bottom:solid 2px #009688;margin-top: 8px;}
 | 
				
			||||||
@ -79,7 +77,7 @@
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
			.close-img { background: url(/static/images/close_img.png); background-size: 20px 20px; width:20px; height: 20px; position: absolute; right: 5px; top: 5px; z-index: 2;}
 | 
								.close-img { background: url(/static/images/close_img.png); background-size: 20px 20px; width:20px; height: 20px; position: absolute; right: 5px; top: 5px; z-index: 2;}
 | 
				
			||||||
		</style>
 | 
							</style>
 | 
				
			||||||
		<script type="text/javascript" src="/static/layui/layui.js"></script>
 | 
							<script type="text/javascript" src="/static/third/layui/layui.js"></script>
 | 
				
			||||||
		<script type="text/javascript">
 | 
							<script type="text/javascript">
 | 
				
			||||||
			layui.use(['layer','form','table','laydate','element','upload'],function(){
 | 
								layui.use(['layer','form','table','laydate','element','upload'],function(){
 | 
				
			||||||
				layer = layui.layer;		// layui 弹框
 | 
									layer = layui.layer;		// layui 弹框
 | 
				
			||||||
 | 
				
			|||||||
@ -1,170 +0,0 @@
 | 
				
			|||||||
<?php /*a:3:{s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzer\configadd.php";i:1746709977;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1746849526;s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\tail.php";i:1746709977;}*/ ?>
 | 
					 | 
				
			||||||
<!DOCTYPE html>
 | 
					 | 
				
			||||||
<html>
 | 
					 | 
				
			||||||
	<head>
 | 
					 | 
				
			||||||
		<title><?php echo htmlentities((string) $config['admin_name']); ?></title>
 | 
					 | 
				
			||||||
		<meta name="renderer" content="webkit">
 | 
					 | 
				
			||||||
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
 | 
					 | 
				
			||||||
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
 | 
					 | 
				
			||||||
		<link rel="stylesheet" type="text/css" href="/static/layui/css/layui.css" media="all"/>
 | 
					 | 
				
			||||||
		<link rel="stylesheet" type="text/css" href="/static/css/moban.css" media="all"/>
 | 
					 | 
				
			||||||
		<link rel="stylesheet" type="text/css" href="/static/css/wangeditor.css" media="all"/>
 | 
					 | 
				
			||||||
		<style type="text/css">
 | 
					 | 
				
			||||||
			.header span{background:#009688;margin-left:30px;padding:10px;color:#ffffff;}
 | 
					 | 
				
			||||||
			.header div{border-bottom:solid 2px #009688;margin-top: 8px;}
 | 
					 | 
				
			||||||
			.header button{float:right;margin-top:-5px;}
 | 
					 | 
				
			||||||
			.pagination {
 | 
					 | 
				
			||||||
				display: inline-block;
 | 
					 | 
				
			||||||
				padding-left: 0;
 | 
					 | 
				
			||||||
				margin: 20px 0;
 | 
					 | 
				
			||||||
				border-radius: 4px;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			.pagination > li {
 | 
					 | 
				
			||||||
				display: inline;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			.pagination > li > a,
 | 
					 | 
				
			||||||
			.pagination > li > span {
 | 
					 | 
				
			||||||
				position: relative;
 | 
					 | 
				
			||||||
				float: left;
 | 
					 | 
				
			||||||
				padding: 6px 12px;
 | 
					 | 
				
			||||||
				margin-left: -1px;
 | 
					 | 
				
			||||||
				line-height: 1.42857143;
 | 
					 | 
				
			||||||
				color: #337ab7;
 | 
					 | 
				
			||||||
				text-decoration: none;
 | 
					 | 
				
			||||||
				background-color: #fff;
 | 
					 | 
				
			||||||
				border: 1px solid #ddd;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			.pagination > li:first-child > a,
 | 
					 | 
				
			||||||
			.pagination > li:first-child > span {
 | 
					 | 
				
			||||||
				margin-left: 0;
 | 
					 | 
				
			||||||
				border-top-left-radius: 4px;
 | 
					 | 
				
			||||||
				border-bottom-left-radius: 4px;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			.pagination > li:last-child > a,
 | 
					 | 
				
			||||||
			.pagination > li:last-child > span {
 | 
					 | 
				
			||||||
				border-top-right-radius: 4px;
 | 
					 | 
				
			||||||
				border-bottom-right-radius: 4px;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			.pagination > li > a:hover,
 | 
					 | 
				
			||||||
			.pagination > li > span:hover,
 | 
					 | 
				
			||||||
			.pagination > li > a:focus,
 | 
					 | 
				
			||||||
			.pagination > li > span:focus {
 | 
					 | 
				
			||||||
				z-index: 2;
 | 
					 | 
				
			||||||
				color: #23527c;
 | 
					 | 
				
			||||||
				background-color: #eee;
 | 
					 | 
				
			||||||
				border-color: #ddd;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			.pagination > .active > a,
 | 
					 | 
				
			||||||
			.pagination > .active > span,
 | 
					 | 
				
			||||||
			.pagination > .active > a:hover,
 | 
					 | 
				
			||||||
			.pagination > .active > span:hover,
 | 
					 | 
				
			||||||
			.pagination > .active > a:focus,
 | 
					 | 
				
			||||||
			.pagination > .active > span:focus {
 | 
					 | 
				
			||||||
				z-index: 3;
 | 
					 | 
				
			||||||
				color: #fff;
 | 
					 | 
				
			||||||
				cursor: default;
 | 
					 | 
				
			||||||
				background-color: #337ab7;
 | 
					 | 
				
			||||||
				border-color: #337ab7;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			.pagination > .disabled > span,
 | 
					 | 
				
			||||||
			.pagination > .disabled > span:hover,
 | 
					 | 
				
			||||||
			.pagination > .disabled > span:focus,
 | 
					 | 
				
			||||||
			.pagination > .disabled > a,
 | 
					 | 
				
			||||||
			.pagination > .disabled > a:hover,
 | 
					 | 
				
			||||||
			.pagination > .disabled > a:focus {
 | 
					 | 
				
			||||||
				color: #777;
 | 
					 | 
				
			||||||
				cursor: not-allowed;
 | 
					 | 
				
			||||||
				background-color: #fff;
 | 
					 | 
				
			||||||
				border-color: #ddd;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			.close-img { background: url(/static/images/close_img.png); background-size: 20px 20px; width:20px; height: 20px; position: absolute; right: 5px; top: 5px; z-index: 2;}
 | 
					 | 
				
			||||||
		</style>
 | 
					 | 
				
			||||||
		<script type="text/javascript" src="/static/layui/layui.js"></script>
 | 
					 | 
				
			||||||
		<script type="text/javascript">
 | 
					 | 
				
			||||||
			layui.use(['layer','form','table','laydate','element','upload'],function(){
 | 
					 | 
				
			||||||
				layer = layui.layer;		// layui 弹框
 | 
					 | 
				
			||||||
				form = layui.form;			// layui form表单
 | 
					 | 
				
			||||||
				table = layui.table;		// layui 表格
 | 
					 | 
				
			||||||
				laydate = layui.laydate;	// layui 时间框
 | 
					 | 
				
			||||||
				element = layui.element;	// layui element
 | 
					 | 
				
			||||||
				upload = layui.upload;		// layui 上传
 | 
					 | 
				
			||||||
				$ = layui.jquery;			// layui jquery
 | 
					 | 
				
			||||||
			})
 | 
					 | 
				
			||||||
		</script>
 | 
					 | 
				
			||||||
	</head>
 | 
					 | 
				
			||||||
	<body style="padding:10px; box-sizing: border-box;">
 | 
					 | 
				
			||||||
<form class="layui-form">
 | 
					 | 
				
			||||||
	<div class="layui-form-item">
 | 
					 | 
				
			||||||
		<label class="layui-form-label">关键词</label>
 | 
					 | 
				
			||||||
		<div class="layui-input-block">
 | 
					 | 
				
			||||||
			<input type="text" class="layui-input" id="config_name" name="config_name" placeholder="请输入关键词,在代码中的key">
 | 
					 | 
				
			||||||
		</div>
 | 
					 | 
				
			||||||
	</div>
 | 
					 | 
				
			||||||
	<div class="layui-form-item">
 | 
					 | 
				
			||||||
		<label class="layui-form-label">作用</label>
 | 
					 | 
				
			||||||
		<div class="layui-input-block">
 | 
					 | 
				
			||||||
			<input type="text" class="layui-input" id="config_info" name="config_info" placeholder="请输入作用">
 | 
					 | 
				
			||||||
		</div>
 | 
					 | 
				
			||||||
	</div>
 | 
					 | 
				
			||||||
	<div class="layui-form-item">
 | 
					 | 
				
			||||||
		<label class="layui-form-label">类型</label>
 | 
					 | 
				
			||||||
		<div class="layui-input-block">
 | 
					 | 
				
			||||||
			<select id="config_type" name="config_type" lay-filter="config_type">
 | 
					 | 
				
			||||||
				<option value="1" selected>文本</option>
 | 
					 | 
				
			||||||
				<option value="2">图片</option>
 | 
					 | 
				
			||||||
				<option value="3">富文本</option>
 | 
					 | 
				
			||||||
			</select>
 | 
					 | 
				
			||||||
		</div>
 | 
					 | 
				
			||||||
	</div>
 | 
					 | 
				
			||||||
	<div class="layui-form-item">
 | 
					 | 
				
			||||||
		<label class="layui-form-label">说明</label>
 | 
					 | 
				
			||||||
		<div class="layui-input-block">
 | 
					 | 
				
			||||||
			<input type="text" class="layui-input" id="config_desc" name="config_desc" placeholder="请输入说明">
 | 
					 | 
				
			||||||
		</div>
 | 
					 | 
				
			||||||
	</div>
 | 
					 | 
				
			||||||
	<div class="layui-form-item">
 | 
					 | 
				
			||||||
		<label class="layui-form-label">排序</label>
 | 
					 | 
				
			||||||
		<div class="layui-input-block">
 | 
					 | 
				
			||||||
			<input type="number" class="layui-input" id="config_sort" name="config_sort" placeholder="请输入排序,值越大,越靠前" value="0">
 | 
					 | 
				
			||||||
		</div>
 | 
					 | 
				
			||||||
	</div>
 | 
					 | 
				
			||||||
	<div class="layui-form-item">
 | 
					 | 
				
			||||||
		<label class="layui-form-label">状态</label>
 | 
					 | 
				
			||||||
		<div class="layui-input-block">
 | 
					 | 
				
			||||||
			<select id="config_status" name="config_status" lay-filter="config_status">
 | 
					 | 
				
			||||||
				<option value="1" selected>开启</option>
 | 
					 | 
				
			||||||
				<option value="0">禁用</option>
 | 
					 | 
				
			||||||
			</select>
 | 
					 | 
				
			||||||
		</div>
 | 
					 | 
				
			||||||
	</div>
 | 
					 | 
				
			||||||
</form>
 | 
					 | 
				
			||||||
	</body>
 | 
					 | 
				
			||||||
</html>
 | 
					 | 
				
			||||||
<script type="text/javascript">
 | 
					 | 
				
			||||||
	// 显示图片
 | 
					 | 
				
			||||||
	function show_img(obj){
 | 
					 | 
				
			||||||
		var imgurl = $(obj).attr('src');
 | 
					 | 
				
			||||||
		var res = getMousePos();
 | 
					 | 
				
			||||||
		var html = '<div style="background:#fff;position:absolute;width:200px;border:solid 1px #cdcdcd;border-radius:6px;padding:2px;left:'+res.x+'px;top:'+res.y+'px;z-index:1000" id="preview">\
 | 
					 | 
				
			||||||
				<img style="width:100%;border-radius:6px;" src="'+imgurl+'">\
 | 
					 | 
				
			||||||
			</div>';
 | 
					 | 
				
			||||||
		$('body').append(html);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	// 隐藏图片
 | 
					 | 
				
			||||||
	function hide_img(){
 | 
					 | 
				
			||||||
		$('#preview').remove();
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	// 图片位置计算
 | 
					 | 
				
			||||||
	function getMousePos(event) {
 | 
					 | 
				
			||||||
		var e = event || window.event;
 | 
					 | 
				
			||||||
		var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
 | 
					 | 
				
			||||||
		var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
 | 
					 | 
				
			||||||
		var x = e.pageX || e.clientX + scrollX;
 | 
					 | 
				
			||||||
		var y = e.pageY || e.clientY + scrollY;
 | 
					 | 
				
			||||||
		return { 'x': x, 'y': y };
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	// 删除图片
 | 
					 | 
				
			||||||
	function deleteImage(path,obj){
 | 
					 | 
				
			||||||
		$(obj).closest('.upload_pic_li').remove();
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
<?php /*a:3:{s:66:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzer\configvalue.php";i:1747361534;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1746849526;s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\tail.php";i:1746709977;}*/ ?>
 | 
					<?php /*a:3:{s:66:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzer\configvalue.php";i:1746709977;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1746849526;s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\tail.php";i:1746709977;}*/ ?>
 | 
				
			||||||
<!DOCTYPE html>
 | 
					<!DOCTYPE html>
 | 
				
			||||||
<html>
 | 
					<html>
 | 
				
			||||||
	<head>
 | 
						<head>
 | 
				
			||||||
@ -215,7 +215,7 @@
 | 
				
			|||||||
                        <div class="layui-upload-list upload-preview" id="yulan_<?php echo htmlentities((string) $lists_v['config_name']); ?>" style="width:90%;">
 | 
					                        <div class="layui-upload-list upload-preview" id="yulan_<?php echo htmlentities((string) $lists_v['config_name']); ?>" style="width:90%;">
 | 
				
			||||||
                            <?php if(!empty($lists_v['config_value'])): ?>
 | 
					                            <?php if(!empty($lists_v['config_value'])): ?>
 | 
				
			||||||
                                <div class="upload_pic_li" style="position:relative;width:120px;margin:0 10px 10px 0">
 | 
					                                <div class="upload_pic_li" style="position:relative;width:120px;margin:0 10px 10px 0">
 | 
				
			||||||
                                    <img style="background-color: #efefef;height:120px;object-fit:cover;" src="<?php echo htmlentities((string) $lists_v['config_value']); ?>" class="layui-upload-img" onmouseover="show_img(this)" onmouseleave="hide_img()">
 | 
					                                    <img style="height:120px;object-fit:cover;" src="<?php echo htmlentities((string) $lists_v['config_value']); ?>" class="layui-upload-img" onmouseover="show_img(this)" onmouseleave="hide_img()">
 | 
				
			||||||
                                    <input type="hidden" name="<?php echo htmlentities((string) $lists_v['config_name']); ?>" value="<?php echo htmlentities((string) $lists_v['config_value']); ?>"/>
 | 
					                                    <input type="hidden" name="<?php echo htmlentities((string) $lists_v['config_name']); ?>" value="<?php echo htmlentities((string) $lists_v['config_value']); ?>"/>
 | 
				
			||||||
                                </div>
 | 
					                                </div>
 | 
				
			||||||
                            <?php endif; ?>
 | 
					                            <?php endif; ?>
 | 
				
			||||||
 | 
				
			|||||||
@ -1,379 +0,0 @@
 | 
				
			|||||||
<?php /*a:2:{s:60:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\article\edit.php";i:1746841528;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1746849526;}*/ ?>
 | 
					 | 
				
			||||||
<!DOCTYPE html>
 | 
					 | 
				
			||||||
<html>
 | 
					 | 
				
			||||||
	<head>
 | 
					 | 
				
			||||||
		<title><?php echo htmlentities((string) $config['admin_name']); ?></title>
 | 
					 | 
				
			||||||
		<meta name="renderer" content="webkit">
 | 
					 | 
				
			||||||
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
 | 
					 | 
				
			||||||
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
 | 
					 | 
				
			||||||
		<link rel="stylesheet" type="text/css" href="/static/layui/css/layui.css" media="all"/>
 | 
					 | 
				
			||||||
		<link rel="stylesheet" type="text/css" href="/static/css/moban.css" media="all"/>
 | 
					 | 
				
			||||||
		<link rel="stylesheet" type="text/css" href="/static/css/wangeditor.css" media="all"/>
 | 
					 | 
				
			||||||
		<style type="text/css">
 | 
					 | 
				
			||||||
			.header span{background:#009688;margin-left:30px;padding:10px;color:#ffffff;}
 | 
					 | 
				
			||||||
			.header div{border-bottom:solid 2px #009688;margin-top: 8px;}
 | 
					 | 
				
			||||||
			.header button{float:right;margin-top:-5px;}
 | 
					 | 
				
			||||||
			.pagination {
 | 
					 | 
				
			||||||
				display: inline-block;
 | 
					 | 
				
			||||||
				padding-left: 0;
 | 
					 | 
				
			||||||
				margin: 20px 0;
 | 
					 | 
				
			||||||
				border-radius: 4px;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			.pagination > li {
 | 
					 | 
				
			||||||
				display: inline;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			.pagination > li > a,
 | 
					 | 
				
			||||||
			.pagination > li > span {
 | 
					 | 
				
			||||||
				position: relative;
 | 
					 | 
				
			||||||
				float: left;
 | 
					 | 
				
			||||||
				padding: 6px 12px;
 | 
					 | 
				
			||||||
				margin-left: -1px;
 | 
					 | 
				
			||||||
				line-height: 1.42857143;
 | 
					 | 
				
			||||||
				color: #337ab7;
 | 
					 | 
				
			||||||
				text-decoration: none;
 | 
					 | 
				
			||||||
				background-color: #fff;
 | 
					 | 
				
			||||||
				border: 1px solid #ddd;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			.pagination > li:first-child > a,
 | 
					 | 
				
			||||||
			.pagination > li:first-child > span {
 | 
					 | 
				
			||||||
				margin-left: 0;
 | 
					 | 
				
			||||||
				border-top-left-radius: 4px;
 | 
					 | 
				
			||||||
				border-bottom-left-radius: 4px;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			.pagination > li:last-child > a,
 | 
					 | 
				
			||||||
			.pagination > li:last-child > span {
 | 
					 | 
				
			||||||
				border-top-right-radius: 4px;
 | 
					 | 
				
			||||||
				border-bottom-right-radius: 4px;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			.pagination > li > a:hover,
 | 
					 | 
				
			||||||
			.pagination > li > span:hover,
 | 
					 | 
				
			||||||
			.pagination > li > a:focus,
 | 
					 | 
				
			||||||
			.pagination > li > span:focus {
 | 
					 | 
				
			||||||
				z-index: 2;
 | 
					 | 
				
			||||||
				color: #23527c;
 | 
					 | 
				
			||||||
				background-color: #eee;
 | 
					 | 
				
			||||||
				border-color: #ddd;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			.pagination > .active > a,
 | 
					 | 
				
			||||||
			.pagination > .active > span,
 | 
					 | 
				
			||||||
			.pagination > .active > a:hover,
 | 
					 | 
				
			||||||
			.pagination > .active > span:hover,
 | 
					 | 
				
			||||||
			.pagination > .active > a:focus,
 | 
					 | 
				
			||||||
			.pagination > .active > span:focus {
 | 
					 | 
				
			||||||
				z-index: 3;
 | 
					 | 
				
			||||||
				color: #fff;
 | 
					 | 
				
			||||||
				cursor: default;
 | 
					 | 
				
			||||||
				background-color: #337ab7;
 | 
					 | 
				
			||||||
				border-color: #337ab7;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			.pagination > .disabled > span,
 | 
					 | 
				
			||||||
			.pagination > .disabled > span:hover,
 | 
					 | 
				
			||||||
			.pagination > .disabled > span:focus,
 | 
					 | 
				
			||||||
			.pagination > .disabled > a,
 | 
					 | 
				
			||||||
			.pagination > .disabled > a:hover,
 | 
					 | 
				
			||||||
			.pagination > .disabled > a:focus {
 | 
					 | 
				
			||||||
				color: #777;
 | 
					 | 
				
			||||||
				cursor: not-allowed;
 | 
					 | 
				
			||||||
				background-color: #fff;
 | 
					 | 
				
			||||||
				border-color: #ddd;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			.close-img { background: url(/static/images/close_img.png); background-size: 20px 20px; width:20px; height: 20px; position: absolute; right: 5px; top: 5px; z-index: 2;}
 | 
					 | 
				
			||||||
		</style>
 | 
					 | 
				
			||||||
		<script type="text/javascript" src="/static/layui/layui.js"></script>
 | 
					 | 
				
			||||||
		<script type="text/javascript">
 | 
					 | 
				
			||||||
			layui.use(['layer','form','table','laydate','element','upload'],function(){
 | 
					 | 
				
			||||||
				layer = layui.layer;		// layui 弹框
 | 
					 | 
				
			||||||
				form = layui.form;			// layui form表单
 | 
					 | 
				
			||||||
				table = layui.table;		// layui 表格
 | 
					 | 
				
			||||||
				laydate = layui.laydate;	// layui 时间框
 | 
					 | 
				
			||||||
				element = layui.element;	// layui element
 | 
					 | 
				
			||||||
				upload = layui.upload;		// layui 上传
 | 
					 | 
				
			||||||
				$ = layui.jquery;			// layui jquery
 | 
					 | 
				
			||||||
			})
 | 
					 | 
				
			||||||
		</script>
 | 
					 | 
				
			||||||
	</head>
 | 
					 | 
				
			||||||
	<body style="padding:10px; box-sizing: border-box;">
 | 
					 | 
				
			||||||
<div class="config-container">
 | 
					 | 
				
			||||||
    <div class="config-header" style="display:flex;justify-content: space-between;">
 | 
					 | 
				
			||||||
        <div>
 | 
					 | 
				
			||||||
            <span>编辑文章</span>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
        <div>
 | 
					 | 
				
			||||||
            <button type="button" class="layui-btn layui-btn-primary layui-btn-sm" onclick="goBack()">
 | 
					 | 
				
			||||||
                <i class="layui-icon layui-icon-return"></i>返回
 | 
					 | 
				
			||||||
            </button>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
    <form class="layui-form" action="" method="post">
 | 
					 | 
				
			||||||
        <div class="layui-form-item">
 | 
					 | 
				
			||||||
            <label class="layui-form-label">标题</label>
 | 
					 | 
				
			||||||
            <div class="layui-input-block">
 | 
					 | 
				
			||||||
                <input type="text" name="title" required lay-verify="required" placeholder="请输入文章标题" autocomplete="off"
 | 
					 | 
				
			||||||
                    class="layui-input" value="<?php echo htmlentities((string) $info['title']); ?>">
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <div class="layui-form-item">
 | 
					 | 
				
			||||||
            <label class="layui-form-label">分类</label>
 | 
					 | 
				
			||||||
            <div class="layui-input-block">
 | 
					 | 
				
			||||||
                <select name="cate" lay-verify="required">
 | 
					 | 
				
			||||||
                    <option value="">请选择分类</option>
 | 
					 | 
				
			||||||
                    <?php foreach($cates as $item): ?>
 | 
					 | 
				
			||||||
                    <option value="<?php echo htmlentities((string) $item['id']); ?>" <?php if($info['cate']==$item['id']): ?>selected<?php endif; ?>><?php echo htmlentities((string) $item['name']); ?></option>
 | 
					 | 
				
			||||||
                    <?php endforeach; ?>
 | 
					 | 
				
			||||||
                </select>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <div class="layui-form-item">
 | 
					 | 
				
			||||||
            <label class="layui-form-label">描述</label>
 | 
					 | 
				
			||||||
            <div class="layui-input-block">
 | 
					 | 
				
			||||||
                <textarea name="desc" placeholder="请输入描述内容" class="layui-textarea"><?php echo htmlentities((string) $info['desc']); ?></textarea>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <div class="layui-form-item">
 | 
					 | 
				
			||||||
            <label class="layui-form-label">作者</label>
 | 
					 | 
				
			||||||
            <div class="layui-input-block">
 | 
					 | 
				
			||||||
                <input type="text" name="author" required lay-verify="required" placeholder="请输入作者" autocomplete="off"
 | 
					 | 
				
			||||||
                    class="layui-input" value="<?php echo htmlentities((string) $info['author']); ?>">
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <div class="layui-form-item">
 | 
					 | 
				
			||||||
            <label class="layui-form-label">封面</label>
 | 
					 | 
				
			||||||
            <div class="layui-input-block">
 | 
					 | 
				
			||||||
                <button type="button" class="layui-btn" id="upload-btn">
 | 
					 | 
				
			||||||
                    <i class="layui-icon layui-icon-upload"></i> 图片上传
 | 
					 | 
				
			||||||
                </button>
 | 
					 | 
				
			||||||
                <div style="width: 120px;">
 | 
					 | 
				
			||||||
                    <div class="layui-upload-list">
 | 
					 | 
				
			||||||
                        <img class="layui-upload-img" id="upload-img"
 | 
					 | 
				
			||||||
                            style="width: 118px; height: 118px;object-fit: cover;" src="<?php echo htmlentities((string) $info['image']); ?>">
 | 
					 | 
				
			||||||
                        <div id="upload-text"></div>
 | 
					 | 
				
			||||||
                    </div>
 | 
					 | 
				
			||||||
                    <div class="layui-progress layui-progress-big" lay-showPercent="yes" lay-filter="filter-demo">
 | 
					 | 
				
			||||||
                        <div class="layui-progress-bar" lay-percent=""></div>
 | 
					 | 
				
			||||||
                    </div>
 | 
					 | 
				
			||||||
                    <input type="hidden" name="image" id="image" value="<?php echo htmlentities((string) $info['image']); ?>">
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <div class="layui-form-item layui-form-text">
 | 
					 | 
				
			||||||
            <label class="layui-form-label">内容</label>
 | 
					 | 
				
			||||||
            <div class="layui-input-block">
 | 
					 | 
				
			||||||
                <div id="editor—wrapper" id="content" name="content" style="border: 1px solid #ccc;">
 | 
					 | 
				
			||||||
                    <div id="toolbar-container" style="border-bottom: 1px solid #ccc;"><!-- 工具栏 --></div>
 | 
					 | 
				
			||||||
                    <div id="editor-container" style="height: 800px;"><!-- 编辑器 --></div>
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <div class="layui-form-item">
 | 
					 | 
				
			||||||
            <div class="layui-input-block">
 | 
					 | 
				
			||||||
                <button class="layui-btn" lay-submit lay-filter="formSubmit">立即提交</button>
 | 
					 | 
				
			||||||
                <button class="layui-btn layui-btn-primary" lay-submit lay-filter="formDraft">存草稿</button>
 | 
					 | 
				
			||||||
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
    </form>
 | 
					 | 
				
			||||||
</div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<script src="/static/js/wangeditor.js"></script>
 | 
					 | 
				
			||||||
<script>
 | 
					 | 
				
			||||||
    layui.use(['form', 'layer'], function () {
 | 
					 | 
				
			||||||
        var form = layui.form;
 | 
					 | 
				
			||||||
        var layer = layui.layer;
 | 
					 | 
				
			||||||
        var $ = layui.jquery;
 | 
					 | 
				
			||||||
        var upload = layui.upload;
 | 
					 | 
				
			||||||
        var element = layui.element;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 图片上传
 | 
					 | 
				
			||||||
        var uploadInst = upload.render({
 | 
					 | 
				
			||||||
            elem: '#upload-btn',
 | 
					 | 
				
			||||||
            url: '<?php echo url("index/upload_img"); ?>', // 上传图片接口
 | 
					 | 
				
			||||||
            before: function (obj) {
 | 
					 | 
				
			||||||
                // 预读本地文件示例,不支持ie8
 | 
					 | 
				
			||||||
                obj.preview(function (index, file, result) {
 | 
					 | 
				
			||||||
                    $('#upload-img').attr('src', result); // 图片链接(base64)
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
                element.progress('filter-demo', '0%'); // 进度条复位
 | 
					 | 
				
			||||||
                layer.msg('上传中', { icon: 16, time: 0 });
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            done: function (res) {
 | 
					 | 
				
			||||||
                // 若上传失败
 | 
					 | 
				
			||||||
                if (res.code > 0) {
 | 
					 | 
				
			||||||
                    return layer.msg('上传失败');
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                // 上传成功
 | 
					 | 
				
			||||||
                $('#image').val(res.data); // 设置图片路径到隐藏输入框
 | 
					 | 
				
			||||||
                $('#upload-text').html(''); // 置空上传失败的状态
 | 
					 | 
				
			||||||
                layer.msg('上传成功', { icon: 1 });
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            uploadError: function () {  // 这里改为 uploadError
 | 
					 | 
				
			||||||
                // 演示失败状态,并实现重传
 | 
					 | 
				
			||||||
                var demoText = $('#upload-text');
 | 
					 | 
				
			||||||
                demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
 | 
					 | 
				
			||||||
                demoText.find('.demo-reload').on('click', function () {
 | 
					 | 
				
			||||||
                    uploadInst.upload();
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            // 进度条
 | 
					 | 
				
			||||||
            progress: function (n, elem, e) {
 | 
					 | 
				
			||||||
                element.progress('filter-demo', n + '%'); // 可配合 layui 进度条元素使用
 | 
					 | 
				
			||||||
                if (n == 100) {
 | 
					 | 
				
			||||||
                    layer.msg('上传完毕', { icon: 1 });
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 获取分类列表
 | 
					 | 
				
			||||||
        $.get('<?php echo url("article/getcate"); ?>', function (res) {
 | 
					 | 
				
			||||||
            if (res.code == 0) {
 | 
					 | 
				
			||||||
                var html = '<option value="">请选择分类</option>';
 | 
					 | 
				
			||||||
                res.data.forEach(function (item) {
 | 
					 | 
				
			||||||
                    // 如果cid为0,则设置为禁用
 | 
					 | 
				
			||||||
                    var disabled = item.cid == 0 ? 'disabled' : '';
 | 
					 | 
				
			||||||
                    var selected = item.id == '<?php echo htmlentities((string) $info['cate']); ?>' ? 'selected' : '';
 | 
					 | 
				
			||||||
                    html += '<option value="' + item.id + '" ' + disabled + ' ' + selected + '>' + item.name + '</option>';
 | 
					 | 
				
			||||||
                    // 如果有子分类,添加子分类选项
 | 
					 | 
				
			||||||
                    if (item.children && item.children.length > 0) {
 | 
					 | 
				
			||||||
                        item.children.forEach(function (child) {
 | 
					 | 
				
			||||||
                            var childSelected = child.id == '<?php echo htmlentities((string) $info['cate']); ?>' ? 'selected' : '';
 | 
					 | 
				
			||||||
                            html += '<option value="' + child.id + '" ' + childSelected + '>├─ ' + child.name + '</option>';
 | 
					 | 
				
			||||||
                        });
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
                $('select[name="cate"]').html(html);
 | 
					 | 
				
			||||||
                form.render('select');
 | 
					 | 
				
			||||||
            } else {
 | 
					 | 
				
			||||||
                layer.msg(res.msg, { icon: 2 });
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 表单提交
 | 
					 | 
				
			||||||
        form.on('submit(formSubmit)', function (data) {
 | 
					 | 
				
			||||||
            // 获取编辑器内容
 | 
					 | 
				
			||||||
            var content = editor.getHtml();
 | 
					 | 
				
			||||||
            if (!content || content === '<p><br></p>') {
 | 
					 | 
				
			||||||
                layer.msg('请输入文章内容', { icon: 2 });
 | 
					 | 
				
			||||||
                return false;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            var loadIndex = layer.load(2);
 | 
					 | 
				
			||||||
            data.field.content = content;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            $.ajax({
 | 
					 | 
				
			||||||
                url: '<?php echo url("article/edit"); ?>?id=<?php echo htmlentities((string) $info['id']); ?>',
 | 
					 | 
				
			||||||
                type: 'POST',
 | 
					 | 
				
			||||||
                data: data.field,
 | 
					 | 
				
			||||||
                success: function (res) {
 | 
					 | 
				
			||||||
                    layer.close(loadIndex);
 | 
					 | 
				
			||||||
                    if (res.code == 0) {
 | 
					 | 
				
			||||||
                        layer.msg(res.msg, { icon: 1 });
 | 
					 | 
				
			||||||
                        setTimeout(function () {
 | 
					 | 
				
			||||||
                            window.location.href = '<?php echo url("article/articlelist"); ?>';
 | 
					 | 
				
			||||||
                        }, 1000);
 | 
					 | 
				
			||||||
                    } else {
 | 
					 | 
				
			||||||
                        layer.msg(res.msg, { icon: 2 });
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
            return false;
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 返回上一页
 | 
					 | 
				
			||||||
        function goBack() {
 | 
					 | 
				
			||||||
            var index = parent.layer.getFrameIndex(window.name);
 | 
					 | 
				
			||||||
            parent.layer.close(index);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<!-- wangeditor编辑器脚本 -->
 | 
					 | 
				
			||||||
<script>
 | 
					 | 
				
			||||||
    const { createEditor, createToolbar } = window.wangEditor
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    const editorConfig = { 
 | 
					 | 
				
			||||||
        MENU_CONF: {},
 | 
					 | 
				
			||||||
        placeholder: '请输入内容...',
 | 
					 | 
				
			||||||
        onChange(editor) {
 | 
					 | 
				
			||||||
            const html = editor.getHtml()
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // 配置图片上传
 | 
					 | 
				
			||||||
    editorConfig.MENU_CONF['uploadImage'] = {
 | 
					 | 
				
			||||||
        server: '<?php echo url("index/upload_imgs"); ?>',
 | 
					 | 
				
			||||||
        fieldName: 'file',
 | 
					 | 
				
			||||||
        maxFileSize: 10 * 1024 * 1024, // 10M
 | 
					 | 
				
			||||||
        maxNumberOfFiles: 10,
 | 
					 | 
				
			||||||
        allowedFileTypes: ['image/*'],
 | 
					 | 
				
			||||||
        meta: {
 | 
					 | 
				
			||||||
            token: 'xxx'
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        metaWithUrl: true,
 | 
					 | 
				
			||||||
        headers: {
 | 
					 | 
				
			||||||
            Accept: 'text/x-json'
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        timeout: 5 * 1000, // 5s
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        onBeforeUpload(file) {
 | 
					 | 
				
			||||||
            console.log('准备上传图片', file)
 | 
					 | 
				
			||||||
            return file
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        onProgress(progress) {
 | 
					 | 
				
			||||||
            console.log('上传进度', progress)
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        onSuccess(file, res) {
 | 
					 | 
				
			||||||
            console.log('上传成功', file, res)
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        onFailed(file, res) {
 | 
					 | 
				
			||||||
            layer.msg('上传失败:' + res.msg, { icon: 2 })
 | 
					 | 
				
			||||||
            console.log('上传失败', file, res)
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        onError(file, err, res) {
 | 
					 | 
				
			||||||
            layer.msg('上传出错:' + err.message, { icon: 2 })
 | 
					 | 
				
			||||||
            console.error('上传出错', file, err, res)
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        customInsert(res, insertFn) {
 | 
					 | 
				
			||||||
            // res 即服务端的返回结果
 | 
					 | 
				
			||||||
            if (res.code === 0 && res.data) {
 | 
					 | 
				
			||||||
                // 从res.data中获取src字段
 | 
					 | 
				
			||||||
                const url = String(res.data.src || '');
 | 
					 | 
				
			||||||
                if (url) {
 | 
					 | 
				
			||||||
                    insertFn(url);
 | 
					 | 
				
			||||||
                } else {
 | 
					 | 
				
			||||||
                    layer.msg('图片地址无效', { icon: 2 });
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            } else {
 | 
					 | 
				
			||||||
                layer.msg('图片上传失败', { icon: 2 });
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    const editor = createEditor({
 | 
					 | 
				
			||||||
        selector: '#editor-container',
 | 
					 | 
				
			||||||
        html: `<?php echo (isset($info['content']) && ($info['content'] !== '')?$info['content']:''); ?>`,
 | 
					 | 
				
			||||||
        config: editorConfig,
 | 
					 | 
				
			||||||
        mode: 'default', // or 'simple'
 | 
					 | 
				
			||||||
    })
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    const toolbarConfig = {}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    const toolbar = createToolbar({
 | 
					 | 
				
			||||||
        editor,
 | 
					 | 
				
			||||||
        selector: '#toolbar-container',
 | 
					 | 
				
			||||||
        config: toolbarConfig,
 | 
					 | 
				
			||||||
        mode: 'default', // or 'simple'
 | 
					 | 
				
			||||||
    })
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<script>
 | 
					 | 
				
			||||||
    //返回文章列表
 | 
					 | 
				
			||||||
    function goBack() {
 | 
					 | 
				
			||||||
        window.location.href = '<?php echo url("article/articlelist"); ?>';
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
<?php /*a:4:{s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\index\index.php";i:1746865108;s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\header.php";i:1747361734;s:62:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\main.php";i:1747033370;s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\footer.php";i:1747360756;}*/ ?>
 | 
					<?php /*a:4:{s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\index\index.php";i:1746865108;s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\header.php";i:1746709977;s:62:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\main.php";i:1746868512;s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\footer.php";i:1746709977;}*/ ?>
 | 
				
			||||||
<!DOCTYPE html>
 | 
					<!DOCTYPE html>
 | 
				
			||||||
<html>
 | 
					<html>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -21,24 +21,17 @@
 | 
				
			|||||||
        <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">
 | 
				
			||||||
                    <li class="topbar-one__info__item">
 | 
					                    <li class="topbar-one__info__item"><span class="topbar-one__info__icon fas fa-phone-alt"></span><a
 | 
				
			||||||
                        <span class="topbar-one__info__icon fas fa-phone-alt" style="margin-right: 10px;"></span>
 | 
					                            href="tel:629-555-0129">(629) 555-0129</a></li>
 | 
				
			||||||
                        <a href="<?php echo htmlentities((string) $config['admin_phone']); ?>"><?php echo htmlentities((string) $config['admin_phone']); ?></a>
 | 
					                    <li class="topbar-one__info__item"><span class="topbar-one__info__icon fas fa-envelope"></span><a
 | 
				
			||||||
                    </li>
 | 
					                            href="mailto:info@example.com">info@example.com</a></li>
 | 
				
			||||||
                    <li class="topbar-one__info__item">
 | 
					 | 
				
			||||||
                        <span class="topbar-one__info__icon fas fa-envelope" style="margin-right: 10px;"></span>
 | 
					 | 
				
			||||||
                        <a href="mailto:<?php echo htmlentities((string) $config['admin_email']); ?>"><?php echo htmlentities((string) $config['admin_email']); ?></a>
 | 
					 | 
				
			||||||
                    </li>
 | 
					 | 
				
			||||||
                </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="https://facebook.com"><i class="fab fa-facebook-f"></i></a>
 | 
				
			||||||
                <a href="/index/user/register" class="mr-10"><i class="layui-icon layui-icon-user"></i> 注册</a>
 | 
					                <a href="https://twitter.com"><i class="fab fa-twitter"></i></a>
 | 
				
			||||||
                <a href="javascript:;" class="qrcode-trigger"><i class="layui-icon layui-icon-qrcode"></i> 公众号</a>
 | 
					                <a href="https://instagram.com"><i class="fab fa-instagram"></i></a>
 | 
				
			||||||
                <div class="qrcode-popup"
 | 
					                <a href="https://www.youtube.com/"><i class="fab fa-linkedin"></i></a>
 | 
				
			||||||
                    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;">
 | 
					 | 
				
			||||||
                    <img src="<?php echo htmlentities((string) $config['admin_wechat']); ?>" alt="公众号二维码" style="width:180px;height:180px;">
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
@ -46,7 +39,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="<?php echo htmlentities((string) $config['logo1']); ?>" width="186" alt="Logo"></a>
 | 
					                <a href="index.html"><img src="/static/images/logo.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">
 | 
				
			||||||
@ -57,28 +50,8 @@
 | 
				
			|||||||
                </ul>
 | 
					                </ul>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            <div class="main-menu__right">
 | 
					            <div class="main-menu__right">
 | 
				
			||||||
                <div class="layui-inline">
 | 
					                <a href="#" class="main-menu__search"><i class="layui-icon layui-icon-search"></i></a>
 | 
				
			||||||
                    <div class="layui-inline" style="position: relative;">
 | 
					                <a href="login.html" class="main-menu__login"><i class="layui-icon layui-icon-username"></i></a>
 | 
				
			||||||
                        <img src="/static/images/avatar.webp" class="layui-circle"
 | 
					 | 
				
			||||||
                            style="width: 40px; height: 40px; cursor: pointer;" id="userAvatarMain">
 | 
					 | 
				
			||||||
                        <div class="user-dropdown" id="userDropdownMain">
 | 
					 | 
				
			||||||
                            <ul>
 | 
					 | 
				
			||||||
                                <li>
 | 
					 | 
				
			||||||
                                    <a href="/index/user/profile"><i
 | 
					 | 
				
			||||||
                                            class="layui-icon layui-icon-user"></i><span>个人中心</span></a>
 | 
					 | 
				
			||||||
                                </li>
 | 
					 | 
				
			||||||
                                <li>
 | 
					 | 
				
			||||||
                                    <a href="/index/user/settings"><i
 | 
					 | 
				
			||||||
                                            class="layui-icon layui-icon-set"></i><span>账号管理</span></a>
 | 
					 | 
				
			||||||
                                </li>
 | 
					 | 
				
			||||||
                                <li>
 | 
					 | 
				
			||||||
                                    <a href="javascript:;" class="logout-btn"><i
 | 
					 | 
				
			||||||
                                            class="layui-icon layui-icon-logout"></i><span>退出登录</span></a>
 | 
					 | 
				
			||||||
                                </li>
 | 
					 | 
				
			||||||
                            </ul>
 | 
					 | 
				
			||||||
                        </div>
 | 
					 | 
				
			||||||
                    </div>
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
@ -132,7 +105,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="<?php echo htmlentities((string) $config['logo1']); ?>" width="150" alt="Logo"></a>
 | 
					            <a href="index.html"><img src="/static/images/logo.png" width="150" alt="Logo"></a>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div class="sticky-nav__menu">
 | 
					        <div class="sticky-nav__menu">
 | 
				
			||||||
            <ul>
 | 
					            <ul>
 | 
				
			||||||
@ -143,199 +116,55 @@
 | 
				
			|||||||
            </ul>
 | 
					            </ul>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div class="sticky-nav__right">
 | 
					        <div class="sticky-nav__right">
 | 
				
			||||||
            <div class="main-menu__right">
 | 
					            <a href="#" class="main-menu__search"><i class="layui-icon layui-icon-search"></i></a>
 | 
				
			||||||
                <div class="layui-inline">
 | 
					            <a href="login.html" class="main-menu__login"><i class="layui-icon layui-icon-username"></i></a>
 | 
				
			||||||
                    <div class="layui-inline" style="position: relative;">
 | 
					 | 
				
			||||||
                        <img src="/static/images/avatar.webp" class="layui-circle"
 | 
					 | 
				
			||||||
                            style="width: 40px; height: 40px; cursor: pointer;" id="userAvatarSticky">
 | 
					 | 
				
			||||||
                        <div class="user-dropdown" id="userDropdownSticky">
 | 
					 | 
				
			||||||
                            <ul>
 | 
					 | 
				
			||||||
                                <li>
 | 
					 | 
				
			||||||
                                    <a href="/index/user/profile"><i
 | 
					 | 
				
			||||||
                                            class="layui-icon layui-icon-user"></i><span>个人中心</span></a>
 | 
					 | 
				
			||||||
                                </li>
 | 
					 | 
				
			||||||
                                <li>
 | 
					 | 
				
			||||||
                                    <a href="/index/user/settings"><i
 | 
					 | 
				
			||||||
                                            class="layui-icon layui-icon-set"></i><span>账号管理</span></a>
 | 
					 | 
				
			||||||
                                </li>
 | 
					 | 
				
			||||||
                                <li>
 | 
					 | 
				
			||||||
                                    <a href="javascript:;" class="logout-btn"><i
 | 
					 | 
				
			||||||
                                            class="layui-icon layui-icon-logout"></i><span>退出登录</span></a>
 | 
					 | 
				
			||||||
                                </li>
 | 
					 | 
				
			||||||
                            </ul>
 | 
					 | 
				
			||||||
                        </div>
 | 
					 | 
				
			||||||
                    </div>
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style>
 | 
					 | 
				
			||||||
    /* 用户头像样式 */
 | 
					 | 
				
			||||||
    #userAvatar {
 | 
					 | 
				
			||||||
        width: 40px;
 | 
					 | 
				
			||||||
        height: 40px;
 | 
					 | 
				
			||||||
        cursor: pointer;
 | 
					 | 
				
			||||||
        transition: all 0.3s ease;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    #userAvatar:hover {
 | 
					 | 
				
			||||||
        transform: scale(1.05);
 | 
					 | 
				
			||||||
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* 下拉菜单容器 */
 | 
					 | 
				
			||||||
    .user-dropdown {
 | 
					 | 
				
			||||||
        position: absolute;
 | 
					 | 
				
			||||||
        top: 50px;
 | 
					 | 
				
			||||||
        right: 0;
 | 
					 | 
				
			||||||
        width: 160px;
 | 
					 | 
				
			||||||
        background: #fff;
 | 
					 | 
				
			||||||
        border-radius: 4px;
 | 
					 | 
				
			||||||
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
 | 
					 | 
				
			||||||
        opacity: 0;
 | 
					 | 
				
			||||||
        visibility: hidden;
 | 
					 | 
				
			||||||
        transform: translateY(-10px);
 | 
					 | 
				
			||||||
        transition: all 0.3s ease;
 | 
					 | 
				
			||||||
        z-index: 9999;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    .user-dropdown.show {
 | 
					 | 
				
			||||||
        opacity: 1;
 | 
					 | 
				
			||||||
        visibility: visible;
 | 
					 | 
				
			||||||
        transform: translateY(0);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* 下拉菜单列表 */
 | 
					 | 
				
			||||||
    .user-dropdown ul {
 | 
					 | 
				
			||||||
        margin: 0;
 | 
					 | 
				
			||||||
        padding: 5px 0;
 | 
					 | 
				
			||||||
        list-style: none;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* 下拉菜单项 */
 | 
					 | 
				
			||||||
    .user-dropdown li {
 | 
					 | 
				
			||||||
        margin: 0;
 | 
					 | 
				
			||||||
        padding: 0;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* 下拉菜单链接 */
 | 
					 | 
				
			||||||
    .user-dropdown li a {
 | 
					 | 
				
			||||||
        display: flex;
 | 
					 | 
				
			||||||
        align-items: center;
 | 
					 | 
				
			||||||
        padding: 10px 15px;
 | 
					 | 
				
			||||||
        color: #333;
 | 
					 | 
				
			||||||
        text-decoration: none;
 | 
					 | 
				
			||||||
        transition: all 0.3s ease;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* 下拉菜单图标 */
 | 
					 | 
				
			||||||
    .user-dropdown li a i {
 | 
					 | 
				
			||||||
        margin-right: 10px;
 | 
					 | 
				
			||||||
        font-size: 16px;
 | 
					 | 
				
			||||||
        color: #666;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* 下拉菜单文字 */
 | 
					 | 
				
			||||||
    .user-dropdown li a span {
 | 
					 | 
				
			||||||
        font-size: 14px;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* 下拉菜单悬停效果 */
 | 
					 | 
				
			||||||
    .user-dropdown li a:hover {
 | 
					 | 
				
			||||||
        background: #f5f5f5;
 | 
					 | 
				
			||||||
        color: #1E9FFF;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    .user-dropdown li a:hover i {
 | 
					 | 
				
			||||||
        color: #1E9FFF;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* 分隔线 */
 | 
					 | 
				
			||||||
    .user-dropdown li:not(:last-child) {
 | 
					 | 
				
			||||||
        border-bottom: 1px solid #f0f0f0;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    .user-dropdown {
 | 
					 | 
				
			||||||
        position: absolute;
 | 
					 | 
				
			||||||
        top: 50px;
 | 
					 | 
				
			||||||
        right: 0;
 | 
					 | 
				
			||||||
        width: 160px;
 | 
					 | 
				
			||||||
        background: #fff;
 | 
					 | 
				
			||||||
        border-radius: 4px;
 | 
					 | 
				
			||||||
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
 | 
					 | 
				
			||||||
        opacity: 0;
 | 
					 | 
				
			||||||
        visibility: hidden;
 | 
					 | 
				
			||||||
        transform: translateY(-10px);
 | 
					 | 
				
			||||||
        transition: all 0.3s ease;
 | 
					 | 
				
			||||||
        z-index: 9999;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    .user-dropdown.show {
 | 
					 | 
				
			||||||
        opacity: 1;
 | 
					 | 
				
			||||||
        visibility: visible;
 | 
					 | 
				
			||||||
        transform: translateY(0);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    #userDropdownSticky a {
 | 
					 | 
				
			||||||
        color: #0d6efd !important;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
</style>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
    layui.use(['carousel', 'form', 'layer'], function () {
 | 
					layui.use(['carousel', 'form'], function(){
 | 
				
			||||||
        var carousel = layui.carousel,
 | 
					  var carousel = layui.carousel
 | 
				
			||||||
            form = layui.form,
 | 
					  ,form = layui.form;
 | 
				
			||||||
            layer = layui.layer,
 | 
					 | 
				
			||||||
            $ = layui.$;
 | 
					 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  //图片轮播
 | 
					  //图片轮播
 | 
				
			||||||
  carousel.render({
 | 
					  carousel.render({
 | 
				
			||||||
            elem: '#test10',
 | 
					    elem: '#test10'
 | 
				
			||||||
            width: '100%',
 | 
					    ,width: '100%'
 | 
				
			||||||
            height: '86vh',
 | 
					    ,height: '86vh'
 | 
				
			||||||
            interval: 4000
 | 
					    ,interval: 4000
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
        $(document).ready(function () {
 | 
					  var $ = layui.$, active = {
 | 
				
			||||||
            // 主导航头像
 | 
					    set: function(othis){
 | 
				
			||||||
            $("#userAvatarMain").click(function (e) {
 | 
					      var THIS = 'layui-bg-normal'
 | 
				
			||||||
                e.stopPropagation();
 | 
					      ,key = othis.data('key')
 | 
				
			||||||
                $("#userDropdownMain").toggleClass("show");
 | 
					      ,options = {};
 | 
				
			||||||
                $("#userDropdownSticky").removeClass("show"); // 保证只显示一个
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
            // 固定导航头像
 | 
					 | 
				
			||||||
            $("#userAvatarSticky").click(function (e) {
 | 
					 | 
				
			||||||
                e.stopPropagation();
 | 
					 | 
				
			||||||
                $("#userDropdownSticky").toggleClass("show");
 | 
					 | 
				
			||||||
                $("#userDropdownMain").removeClass("show"); // 保证只显示一个
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
            // 点击页面其他地方隐藏所有菜单
 | 
					      othis.css('background-color', '#5FB878').siblings().removeAttr('style'); 
 | 
				
			||||||
            $(document).click(function (e) {
 | 
					      options[key] = othis.data('value');
 | 
				
			||||||
                if (!$(e.target).closest('.user-dropdown, #userAvatarMain, #userAvatarSticky').length) {
 | 
					      ins3.reload(options);
 | 
				
			||||||
                    $("#userDropdownMain, #userDropdownSticky").removeClass("show");
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
            });
 | 
					  };
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
            // 点击菜单项时隐藏菜单
 | 
					  //监听开关
 | 
				
			||||||
            $("#userDropdownMain li a, #userDropdownSticky li a").click(function () {
 | 
					  form.on('switch(autoplay)', function(){
 | 
				
			||||||
                $("#userDropdownMain, #userDropdownSticky").removeClass("show");
 | 
					    ins3.reload({
 | 
				
			||||||
 | 
					      autoplay: this.checked
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
        // 退出登录
 | 
					  $('.demoSet').on('keyup', function(){
 | 
				
			||||||
        $('.logout-btn').on('click', function () {
 | 
					    var value = this.value
 | 
				
			||||||
            layer.confirm('确定要退出登录吗?', {
 | 
					    ,options = {};
 | 
				
			||||||
                btn: ['确定', '取消']
 | 
					    if(!/^\d+$/.test(value)) return;
 | 
				
			||||||
            }, function () {
 | 
					    
 | 
				
			||||||
                window.location.href = '/index/user/logout';
 | 
					    options[this.name] = value;
 | 
				
			||||||
            });
 | 
					    ins3.reload(options);
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  // 监听滚动事件
 | 
					  // 监听滚动事件
 | 
				
			||||||
        $(window).scroll(function () {
 | 
					  $(window).scroll(function() {
 | 
				
			||||||
    var scrollTop = $(window).scrollTop();
 | 
					    var scrollTop = $(window).scrollTop();
 | 
				
			||||||
    if (scrollTop > 150) { // 当滚动超过150px时显示固定导航
 | 
					    if (scrollTop > 150) { // 当滚动超过150px时显示固定导航
 | 
				
			||||||
      $('.sticky-nav').fadeIn();
 | 
					      $('.sticky-nav').fadeIn();
 | 
				
			||||||
@ -343,57 +172,81 @@
 | 
				
			|||||||
      $('.sticky-nav').fadeOut();
 | 
					      $('.sticky-nav').fadeOut();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
        // 公众号二维码
 | 
					 | 
				
			||||||
        const trigger = document.querySelector('.qrcode-trigger');
 | 
					 | 
				
			||||||
        const popup = document.querySelector('.qrcode-popup');
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 鼠标移入显示二维码
 | 
					 | 
				
			||||||
        trigger.addEventListener('mouseenter', function () {
 | 
					 | 
				
			||||||
            popup.style.display = 'block';
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 鼠标移出隐藏二维码
 | 
					 | 
				
			||||||
        trigger.addEventListener('mouseleave', function () {
 | 
					 | 
				
			||||||
            popup.style.display = 'none';
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 鼠标移入二维码区域时保持显示
 | 
					 | 
				
			||||||
        popup.addEventListener('mouseenter', function () {
 | 
					 | 
				
			||||||
            popup.style.display = 'block';
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 鼠标移出二维码区域时隐藏
 | 
					 | 
				
			||||||
        popup.addEventListener('mouseleave', function () {
 | 
					 | 
				
			||||||
            popup.style.display = 'none';
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
    });
 | 
					 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <main class="main-content">
 | 
					    <main class="main-content">
 | 
				
			||||||
    <div class="container">
 | 
					    <div class="container">
 | 
				
			||||||
        <!-- 站点资讯模块 -->
 | 
					        <!-- 文章模块 -->
 | 
				
			||||||
        <div class="core-block core-module" id="opencourse" style="order: 3;">
 | 
					        <div class="core-block core-module" id="opencourse" style="order: 3;">
 | 
				
			||||||
            <div class="module-header">
 | 
					            <div class="module-header">
 | 
				
			||||||
                <div>
 | 
					                <div>
 | 
				
			||||||
                    <div class="ModuleTitle_titleWrapper">
 | 
					                    <div class="ModuleTitle_titleWrapper">
 | 
				
			||||||
                        <h3 class="ModuleTitle_title">站点资讯</h3>
 | 
					                        <h3 class="ModuleTitle_title">站点新闻</h3>
 | 
				
			||||||
                        <div class="tab-container">
 | 
					                        <div class="ModuleTitle_subtitle">新鲜资讯 尽在掌握</div>
 | 
				
			||||||
                            <div class="tab-header">
 | 
					 | 
				
			||||||
                                <div class="tab-item active" data-tab="all">全部</div>
 | 
					 | 
				
			||||||
                                <!-- 分类标签将通过JavaScript动态加载 -->
 | 
					 | 
				
			||||||
                            </div>
 | 
					 | 
				
			||||||
                        </div>
 | 
					 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                <div class="more-btn">更多</div>
 | 
					                <div class="more-btn">更多</div>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            <div class="product-list" id="webArticlesList">
 | 
					            <div class="product-list">
 | 
				
			||||||
                <!-- 文章将通过JavaScript动态加载 -->
 | 
					                <div class="opencourse product-item">
 | 
				
			||||||
 | 
					                    <div class="video"><img data-v-4477fdbc=""
 | 
				
			||||||
 | 
					                            src="https://static001.geekbang.org/resource/image/ff/b8/ff18d73bec1040abf3d7bc7bffb532b8.jpg?x-oss-process=image/resize,w_423,h_238/format,webp"
 | 
				
			||||||
 | 
					                            alt="" class="cover"><!----></div>
 | 
				
			||||||
 | 
					                    <div class="introduction">
 | 
				
			||||||
 | 
					                        <div class="title">闪客 · 怎么理解 AI?</div>
 | 
				
			||||||
 | 
					                        <div class="subtitle">闪客 | B 站知名科普 UP 主</div>
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					                    <div class="bottom">
 | 
				
			||||||
 | 
					                        <div class="desc">1025人学过</div>
 | 
				
			||||||
 | 
					                        <!-- <div class="btn">观看: 123人</div> -->
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					                </div>
 | 
				
			||||||
 | 
					                <div class="opencourse product-item">
 | 
				
			||||||
 | 
					                    <div class="video"><img data-v-4477fdbc=""
 | 
				
			||||||
 | 
					                            src="https://static001.geekbang.org/resource/image/76/cd/762ee7f34a76fbff61d20aae313833cd.jpg?x-oss-process=image/resize,w_423,h_238/format,webp"
 | 
				
			||||||
 | 
					                            alt="" class="cover">
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					                    <div class="introduction">
 | 
				
			||||||
 | 
					                        <div class="title">多模态对话引擎实战</div>
 | 
				
			||||||
 | 
					                        <div class="subtitle">吴桐 | 网易云信音视频技术负责人,流媒体首席架构师</div>
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					                    <div class="bottom">
 | 
				
			||||||
 | 
					                        <div class="desc">380人学过</div>
 | 
				
			||||||
 | 
					                        <!-- <div class="btn">观看: 123人</div> -->
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					                </div>
 | 
				
			||||||
 | 
					                <div class="opencourse product-item">
 | 
				
			||||||
 | 
					                    <div class="video"><img data-v-4477fdbc=""
 | 
				
			||||||
 | 
					                            src="https://static001.geekbang.org/resource/image/4y/da/4yyfb232bfbfbdcc6ed827c16b04a9da.jpg?x-oss-process=image/resize,w_423,h_238/format,webp"
 | 
				
			||||||
 | 
					                            alt="" class="cover"><!----></div>
 | 
				
			||||||
 | 
					                    <div class="introduction">
 | 
				
			||||||
 | 
					                        <div class="title">极客视点</div>
 | 
				
			||||||
 | 
					                        <div class="subtitle">极客时间 | 编辑部</div>
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					                    <div class="bottom">
 | 
				
			||||||
 | 
					                        <div class="desc">12.4w人学过</div>
 | 
				
			||||||
 | 
					                        <!-- <div class="btn">观看: 123人</div> -->
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					                </div>
 | 
				
			||||||
 | 
					                <div class="opencourse product-item">
 | 
				
			||||||
 | 
					                    <div class="video"><img data-v-4477fdbc=""
 | 
				
			||||||
 | 
					                            src="https://static001.geekbang.org/resource/image/0f/69/0f95b62cf7yy6d6yy674f090d063b669.jpg?x-oss-process=image/resize,w_423,h_238/format,webp"
 | 
				
			||||||
 | 
					                            alt="" class="cover"><!----></div>
 | 
				
			||||||
 | 
					                    <div class="introduction">
 | 
				
			||||||
 | 
					                        <div class="title">周志明的软件架构课</div>
 | 
				
			||||||
 | 
					                        <div class="subtitle">周志明 | 博士,远光软件研究院院长,《深入理解Java虚拟机》《凤凰架构》等书作者</div>
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					                    <div class="bottom">
 | 
				
			||||||
 | 
					                        <div class="desc">6.0w人学过</div>
 | 
				
			||||||
 | 
					                        <!-- <div class="btn">观看: 123人</div>d -->
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					                </div>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <!-- 技术文章模块 -->
 | 
					        <!-- 文章模块 -->
 | 
				
			||||||
        <div class="core-block core-module" id="techArticles" style="order: 3;">
 | 
					        <div class="core-block core-module" id="opencourse" style="order: 3;">
 | 
				
			||||||
            <div class="module-header">
 | 
					            <div class="module-header">
 | 
				
			||||||
                <div>
 | 
					                <div>
 | 
				
			||||||
                    <div class="ModuleTitle_titleWrapper">
 | 
					                    <div class="ModuleTitle_titleWrapper">
 | 
				
			||||||
@ -401,246 +254,104 @@
 | 
				
			|||||||
                        <div class="tab-container">
 | 
					                        <div class="tab-container">
 | 
				
			||||||
                            <div class="tab-header">
 | 
					                            <div class="tab-header">
 | 
				
			||||||
                                <div class="tab-item active" data-tab="all">全部</div>
 | 
					                                <div class="tab-item active" data-tab="all">全部</div>
 | 
				
			||||||
                                <!-- 分类标签将通过JavaScript动态加载 -->
 | 
					                                <?php foreach($articleList as $cateName => $articles): ?>
 | 
				
			||||||
 | 
					                                <div class="tab-item" data-tab="<?php echo htmlentities((string) $cateName); ?>"><?php echo htmlentities((string) $cateName); ?></div>
 | 
				
			||||||
 | 
					                                <?php endforeach; ?>
 | 
				
			||||||
                            </div>
 | 
					                            </div>
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                <div class="more-btn">更多</div>
 | 
					                <div class="more-btn">更多</div>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            <div class="product-list" id="techArticlesList">
 | 
					            <div class="product-list">
 | 
				
			||||||
                <!-- 文章将通过JavaScript动态加载 -->
 | 
					                <!-- 全部文章 -->
 | 
				
			||||||
 | 
					                <div class="tab-content active" data-tab="all">
 | 
				
			||||||
 | 
					                    <?php foreach($articleList as $cateName => $articles): foreach($articles as $article): ?>
 | 
				
			||||||
 | 
					                    <div class="opencourse product-item"
 | 
				
			||||||
 | 
					                        onclick="window.open('<?php echo url('article/detail'); ?>?id=<?php echo htmlentities((string) $article['id']); ?>', '_blank')">
 | 
				
			||||||
 | 
					                        <div class="video">
 | 
				
			||||||
 | 
					                            <img src="<?php echo htmlentities((string) $article['image']); ?>" alt="" class="cover">
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
 | 
					                        <div class="introduction">
 | 
				
			||||||
 | 
					                            <div class="title"><?php echo htmlentities((string) $article['title']); ?></div>
 | 
				
			||||||
 | 
					                            <div class="publishdate"><?php echo htmlentities((string) $article['publishdate']); ?></div>
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
 | 
					                        <div class="bottom">
 | 
				
			||||||
 | 
					                            <div class="views"><i class="fa-solid fa-eye "></i><span style="margin-left: 5px;"><?php echo htmlentities((string) $article['views']); ?></span></div>
 | 
				
			||||||
 | 
					                            <div class="author"><i class="fa-regular fa-user"></i><span style="margin-left: 5px;"><?php echo htmlentities((string) $article['author']); ?></span></div>
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					                    <?php endforeach; ?>
 | 
				
			||||||
 | 
					                    <?php endforeach; ?>
 | 
				
			||||||
 | 
					                </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <!-- 分类文章 -->
 | 
				
			||||||
 | 
					                <?php foreach($articleList as $cateName => $articles): ?>
 | 
				
			||||||
 | 
					                <div class="tab-content" data-tab="<?php echo htmlentities((string) $cateName); ?>">
 | 
				
			||||||
 | 
					                    <?php foreach($articles as $article): ?>
 | 
				
			||||||
 | 
					                    <div class="opencourse product-item"
 | 
				
			||||||
 | 
					                        onclick="window.open('<?php echo url('article/detail'); ?>?id=<?php echo htmlentities((string) $article['id']); ?>', '_blank')">
 | 
				
			||||||
 | 
					                        <div class="video">
 | 
				
			||||||
 | 
					                            <img src="<?php echo htmlentities((string) $article['image']); ?>" alt="" class="cover">
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
 | 
					                        <div class="introduction">
 | 
				
			||||||
 | 
					                            <div class="title"><?php echo htmlentities((string) $article['title']); ?></div>
 | 
				
			||||||
 | 
					                            <div class="publishdate"><?php echo htmlentities((string) $article['publishdate']); ?></div>
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
 | 
					                        <div class="bottom">
 | 
				
			||||||
 | 
					                            <div class="views"><i class="fa-solid fa-eye "></i><span style="margin-left: 5px;"><?php echo htmlentities((string) $article['views']); ?></span></div>
 | 
				
			||||||
 | 
					                            <div class="author"><i class="fa-regular fa-user"></i><span style="margin-left: 5px;"><?php echo htmlentities((string) $article['author']); ?></span></div>
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					                    <?php endforeach; ?>
 | 
				
			||||||
 | 
					                </div>
 | 
				
			||||||
 | 
					                <?php endforeach; ?>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
</main>
 | 
					</main>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
    // 加载站点新闻
 | 
					    document.addEventListener('DOMContentLoaded', function () {
 | 
				
			||||||
    function loadWebArticles() {
 | 
					        // 获取所有tab项和内容
 | 
				
			||||||
        fetch('/index/index/siteNewslist')
 | 
					        const tabItems = document.querySelectorAll('.tab-item');
 | 
				
			||||||
            .then(response => response.json())
 | 
					        const tabContents = document.querySelectorAll('.tab-content');
 | 
				
			||||||
            .then(result => {
 | 
					 | 
				
			||||||
                if (result.code === 1) {
 | 
					 | 
				
			||||||
                    // 渲染分类标签
 | 
					 | 
				
			||||||
                    if (result.categories) {
 | 
					 | 
				
			||||||
                        renderCategoryTabs(result.categories, 'opencourse');
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                    // 渲染文章列表
 | 
					 | 
				
			||||||
                    if (result.articles && result.articles.length > 0) {
 | 
					 | 
				
			||||||
                        // 只取最新的4条
 | 
					 | 
				
			||||||
                        renderWebArticles(result.articles.slice(0, 4), 'webArticlesList');
 | 
					 | 
				
			||||||
                    } else {
 | 
					 | 
				
			||||||
                        showNoData('webArticlesList');
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                } else {
 | 
					 | 
				
			||||||
                    showNoData('webArticlesList');
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            })
 | 
					 | 
				
			||||||
            .catch(error => {
 | 
					 | 
				
			||||||
                console.error('请求失败:', error);
 | 
					 | 
				
			||||||
                showError('webArticlesList');
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // 加载技术文章
 | 
					        // 为每个tab项添加点击事件
 | 
				
			||||||
    function loadTechArticles() {
 | 
					 | 
				
			||||||
        fetch('/index/index/technicalArticleslist')
 | 
					 | 
				
			||||||
            .then(response => response.json())
 | 
					 | 
				
			||||||
            .then(result => {
 | 
					 | 
				
			||||||
                if (result.code === 1) {
 | 
					 | 
				
			||||||
                    // 渲染分类标签
 | 
					 | 
				
			||||||
                    if (result.categories) {
 | 
					 | 
				
			||||||
                        renderCategoryTabs(result.categories, 'techArticles');
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                    // 渲染文章列表
 | 
					 | 
				
			||||||
                    if (result.articles && Object.keys(result.articles).length > 0) {
 | 
					 | 
				
			||||||
                        // 合并所有分类的文章
 | 
					 | 
				
			||||||
                        let allArticles = [];
 | 
					 | 
				
			||||||
                        Object.values(result.articles).forEach(arr => {
 | 
					 | 
				
			||||||
                            allArticles = allArticles.concat(arr);
 | 
					 | 
				
			||||||
                        });
 | 
					 | 
				
			||||||
                        // 按发布时间排序(降序)
 | 
					 | 
				
			||||||
                        allArticles.sort((a, b) => b.publishdate - a.publishdate);
 | 
					 | 
				
			||||||
                        // 只取最新的12条
 | 
					 | 
				
			||||||
                        allArticles = allArticles.slice(0, 12);
 | 
					 | 
				
			||||||
                        renderWebArticles(allArticles, 'techArticlesList');
 | 
					 | 
				
			||||||
                    } else {
 | 
					 | 
				
			||||||
                        showNoData('techArticlesList');
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                } else {
 | 
					 | 
				
			||||||
                    showNoData('techArticlesList');
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            })
 | 
					 | 
				
			||||||
            .catch(error => {
 | 
					 | 
				
			||||||
                console.error('请求失败:', error);
 | 
					 | 
				
			||||||
                showError('techArticlesList');
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // 显示无数据提示
 | 
					 | 
				
			||||||
    function showNoData(containerId) {
 | 
					 | 
				
			||||||
        document.getElementById(containerId).innerHTML = '<div class="no-data">暂无数据</div>';
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // 显示错误提示
 | 
					 | 
				
			||||||
    function showError(containerId) {
 | 
					 | 
				
			||||||
        document.getElementById(containerId).innerHTML = '<div class="error-message">网络请求失败</div>';
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // 渲染分类标签
 | 
					 | 
				
			||||||
    function renderCategoryTabs(categories, moduleId) {
 | 
					 | 
				
			||||||
        const tabHeader = document.querySelector(`#${moduleId} .tab-header`);
 | 
					 | 
				
			||||||
        if (!tabHeader) return;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 保留"全部"标签
 | 
					 | 
				
			||||||
        const allTab = tabHeader.querySelector('.tab-item[data-tab="all"]');
 | 
					 | 
				
			||||||
        tabHeader.innerHTML = '';
 | 
					 | 
				
			||||||
        tabHeader.appendChild(allTab);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 添加分类标签
 | 
					 | 
				
			||||||
        if (Array.isArray(categories)) {
 | 
					 | 
				
			||||||
            categories.forEach(category => {
 | 
					 | 
				
			||||||
                const tabItem = document.createElement('div');
 | 
					 | 
				
			||||||
                tabItem.className = 'tab-item';
 | 
					 | 
				
			||||||
                tabItem.setAttribute('data-tab', category.id);
 | 
					 | 
				
			||||||
                tabItem.textContent = category.name;
 | 
					 | 
				
			||||||
                tabHeader.appendChild(tabItem);
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 重新绑定点击事件
 | 
					 | 
				
			||||||
        bindTabEvents(moduleId);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // 绑定标签点击事件
 | 
					 | 
				
			||||||
    function bindTabEvents(moduleId) {
 | 
					 | 
				
			||||||
        const tabItems = document.querySelectorAll(`#${moduleId} .tab-item`);
 | 
					 | 
				
			||||||
        tabItems.forEach(tab => {
 | 
					        tabItems.forEach(tab => {
 | 
				
			||||||
            tab.addEventListener('click', function() {
 | 
					            tab.addEventListener('click', function () {
 | 
				
			||||||
                // 移除所有active类
 | 
					                // 移除所有active类
 | 
				
			||||||
                tabItems.forEach(item => item.classList.remove('active'));
 | 
					                tabItems.forEach(item => item.classList.remove('active'));
 | 
				
			||||||
 | 
					                tabContents.forEach(content => content.classList.remove('active'));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                // 添加active类到当前点击的tab
 | 
					                // 添加active类到当前点击的tab
 | 
				
			||||||
                this.classList.add('active');
 | 
					                this.classList.add('active');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                // 获取选中的分类ID
 | 
					                // 显示对应的内容
 | 
				
			||||||
                const selectedCategoryId = this.getAttribute('data-tab');
 | 
					                const tabName = this.getAttribute('data-tab');
 | 
				
			||||||
                
 | 
					                const activeContent = document.querySelector(`.tab-content[data-tab="${tabName}"]`);
 | 
				
			||||||
                // 重新加载对应分类的文章
 | 
					                if (activeContent) {
 | 
				
			||||||
                if (moduleId === 'opencourse') {
 | 
					                    activeContent.classList.add('active');
 | 
				
			||||||
                    loadCategoryArticles(selectedCategoryId, 'webArticlesList');
 | 
					 | 
				
			||||||
                } else {
 | 
					 | 
				
			||||||
                    loadCategoryArticles(selectedCategoryId, 'techArticlesList');
 | 
					 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                // 添加切换动画效果
 | 
				
			||||||
 | 
					                activeContent.style.opacity = '0';
 | 
				
			||||||
 | 
					                setTimeout(() => {
 | 
				
			||||||
 | 
					                    activeContent.style.opacity = '1';
 | 
				
			||||||
 | 
					                }, 50);
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // 加载分类文章
 | 
					 | 
				
			||||||
    function loadCategoryArticles(categoryId, containerId) {
 | 
					 | 
				
			||||||
        const url = containerId === 'webArticlesList' ? '/index/index/siteNewslist' : '/index/index/technicalArticleslist';
 | 
					 | 
				
			||||||
        fetch(url)
 | 
					 | 
				
			||||||
            .then(response => response.json())
 | 
					 | 
				
			||||||
            .then(result => {
 | 
					 | 
				
			||||||
                if (result.code === 1) {
 | 
					 | 
				
			||||||
                    if (containerId === 'techArticlesList') {
 | 
					 | 
				
			||||||
                        if (categoryId === 'all') {
 | 
					 | 
				
			||||||
                            // 合并所有分类的文章
 | 
					 | 
				
			||||||
                            let allArticles = [];
 | 
					 | 
				
			||||||
                            if (typeof result.articles === 'object') {
 | 
					 | 
				
			||||||
                                Object.values(result.articles).forEach(arr => {
 | 
					 | 
				
			||||||
                                    allArticles = allArticles.concat(arr);
 | 
					 | 
				
			||||||
                                });
 | 
					 | 
				
			||||||
                            }
 | 
					 | 
				
			||||||
                            // 按发布时间排序(降序)
 | 
					 | 
				
			||||||
                            allArticles.sort((a, b) => b.publishdate - a.publishdate);
 | 
					 | 
				
			||||||
                            // 只取最新的12条
 | 
					 | 
				
			||||||
                            allArticles = allArticles.slice(0, 12);
 | 
					 | 
				
			||||||
                            renderWebArticles(allArticles, containerId);
 | 
					 | 
				
			||||||
                        } else {
 | 
					 | 
				
			||||||
                            // 只显示选中分类的文章
 | 
					 | 
				
			||||||
                            let filteredArticles = [];
 | 
					 | 
				
			||||||
                            if (typeof result.articles === 'object' && result.articles[categoryId]) {
 | 
					 | 
				
			||||||
                                filteredArticles = result.articles[categoryId];
 | 
					 | 
				
			||||||
                            }
 | 
					 | 
				
			||||||
                            renderWebArticles(filteredArticles, containerId);
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    } else {
 | 
					 | 
				
			||||||
                        // 站点资讯部分逻辑不变
 | 
					 | 
				
			||||||
                        if (categoryId === 'all') {
 | 
					 | 
				
			||||||
                            renderWebArticles(result.articles.slice(0, 4), containerId);
 | 
					 | 
				
			||||||
                        } else {
 | 
					 | 
				
			||||||
                            const filteredArticles = result.articles.filter(article => article.cate == categoryId);
 | 
					 | 
				
			||||||
                            renderWebArticles(filteredArticles, containerId);
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                } else {
 | 
					 | 
				
			||||||
                    showNoData(containerId);
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            })
 | 
					 | 
				
			||||||
            .catch(error => {
 | 
					 | 
				
			||||||
                console.error('请求失败:', error);
 | 
					 | 
				
			||||||
                showError(containerId);
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // 渲染文章列表
 | 
					 | 
				
			||||||
    function renderWebArticles(articles, containerId) {
 | 
					 | 
				
			||||||
        const container = document.getElementById(containerId);
 | 
					 | 
				
			||||||
        if (!container) return;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        let html = '';
 | 
					 | 
				
			||||||
        if (Array.isArray(articles)) {
 | 
					 | 
				
			||||||
            articles.forEach(article => {
 | 
					 | 
				
			||||||
                html += createArticleHtml(article);
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        container.innerHTML = html || '<div class="no-data">暂无数据</div>';
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // 创建文章HTML
 | 
					 | 
				
			||||||
    function createArticleHtml(article) {
 | 
					 | 
				
			||||||
        if (!article) return '';
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        // 格式化日期
 | 
					 | 
				
			||||||
        const publishDate = new Date(article.publishdate * 1000);
 | 
					 | 
				
			||||||
        const formattedDate = publishDate.toLocaleDateString('zh-CN', {
 | 
					 | 
				
			||||||
            year: 'numeric',
 | 
					 | 
				
			||||||
            month: '2-digit',
 | 
					 | 
				
			||||||
            day: '2-digit'
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        return `
 | 
					 | 
				
			||||||
            <div class="opencourse product-item" onclick="window.open('/index/article/detail?id=${article.id || ''}', '_blank')">
 | 
					 | 
				
			||||||
                <div class="video">
 | 
					 | 
				
			||||||
                    <img src="${article.image || ''}" alt="" class="cover">
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
                <div class="introduction">
 | 
					 | 
				
			||||||
                    <div class="title">${article.title || '无标题'}</div>
 | 
					 | 
				
			||||||
                    <div class="publishdate">${formattedDate}</div>
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
                <div class="bottom">
 | 
					 | 
				
			||||||
                    <div class="views"><i class="fa-solid fa-eye"></i><span style="margin-left: 5px;">${article.views || 0}</span></div>
 | 
					 | 
				
			||||||
                    <div class="author"><i class="fa-regular fa-user"></i><span style="margin-left: 5px;">${article.author || '未知作者'}</span></div>
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
        `;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // 页面加载完成后执行
 | 
					 | 
				
			||||||
    document.addEventListener('DOMContentLoaded', function() {
 | 
					 | 
				
			||||||
        loadWebArticles();
 | 
					 | 
				
			||||||
        loadTechArticles();
 | 
					 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
    <footer class="footer" style="background-image: url(/static/images/footer-bg-1.png)">
 | 
					    <footer class="footer" style="background-image: url(/static/images/footer-bg-1.png)">
 | 
				
			||||||
    <div class="container">
 | 
					    <div class="container">
 | 
				
			||||||
        <div class="row" style="width: 100%;">
 | 
					        <div class="row" style="width: 100%;">
 | 
				
			||||||
            <div class="row-main">
 | 
					            <div class="row-main">
 | 
				
			||||||
                <div class="mr-20">
 | 
					                <div class="mr-20">
 | 
				
			||||||
                    <img src="<?php echo htmlentities((string) $config['logo']); ?>" alt="" height="70">
 | 
					                    <img src="/static/images/logo-l-w.png" alt="" height="70">
 | 
				
			||||||
                    <p class="text-white-50 my-4 f18" style="width: 400px;">美天智能科技,这里是介绍!</p>
 | 
					                    <p class="text-white-50 my-4 f18" style="width: 400px;">美天智能科技,这里是介绍!</p>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                <div style="display: flex; justify-content: space-between;width: 100%;margin-right: 200px;">
 | 
					                <div style="display: flex; justify-content: space-between;width: 100%;margin-right: 200px;">
 | 
				
			||||||
@ -672,7 +383,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                <div>
 | 
					                <div>
 | 
				
			||||||
                    <div class="text-center">
 | 
					                    <div class="text-center">
 | 
				
			||||||
                        <img src="<?php echo htmlentities((string) $config['admin_wechat']); ?>" alt="微信二维码" class="img-fluid" style="max-width: 150px;">
 | 
					                        <img src="/static/images/code.png" alt="微信二维码" class="img-fluid" style="max-width: 150px;">
 | 
				
			||||||
                        <p class="text-white-50 mt-2">微信公众号</p>
 | 
					                        <p class="text-white-50 mt-2">微信公众号</p>
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user