2022-08-19 19:48:37 +08:00
|
|
|
|
<!DOCTYPE html>
|
2022-11-28 19:11:12 +08:00
|
|
|
|
<html lang="zh-CN">
|
2022-08-19 19:48:37 +08:00
|
|
|
|
<head>
|
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
|
<title>控制台 | 用户中心</title>
|
|
|
|
|
|
<include file="user:include"/>
|
|
|
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
|
|
|
|
<div class="layui-layout layui-layout-admin">
|
|
|
|
|
|
<div class="layui-header">
|
|
|
|
|
|
<div class="layui-logo layui-side-body layui-hide-xs layui-bg-black">
|
2023-08-04 11:06:34 +08:00
|
|
|
|
<!--// 可以增加LOGO-->
|
|
|
|
|
|
<img src="/static/system/images/logo.png" style="margin-bottom: 8px;" alt="logo" width="22" height="22" >
|
|
|
|
|
|
<span class="logo-text">用户后台管理</span>
|
2022-08-19 19:48:37 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<ul class="layui-nav layui-layout-left">
|
|
|
|
|
|
<li id="shrink" class="layui-nav-item layui-show-xs-inline-block" >
|
|
|
|
|
|
<i class="layui-icon layui-icon-shrink-right"></i>
|
|
|
|
|
|
</li>
|
2023-08-04 11:06:34 +08:00
|
|
|
|
<li id="refresh" class="layui-nav-item" >
|
|
|
|
|
|
<i class="layui-icon layui-icon-refresh"></i>
|
|
|
|
|
|
</li>
|
2022-08-19 19:48:37 +08:00
|
|
|
|
</ul>
|
|
|
|
|
|
<ul class="layui-nav layui-layout-right">
|
|
|
|
|
|
|
|
|
|
|
|
<li class="layui-nav-item" lay-unselect="">
|
|
|
|
|
|
<a href="/" title="主页">
|
2023-08-04 11:06:34 +08:00
|
|
|
|
<i class="layui-icon layui-icon-home"></i>
|
2022-08-19 19:48:37 +08:00
|
|
|
|
</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
2022-11-28 19:11:12 +08:00
|
|
|
|
<li class="layui-nav-item">
|
2022-08-19 19:48:37 +08:00
|
|
|
|
<a href="javascript:;" id="notice">
|
2022-11-28 19:11:12 +08:00
|
|
|
|
<div id="unread" data-count="{$unread|default='0'}"></div>
|
|
|
|
|
|
<empty name="$unread">
|
2023-08-04 11:06:34 +08:00
|
|
|
|
<i class="layui-icon layui-icon-notice"></i>
|
2022-11-28 19:11:12 +08:00
|
|
|
|
<else/>
|
2023-08-04 11:06:34 +08:00
|
|
|
|
<i class="layui-icon layui-icon-notice"></i>
|
2022-11-28 19:11:12 +08:00
|
|
|
|
<span class="layui-badge-dot"></span>
|
|
|
|
|
|
</empty>
|
2022-08-19 19:48:37 +08:00
|
|
|
|
</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="layui-nav-item layui-hide layui-show-md-inline-block">
|
|
|
|
|
|
<a href="javascript:;"><img src="{$user.avatar}" alt="{$user.nickname}" class="layui-nav-img">{$user.nickname}</a>
|
|
|
|
|
|
<dl class="layui-nav-child">
|
2022-11-28 19:11:12 +08:00
|
|
|
|
<dd><a lay-open data-title="修改密码" data-url="/index/user/changepwd" data-area="470px,330px" href="javascript:;">修改密码</a>
|
2022-08-19 19:48:37 +08:00
|
|
|
|
</dd>
|
2022-11-28 19:11:12 +08:00
|
|
|
|
<dd><a href="/index/user/logout">退出</a></dd>
|
2022-08-19 19:48:37 +08:00
|
|
|
|
</dl>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="layui-side layui-side-body layui-bg-black">
|
|
|
|
|
|
<div class="layui-side-scroll">
|
|
|
|
|
|
<!-- 左侧导航区域(可配合layui已有的垂直导航) -->
|
|
|
|
|
|
<include file="user:userNav"/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="layui-body">
|
|
|
|
|
|
<!-- 内容主体区域 -->
|
2022-11-28 19:11:12 +08:00
|
|
|
|
<iframe id="iframe" src="/index/user/center" frameborder="0" class="layui-layer-load" onload="this.className='';" ></iframe>
|
2022-08-19 19:48:37 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<include file="user:footer"/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2022-11-28 19:11:12 +08:00
|
|
|
|
<script>
|
2022-08-19 19:48:37 +08:00
|
|
|
|
|
|
|
|
|
|
layui.use(['jquery','upload'],function(){
|
|
|
|
|
|
let $ = layui.jquery;
|
|
|
|
|
|
let upload = layui.upload;
|
|
|
|
|
|
|
|
|
|
|
|
// 点击切换页面地址
|
|
|
|
|
|
$('body').on('click', '.layui-nav-tree a', function () {
|
|
|
|
|
|
let href = $(this).attr('lay-href');
|
|
|
|
|
|
if (href && href !== 'javascript:;') {
|
|
|
|
|
|
$('#iframe').attr('class','layui-layer-load');
|
|
|
|
|
|
$('#iframe').attr('src',href);
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
let leftAnimate = function (action = true) {
|
|
|
|
|
|
if (action) {
|
|
|
|
|
|
$('.layui-side').animate({width: '0px'});
|
|
|
|
|
|
$('.layui-body,.layui-footer').animate({left: '5px'});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
$('.layui-side').animate({width: '200px'});
|
|
|
|
|
|
$('.layui-body,.layui-footer').animate({left: '200px'});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$('#shrink i.layui-icon').click(function () {
|
|
|
|
|
|
let right = 'layui-icon-shrink-right',
|
|
|
|
|
|
left = 'layui-icon-spread-left';
|
|
|
|
|
|
if ($(this).hasClass(right)) {
|
|
|
|
|
|
leftAnimate();
|
|
|
|
|
|
$(this).removeClass(right).addClass(left);
|
|
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
leftAnimate(false);
|
|
|
|
|
|
$(this).removeClass(left).addClass(right);
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
// 初始化宽度
|
|
|
|
|
|
if ($(window).width() <= 992) {
|
|
|
|
|
|
$('#shrink i.layui-icon-shrink-right').removeClass('layui-icon-shrink-right').addClass('layui-icon-spread-left');
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let skin = layui.data('skin').theme || undefined;
|
|
|
|
|
|
if (skin === 'layui-bg-white') {
|
|
|
|
|
|
$('.layui-side-body').removeClass('layui-bg-black').addClass(skin);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-04 11:06:34 +08:00
|
|
|
|
$('#refresh').click(function (e) {
|
|
|
|
|
|
$('#iframe').attr('src',$('#iframe').attr('src'));
|
|
|
|
|
|
})
|
2022-11-28 19:11:12 +08:00
|
|
|
|
bellMessage($('#unread').data('count'));
|
2022-08-19 19:48:37 +08:00
|
|
|
|
})
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|