批量更新
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<?php /*a:1:{s:56:"E:\Demos\DemoOwns\PHP\yunzer\app/tpl/think_exception.tpl";i:1745482530;}*/ ?>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>跳转提示</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<style type="text/css">
|
||||
*{box-sizing:border-box;margin:0;padding:0;font-family:Lantinghei SC,Open Sans,Arial,Hiragino Sans GB,Microsoft YaHei,"微软雅黑",STHeiti,WenQuanYi Micro Hei,SimSun,sans-serif;-webkit-font-smoothing:antialiased}
|
||||
body{padding:70px 0;background:#edf1f4;font-weight:400;font-size:1pc;-webkit-text-size-adjust:none;color:#333}
|
||||
a{outline:0;color:#3498db;text-decoration:none;cursor:pointer}
|
||||
.system-message{margin:20px 5%;padding:40px 20px;background:#fff;box-shadow:1px 1px 1px hsla(0,0%,39%,.1);text-align:center}
|
||||
.system-message h1{margin:0;margin-bottom:9pt;color:#444;font-weight:400;font-size:40px}
|
||||
.system-message .jump,.system-message .image{margin:20px 0;padding:0;padding:10px 0;font-weight:400}
|
||||
.system-message .jump{font-size:14px}
|
||||
.system-message .jump a{color:#333}
|
||||
.system-message p{font-size:9pt;line-height:20px}
|
||||
.system-message .btn{display:inline-block;margin-right:10px;width:138px;height:2pc;border:1px solid #44a0e8;border-radius:30px;color:#44a0e8;text-align:center;font-size:1pc;line-height:2pc;margin-bottom:5px;}
|
||||
.success .btn{border-color:#69bf4e;color:#69bf4e}
|
||||
.error .btn{border-color:#ff8992;color:#ff8992}
|
||||
.info .btn{border-color:#3498db;color:#3498db}
|
||||
.copyright p{width:100%;color:#919191;text-align:center;font-size:10px}
|
||||
.system-message .btn-grey{border-color:#bbb;color:#bbb}
|
||||
.clearfix:after{clear:both;display:block;visibility:hidden;height:0;content:"."}
|
||||
@media (max-width:768px){body {padding:20px 0;}}
|
||||
@media (max-width:480px){.system-message h1{font-size:30px;}}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="system-message">
|
||||
<?php
|
||||
switch ($code){
|
||||
case 1:
|
||||
?>
|
||||
<h2>
|
||||
<?php
|
||||
echo (strip_tags($msg));
|
||||
break;
|
||||
case 0:
|
||||
?>
|
||||
<h2>
|
||||
<?php
|
||||
echo (strip_tags($msg));
|
||||
break;
|
||||
}
|
||||
?>
|
||||
</h2>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,204 @@
|
||||
<?php /*a:3:{s:68:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzertest\icon_list.php";i:1745482530;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1745564348;s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!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/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.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/third/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;">
|
||||
<style type="text/css">
|
||||
ul {
|
||||
display: block;
|
||||
list-style-type: disc;
|
||||
margin-block-start: 1em;
|
||||
margin-block-end: 1em;
|
||||
margin-inline-start: 0px;
|
||||
margin-inline-end: 0px;
|
||||
/* padding-inline-start: 40px; */
|
||||
}
|
||||
.site-doc-icon {
|
||||
margin-bottom: 50px;
|
||||
font-size: 0;
|
||||
}
|
||||
li {
|
||||
list-style: none;
|
||||
}
|
||||
.site-doc-icon li {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 132px;
|
||||
height: 105px;
|
||||
line-height: 25px;
|
||||
padding: 20px 0;
|
||||
margin-right: -1px;
|
||||
margin-bottom: -1px;
|
||||
border: 1px solid #e2e2e2;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
transition: all .3s;
|
||||
-webkit-transition: all .3s;
|
||||
}
|
||||
.site-doc-icon li .layui-icon {
|
||||
display: inline-block;
|
||||
font-size: 36px;
|
||||
}
|
||||
.site-doc-icon li .doc-icon-name, .site-doc-icon li .doc-icon-code {
|
||||
color: #c2c2c2;
|
||||
}
|
||||
.site-doc-icon li .doc-icon-fontclass {
|
||||
height: 40px;
|
||||
line-height: 20px;
|
||||
padding: 0 5px;
|
||||
font-size: 13px;
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
||||
<div class="header" style="margin-bottom:20px;">
|
||||
<span>图标</span>
|
||||
<div></div>
|
||||
</div>
|
||||
<pre id="pre" class="layui-code">
|
||||
<!-- 图标 -->
|
||||
<i class="layui-icon layui-icon-face-smile"></i>
|
||||
<!-- 图标,设置颜色、大小 -->
|
||||
<i class="layui-icon layui-icon-face-smile" style="font-size:30px;color:#1E9FFF;"></i>
|
||||
<!-- 图标,设置旋转 -->
|
||||
<i class="layui-icon layui-icon-face-smile layui-anim layui-anim-rotate layui-anim-loop"></i>
|
||||
</pre>
|
||||
<ul class="site-doc-icon" style="text-align: center;">
|
||||
<?php foreach($lists as $lists_v): ?>
|
||||
<li>
|
||||
<i class="layui-icon <?php echo htmlentities((string) $lists_v['icon_css']); if(($lists_v['icon_name']=='loading')): ?> layui-anim layui-anim-rotate layui-anim-loop<?php endif; ?>"></i>
|
||||
<div class="doc-icon-name"><?php echo htmlentities((string) $lists_v['icon_name']); ?></div>
|
||||
<div class="doc-icon-code"><?php echo htmlentities((string) $lists_v['icon_html']); ?></div>
|
||||
<div class="doc-icon-fontclass"><?php echo htmlentities((string) $lists_v['icon_css']); ?></div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<script type="text/javascript">
|
||||
layui.use('code', function(){
|
||||
layui.code({
|
||||
elem:'#pre'
|
||||
,title: '使用方法'
|
||||
,encode: true
|
||||
,skin: 'notepad' //如果要默认风格,不用设定该key。
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</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>
|
||||
@@ -0,0 +1,314 @@
|
||||
<?php /*a:3:{s:68:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzertest\test_list.php";i:1745483534;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>
|
||||
<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/third/layui/css/layui.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/third/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="header">
|
||||
<span>演示列表-方法渲染</span>
|
||||
<div></div>
|
||||
</div>
|
||||
<div class="layui-form layui-card-header layuiadmin-card-header-auto" lay-filter="layadmin-useradmin-formlist" style="height:100%;">
|
||||
<div class="layui-form-item" id="search"></div>
|
||||
</div>
|
||||
<script type="text/html" id="toolbar">
|
||||
<div class="layui-btn-container">
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-primary" lay-event="add">
|
||||
<i class="layui-icon layui-icon-add-1"></i>添加
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary" lay-event="edit">
|
||||
<i class="layui-icon layui-icon-edit"></i>修改
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary" lay-event="del">
|
||||
<i class="layui-icon layui-icon-delete"></i>删除
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<table class="layui-hide" id="datalist" lay-filter="datalist"></table>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','table'],function(){
|
||||
table = layui.table;
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
get_data();
|
||||
|
||||
table.on('row(datalist)',function(obj){
|
||||
obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click');
|
||||
obj.tr.find("div.layui-unselect.layui-form-radio")[0].click();
|
||||
});
|
||||
table.on('toolbar(datalist)',function(obj){
|
||||
var checkStatus = table.checkStatus(obj.config.id);
|
||||
var data = checkStatus.data;
|
||||
var datas = obj.data;
|
||||
var layEvent = obj.event;
|
||||
var tr = obj.tr;
|
||||
|
||||
switch(obj.event){
|
||||
case 'add':
|
||||
layer.full(layer.open({
|
||||
title: '添加',
|
||||
type: 2,
|
||||
content: "<?php echo htmlentities((string) $config['admin_route']); ?>yunzertest/test_add",
|
||||
maxmin: true,
|
||||
area: ['70%','70%'],
|
||||
btn: ['确定','关闭'],
|
||||
yes: function(index,layero){
|
||||
var form = layero.find('iframe')[0].contentWindow;
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var test_img =[];
|
||||
body.find("input[name='test_img']").each(function(){
|
||||
test_img.push($(this).val());
|
||||
})
|
||||
var dataj = {
|
||||
test_input : form.test_input.value,
|
||||
test_reference : form.test_reference.value,
|
||||
test_time : form.test_time.value,
|
||||
test_data : form.test_data.value,
|
||||
test_datatime : form.test_datatime.value,
|
||||
test_img : test_img,
|
||||
test_rich : form.test_rich.value,
|
||||
test_rich_baidu : form.test_rich_baidu.value,
|
||||
test_url : form.test_url.value
|
||||
};
|
||||
$.post('<?php echo htmlentities((string) $config["admin_route"]); ?>yunzertest/test_add',dataj,function(res){
|
||||
if(res.code>0){
|
||||
layer.msg(res.msg,{'icon':2});
|
||||
}else{
|
||||
layer.msg(res.msg,{'icon':1});
|
||||
get_data();
|
||||
layer.close(index);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}))
|
||||
break;
|
||||
case 'edit':
|
||||
if(!data[0]){
|
||||
layer.msg('请选择一条数据',{'icon':2});
|
||||
return false;
|
||||
}
|
||||
layer.full(layer.open({
|
||||
title: '修改',
|
||||
type: 2,
|
||||
content: "<?php echo htmlentities((string) $config['admin_route']); ?>yunzertest/test_edit?test_id="+data[0].test_id,
|
||||
maxmin: true,
|
||||
area: ['70%','70%'],
|
||||
btn: ['确定','关闭'],
|
||||
yes: function(index,layero){
|
||||
var form = layero.find('iframe')[0].contentWindow;
|
||||
var body = layer.getChildFrame('body', index);
|
||||
|
||||
var test_img =[];
|
||||
body.find("input[name='test_img']").each(function(){
|
||||
test_img.push($(this).val());
|
||||
})
|
||||
var dataj = {
|
||||
test_id : data[0].test_id,
|
||||
test_input : form.test_input.value,
|
||||
test_reference : form.test_reference.value,
|
||||
test_time : form.test_time.value,
|
||||
test_data : form.test_data.value,
|
||||
test_datatime : form.test_datatime.value,
|
||||
test_img : test_img,
|
||||
test_rich : form.test_rich.value,
|
||||
test_rich_baidu : form.test_rich_baidu.value,
|
||||
test_url : form.test_url.value
|
||||
};
|
||||
$.post('<?php echo htmlentities((string) $config["admin_route"]); ?>yunzertest/test_edit',dataj,function(res){
|
||||
if(res.code>0){
|
||||
layer.msg(res.msg,{'icon':2});
|
||||
}else{
|
||||
layer.msg(res.msg,{'icon':1});
|
||||
get_data();
|
||||
layer.close(index);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}))
|
||||
break;
|
||||
case 'del':
|
||||
if(!data[0]){
|
||||
layer.msg('请选择一条数据',{'icon':2});
|
||||
return false;
|
||||
}
|
||||
layer.confirm('确定要删除吗?',{
|
||||
icon:3,
|
||||
btn: ['确定','取消']
|
||||
},function(){
|
||||
$.post('<?php echo htmlentities((string) $config["admin_route"]); ?>yunzertest/test_del',{'test_id':data[0].test_id},function(res){
|
||||
if(res.code>0){
|
||||
layer.alert(res.msg,{icon:2});
|
||||
}else{
|
||||
layer.msg(res.msg);
|
||||
setTimeout(function(){window.location.reload();},1000);
|
||||
}
|
||||
},'json');
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
function get_data(){
|
||||
table.render({
|
||||
elem: '#datalist',
|
||||
method : 'post'
|
||||
,url:"<?php echo htmlentities((string) $config['admin_route']); ?>yunzertest/test_list"
|
||||
,toolbar: '#toolbar'
|
||||
,defaultToolbar: ['filter', 'print', 'exports', {
|
||||
title: '提示'
|
||||
,layEvent: 'LAYTABLE_TIPS'
|
||||
,icon: 'layui-icon-tips'
|
||||
}]
|
||||
,title: '演示列表'
|
||||
,page: true
|
||||
,cols: [[
|
||||
{type:'checkbox'},
|
||||
{type:'radio'}
|
||||
,{field:'test_id', width:50, title:'ID'}
|
||||
,{field:'test_input', width:100, title: '文本'}
|
||||
,{field:'test_rich', width:100, title: '富文本'}
|
||||
,{field:'test_rich_baidu', width:120, title: '百度文本'}
|
||||
,{field:'test_img', width:100, title: '图片',templet:function(res){
|
||||
return '<img style="width:30px;height:30px;" onmouseover="show_img(this)" onmouseleave="hide_img()" src="'+res.test_img+'"';
|
||||
}}
|
||||
,{field:'test_reference', width:100, title: '参照',templet:function(res){
|
||||
if(res.test_reference == 1){
|
||||
return '<span style="color:green;">开启</span>';
|
||||
}else{
|
||||
return '<span style="color:grey;">关闭</span>';
|
||||
}
|
||||
}}
|
||||
,{field:'test_time', width:100, title: '时间戳'}
|
||||
,{field:'test_data', width:100, title: '日期'}
|
||||
,{field:'test_datatime', width:150, title: '日期时间'}
|
||||
,{field:'test_url', width:150, title: '网址链接',templet:function(res){
|
||||
return '<a href="'+res.test_url+'" target="_blank">'+res.test_url+'</a>';
|
||||
}}
|
||||
]]
|
||||
,data:[]
|
||||
,limit :10
|
||||
,limits:[10,20,30]
|
||||
,height: 'full-100'
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</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>
|
||||
@@ -0,0 +1,271 @@
|
||||
<?php /*a:3:{s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\index\welcome.php";i:1745569331;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1745564348;s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!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/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.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/third/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;">
|
||||
<style>
|
||||
.dashboard-container {
|
||||
padding: 20px;
|
||||
font-family: 'Helvetica Neue', Arial, sans-serif;
|
||||
}
|
||||
.welcome-header {
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.welcome-header h1 {
|
||||
color: #3881fd;
|
||||
font-weight: 300;
|
||||
font-size: 28px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.stats-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
justify-content: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.stat-card {
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
|
||||
padding: 20px;
|
||||
min-width: 200px;
|
||||
flex: 1;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.stat-card:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.stat-card .stat-value {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
color: #3881fd;
|
||||
margin: 10px 0;
|
||||
}
|
||||
.stat-card .stat-title {
|
||||
color: #7f8c8d;
|
||||
font-size: 14px;
|
||||
}
|
||||
.quick-actions {
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.quick-actions h2 {
|
||||
color: #2c3e50;
|
||||
font-size: 18px;
|
||||
margin-bottom: 15px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.action-buttons {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
}
|
||||
.action-button {
|
||||
background-color: #f8f9fa;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
padding: 10px 15px;
|
||||
color: #3881fd;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
.action-button:hover {
|
||||
background-color: #e9ecef;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="dashboard-container">
|
||||
<div class="welcome-header">
|
||||
<h1>欢迎使用<?php echo htmlentities((string) $config['admin_name']); ?></h1>
|
||||
<p>今天是 <span id="current-time"></span>,祝您工作愉快</p>
|
||||
</div>
|
||||
|
||||
<div class="stats-container">
|
||||
<div class="stat-card">
|
||||
<div class="stat-title">用户总数</div>
|
||||
<div class="stat-value">1,234</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="stat-title">今日访问</div>
|
||||
<div class="stat-value">256</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="stat-title">数据总量</div>
|
||||
<div class="stat-value">8,642</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="stat-title">系统消息</div>
|
||||
<div class="stat-value">12</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="quick-actions">
|
||||
<h2>快捷操作</h2>
|
||||
<div class="action-buttons">
|
||||
<button class="action-button">用户管理</button>
|
||||
<button class="action-button">内容发布</button>
|
||||
<button class="action-button">数据统计</button>
|
||||
<button class="action-button">系统设置</button>
|
||||
<button class="action-button">清除缓存</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function updateTime() {
|
||||
var now = new Date();
|
||||
var year = now.getFullYear();
|
||||
var month = now.getMonth() + 1;
|
||||
var date = now.getDate();
|
||||
var hours = now.getHours();
|
||||
var minutes = now.getMinutes();
|
||||
var seconds = now.getSeconds();
|
||||
|
||||
// 补零函数
|
||||
var padZero = function(num) {
|
||||
return num < 10 ? '0' + num : num;
|
||||
};
|
||||
|
||||
// 格式化时间
|
||||
var timeString = year + '年' +
|
||||
padZero(month) + '月' +
|
||||
padZero(date) + '日 ' +
|
||||
padZero(hours) + ':' +
|
||||
padZero(minutes) + ':' +
|
||||
padZero(seconds);
|
||||
|
||||
document.getElementById('current-time').innerHTML = timeString;
|
||||
}
|
||||
|
||||
// 页面加载完立即执行一次
|
||||
updateTime();
|
||||
|
||||
// 每秒更新一次时间
|
||||
setInterval(updateTime, 1000);
|
||||
</script>
|
||||
|
||||
</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>
|
||||
@@ -0,0 +1,226 @@
|
||||
<?php /*a:3:{s:75:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzertest\test_static_list.php";i:1745483534;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1745564348;s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!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/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.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/third/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="header">
|
||||
<span>演示列表-静态表格</span>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" onclick="add()">
|
||||
<i class="layui-icon layui-icon-add-1"></i>添加
|
||||
</button>
|
||||
<div></div>
|
||||
</div>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>文本</th>
|
||||
<th>富文本</th>
|
||||
<th>百度文本</th>
|
||||
<th>图片</th>
|
||||
<th>参照</th>
|
||||
<th>时间戳</th>
|
||||
<th>日期</th>
|
||||
<th>日期时间</th>
|
||||
<th>网址链接</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(is_array($lists) || $lists instanceof \think\Collection || $lists instanceof \think\Paginator): $i = 0; $__LIST__ = $lists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
|
||||
<tr>
|
||||
<td><?php echo htmlentities((string) $vo['test_id']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['test_input']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['test_rich']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['test_rich_baidu']); ?></td>
|
||||
<td>
|
||||
<img style="width:30px;height:30px;" onmouseover="show_img(this)" onmouseleave="hide_img()" src="<?php echo htmlentities((string) $vo['test_img']); ?>">
|
||||
</td>
|
||||
<td>
|
||||
<?php if(($vo['test_reference'] == 1)): ?>
|
||||
<span style="color:green;">开启</span>
|
||||
<?php else: ?>
|
||||
<span style="color:grey;">关闭</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php echo date('Y-m-d H:i:s',$vo['test_time']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['test_data']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['test_datatime']); ?></td>
|
||||
<td><a href="<?php echo htmlentities((string) $vo['test_url']); ?>" target="_blank"><?php echo htmlentities((string) $vo['test_url']); ?></a></td>
|
||||
<td>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" onclick="edit(<?php echo htmlentities((string) $vo['test_id']); ?>)">
|
||||
<i class="layui-icon layui-icon-edit"></i>编辑
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" onclick="del(<?php echo htmlentities((string) $vo['test_id']); ?>)">
|
||||
<i class="layui-icon layui-icon-delete"></i>删除
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div><?php echo $lists; ?></div>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer'],function(){
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
});
|
||||
// 添加
|
||||
function add(){
|
||||
layer.full(
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '添加',
|
||||
shade: 0.3,
|
||||
maxmin: true,
|
||||
area: ['450px','550px'],
|
||||
content: "<?php echo htmlentities((string) $config['admin_route']); ?>Yunzertest/test_static_add"
|
||||
})
|
||||
);
|
||||
}
|
||||
// 编辑
|
||||
function edit(test_id){
|
||||
layer.full(layer.open({
|
||||
type: 2,
|
||||
title: '编辑',
|
||||
shade: 0.3,
|
||||
area: ['450px','550px'],
|
||||
content: "<?php echo htmlentities((string) $config['admin_route']); ?>Yunzertest/test_static_edit?test_id="+test_id
|
||||
}));
|
||||
}
|
||||
// 删除
|
||||
function del(test_id){
|
||||
layer.confirm('确定要删除吗?', {
|
||||
icon:3,
|
||||
btn: ['确定','取消']
|
||||
}, function(){
|
||||
$.post("<?php echo htmlentities((string) $config['admin_route']); ?>Yunzertest/test_del",{'test_id':test_id},function(res){
|
||||
if(res.code>0){
|
||||
layer.alert(res.msg,{icon:2});
|
||||
}else{
|
||||
layer.msg(res.msg,{icon:1});
|
||||
setTimeout(function(){window.location.reload();},1000);
|
||||
}
|
||||
},'json');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</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>
|
||||
@@ -0,0 +1,176 @@
|
||||
<?php /*a:3:{s:69:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzeradmin\groupedit.php";i:1745570765;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1745564348;s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!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/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.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/third/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">
|
||||
<input type="hidden" name="group_id" value="<?php echo htmlentities((string) $group['group_id']); ?>">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">角色名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" class="layui-input" name="group_name" placeholder="请输入角色名称" value="<?php echo htmlentities((string) $group['group_name']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="status" value="1" title="开启" <?php echo $group['status']==1 ? 'checked' : ''; ?>>
|
||||
<input type="radio" name="status" value="0" title="禁用" <?php echo $group['status']==0 ? 'checked' : ''; ?>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-itme">
|
||||
<label class="layui-form-label">权限菜单</label>
|
||||
<?php if(is_array($menus) || $menus instanceof \think\Collection || $menus instanceof \think\Paginator): $i = 0; $__LIST__ = $menus;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
|
||||
<hr>
|
||||
<div class="layui-input-block">
|
||||
<input type="checkbox" name="menu[<?php echo htmlentities((string) $vo['smid']); ?>]" lay-skin="primary" title="<?php echo htmlentities((string) $vo['label']); ?>" <?php echo isset($group['rights']) && $group['rights'] && in_array($vo['smid'],$group['rights'])?'checked':''; ?>>
|
||||
<hr>
|
||||
<?php if(is_array($vo['children']) || $vo['children'] instanceof \think\Collection || $vo['children'] instanceof \think\Paginator): $i = 0; $__LIST__ = $vo['children'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$cvo): $mod = ($i % 2 );++$i;?>
|
||||
<input type="checkbox" name="menu[<?php echo htmlentities((string) $cvo['smid']); ?>]" lay-skin="primary" title="<?php echo htmlentities((string) $cvo['label']); ?>" <?php echo isset($group['rights']) && $group['rights'] && in_array($cvo['smid'],$group['rights'])?'checked':''; ?>>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</div>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-form-item" style="margin-top:10px;">
|
||||
<div class="layui-input-block">
|
||||
<button type="button" class="layui-btn" onclick="save()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form'],function(){
|
||||
var form = layui.form;
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
});
|
||||
|
||||
function save(){
|
||||
$.post("<?php echo htmlentities((string) $config['admin_route']); ?>yunzeradmin/groupedit",$('form').serialize(),function(res){
|
||||
if(res.code>0){
|
||||
layer.msg(res.msg,{'icon':2});
|
||||
}else{
|
||||
layer.msg(res.msg,{'icon':1});
|
||||
setTimeout(function(){parent.window.location.reload();},1000);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
</script>
|
||||
</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>
|
||||
@@ -0,0 +1,168 @@
|
||||
<?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>
|
||||
<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/third/layui/css/layui.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/third/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" value="<?php echo htmlentities((string) $find['config_name']); ?>">
|
||||
</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="请输入作用" value="<?php echo htmlentities((string) $find['config_info']); ?>">
|
||||
</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" <?php echo $find['config_type']==1 ? 'selected' : ''; ?>>文本</option>
|
||||
<option value="2" <?php echo $find['config_type']==2 ? 'selected' : ''; ?>>图片</option>
|
||||
<option value="3" <?php echo $find['config_type']==3 ? 'selected' : ''; ?>>富文本</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="请输入说明" value="<?php echo htmlentities((string) $find['config_desc']); ?>">
|
||||
</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="<?php echo htmlentities((string) $find['config_sort']); ?>">
|
||||
</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" <?php echo $find['config_status']==1 ? 'selected' : ''; ?>>开启</option>
|
||||
<option value="0" <?php echo $find['config_status']==0 ? 'selected' : ''; ?>>禁用</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>
|
||||
@@ -0,0 +1,236 @@
|
||||
<?php /*a:3:{s:63:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzer\menuinfo.php";i:1745566591;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1745564348;s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!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/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.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/third/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-sm layui-btn-primary" onclick="add()">
|
||||
<i class="layui-icon layui-icon-add-1"></i>添加
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary" onclick="refresh()">
|
||||
<i class="layui-icon layui-icon-refresh"></i>刷新
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="test7" class="demo-tree"></div>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center">类型</th>
|
||||
<th style="text-align:center">菜单名</th>
|
||||
<th style="text-align:center">图标</th>
|
||||
<th style="text-align:center">排序</th>
|
||||
<th style="text-align:center">状态</th>
|
||||
<th style="text-align:center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(is_array($lists) || $lists instanceof \think\Collection || $lists instanceof \think\Paginator): $i = 0; $__LIST__ = $lists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<?php if(($vo['type']==1)): ?>
|
||||
功能模块:<?php echo htmlentities((string) $vo['src']); elseif(($vo['type']==2)): ?>
|
||||
超链接:<?php echo htmlentities((string) $vo['src']); else: ?>
|
||||
顶级
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td align="center"><?php echo htmlentities((string) $vo['label']); ?></td>
|
||||
<td align="center"><i class="layui-icon <?php echo htmlentities((string) $vo['icon_class']); ?>"></i> <?php echo htmlentities((string) $vo['icon_class']); ?></td>
|
||||
<td align="center"><?php echo htmlentities((string) $vo['sort']); ?></td>
|
||||
<td align="center"><?php echo $vo['status']==1 ? '开启' : '<span style="color:red;">禁用</span>'; ?></td>
|
||||
<td align="center">
|
||||
<?php if(($vo['type'] == 0)): ?>
|
||||
<button type="button" class="layui-btn layui-btn-xs layui-btn-normal"
|
||||
onclick="buttonInfo(<?php echo htmlentities((string) $vo['smid']); ?>)">下级菜单</button>
|
||||
<?php endif; ?>
|
||||
<button type="button" class="layui-btn layui-btn-xs layui-btn-primary" onclick="edit(<?php echo htmlentities((string) $vo['smid']); ?>)">
|
||||
<i class="layui-icon layui-icon-edit"></i>编辑
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-xs layui-btn-primary" onclick="del(<?php echo htmlentities((string) $vo['smid']); ?>)">
|
||||
<i class="layui-icon layui-icon-delete"></i>删除
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer'], function () {
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
});
|
||||
// 添加
|
||||
function add() {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '添加菜单',
|
||||
shade: 0.3,
|
||||
area: ['550px', '550px'],
|
||||
content: '<?php echo htmlentities((string) $config["admin_route"]); ?>yunzer/menuadd'
|
||||
});
|
||||
}
|
||||
// 编辑
|
||||
function edit(smid) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '编辑菜单',
|
||||
shade: 0.3,
|
||||
area: ['550px', '550px'],
|
||||
content: '<?php echo htmlentities((string) $config["admin_route"]); ?>yunzer/menuedit?smid=' + smid
|
||||
});
|
||||
}
|
||||
// 删除
|
||||
function del(smid) {
|
||||
layer.confirm('确定要删除吗?', {
|
||||
icon: 3,
|
||||
btn: ['确定', '取消']
|
||||
}, function () {
|
||||
$.post('<?php echo htmlentities((string) $config["admin_route"]); ?>yunzer/menudel', { 'smid': smid }, function (res) {
|
||||
if (res.code > 0) {
|
||||
layer.alert(res.msg, { icon: 2 });
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 1 });
|
||||
setTimeout(function () { window.location.reload(); }, 1000);
|
||||
}
|
||||
}, 'json');
|
||||
});
|
||||
}
|
||||
// 按钮列表
|
||||
function buttonInfo(smid) {
|
||||
window.location.href = "<?php echo htmlentities((string) $config['admin_route']); ?>yunzer/buttoninfo?smid=" + smid;
|
||||
}
|
||||
|
||||
//刷新列表
|
||||
function refresh() {
|
||||
window.location.reload();
|
||||
}
|
||||
</script>
|
||||
|
||||
</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>
|
||||
@@ -0,0 +1,408 @@
|
||||
<?php /*a:3:{s:65:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzer\configlist.php";i:1745553686;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1745564348;s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!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/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.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/third/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;">
|
||||
<style>
|
||||
.config-container {
|
||||
padding: 20px;
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
.config-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 30px;
|
||||
padding-bottom: 15px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.config-header span {
|
||||
font-size: 18px;
|
||||
color: #2c3e50;
|
||||
font-weight: 500;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.config-header a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.config-header a span {
|
||||
padding: 6px 15px;
|
||||
background: #f8f9fa;
|
||||
border-radius: 4px;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.config-header a span:hover {
|
||||
background: #e9ecef;
|
||||
color: #409EFF;
|
||||
}
|
||||
.action-buttons {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.layui-btn {
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
||||
transition: all 0.3s;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
padding: 0 16px;
|
||||
}
|
||||
.layui-btn:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
|
||||
}
|
||||
.layui-btn .layui-icon {
|
||||
margin-right: 4px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.layui-table {
|
||||
margin: 15px 0;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.layui-table thead tr {
|
||||
background-color: #fafafa;
|
||||
}
|
||||
.layui-table tbody tr:hover {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
.layui-table-cell {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
.layui-badge {
|
||||
padding: 4px 8px;
|
||||
border-radius: 3px;
|
||||
font-weight: 500;
|
||||
height: auto;
|
||||
}
|
||||
.layui-badge.layui-bg-green {
|
||||
background-color: #67C23A !important;
|
||||
}
|
||||
.layui-badge.layui-bg-gray {
|
||||
background-color: #909399 !important;
|
||||
}
|
||||
.layui-layer {
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="config-container">
|
||||
<div class="config-header">
|
||||
<span>站点管理</span>
|
||||
<!-- <a href="<?php echo htmlentities((string) $config['admin_route']); ?>Yunzer/configvalue">
|
||||
<span>站点配置</span>
|
||||
</a> -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-card-body" style="padding: 0;">
|
||||
<div class="action-buttons">
|
||||
<button type="button" class="layui-btn layui-btn-normal" id="btn-add">
|
||||
<i class="layui-icon layui-icon-add-1"></i>添加
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-normal" id="btn-edit">
|
||||
<i class="layui-icon layui-icon-edit"></i>修改
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-danger" id="btn-del">
|
||||
<i class="layui-icon layui-icon-delete"></i>删除
|
||||
</button>
|
||||
</div>
|
||||
<table class="layui-table" id="lists" lay-filter="lists"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer', 'table', 'element'], function () {
|
||||
var table = layui.table;
|
||||
var layer = layui.layer;
|
||||
var element = layui.element;
|
||||
var $ = layui.jquery;
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
table.render({
|
||||
elem: '#lists',
|
||||
method: 'post',
|
||||
url: "<?php echo htmlentities((string) $config['admin_route']); ?>yunzer/configlist",
|
||||
title: '配置列表',
|
||||
page: true,
|
||||
skin: 'line',
|
||||
even: true,
|
||||
size: 'lg',
|
||||
cols: [[
|
||||
{ type: 'radio', fixed: 'left', width: 50 },
|
||||
{ field: 'config_id', width: 80, title: 'ID', sort: true, align: 'center' },
|
||||
{ field: 'config_sort', width: 120, title: '排序', sort: true, align: 'center' },
|
||||
{ field: 'config_name', width: 150, title: '关键词' },
|
||||
{ field: 'config_info', width: 150, title: '作用' },
|
||||
{ field: 'config_desc', minWidth: 300, title: '说明' },
|
||||
{
|
||||
field: 'config_status', width: 100, title: '状态', align: 'center', templet: function (res) {
|
||||
if (res.config_status == 1) {
|
||||
return '<span class="layui-badge layui-bg-green">开启</span>';
|
||||
} else {
|
||||
return '<span class="layui-badge layui-bg-gray">关闭</span>';
|
||||
}
|
||||
}
|
||||
}
|
||||
]],
|
||||
limit: 15,
|
||||
limits: [15, 30, 50, 100],
|
||||
height: 'full-180'
|
||||
});
|
||||
}
|
||||
|
||||
// 加载表格数据
|
||||
initTable();
|
||||
|
||||
// 行点击事件
|
||||
table.on('row(lists)', function (obj) {
|
||||
obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click');
|
||||
obj.tr.find("div.layui-unselect.layui-form-radio")[0].click();
|
||||
});
|
||||
|
||||
// 添加按钮事件
|
||||
$('#btn-add').on('click', function () {
|
||||
layer.open({
|
||||
title: '<i class="layui-icon layui-icon-add-1"></i> 添加配置',
|
||||
type: 2,
|
||||
content: '<?php echo htmlentities((string) $config["admin_route"]); ?>yunzer/configadd',
|
||||
maxmin: true,
|
||||
area: ['700px', '550px'],
|
||||
skin: 'layui-layer-molv',
|
||||
btn: ['确定', '取消'],
|
||||
yes: function (index, layero) {
|
||||
var form = layero.find('iframe')[0].contentWindow;
|
||||
var button = {
|
||||
config_name: form.config_name.value,
|
||||
config_info: form.config_info.value,
|
||||
config_type: form.config_type.value,
|
||||
config_desc: form.config_desc.value,
|
||||
config_sort: form.config_sort.value,
|
||||
config_status: form.config_status.value
|
||||
};
|
||||
|
||||
var loadIndex = layer.load(1, {
|
||||
shade: [0.1,'#fff']
|
||||
});
|
||||
|
||||
$.post('<?php echo htmlentities((string) $config["admin_route"]); ?>yunzer/configadd', button, function (res) {
|
||||
layer.close(loadIndex);
|
||||
if (res.code > 0) {
|
||||
layer.msg(res.msg, { icon: 2, time: 2000 });
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 1, time: 1000 });
|
||||
initTable();
|
||||
layer.close(index);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 编辑按钮事件
|
||||
$('#btn-edit').on('click', function () {
|
||||
var checkStatus = table.checkStatus('lists');
|
||||
var data = checkStatus.data;
|
||||
|
||||
if (data.length === 0) {
|
||||
layer.msg('请选择一条数据进行编辑', { icon: 0 });
|
||||
return;
|
||||
}
|
||||
|
||||
layer.open({
|
||||
title: '<i class="layui-icon layui-icon-edit"></i> 修改配置',
|
||||
type: 2,
|
||||
content: '<?php echo htmlentities((string) $config["admin_route"]); ?>yunzer/configedit?config_id=' + data[0].config_id,
|
||||
maxmin: true,
|
||||
area: ['700px', '550px'],
|
||||
skin: 'layui-layer-molv',
|
||||
btn: ['确定', '取消'],
|
||||
yes: function (index, layero) {
|
||||
var form = layero.find('iframe')[0].contentWindow;
|
||||
var button = {
|
||||
config_id: data[0].config_id,
|
||||
config_name: form.config_name.value,
|
||||
config_info: form.config_info.value,
|
||||
config_type: form.config_type.value,
|
||||
config_desc: form.config_desc.value,
|
||||
config_sort: form.config_sort.value,
|
||||
config_status: form.config_status.value
|
||||
};
|
||||
|
||||
var loadIndex = layer.load(1, {
|
||||
shade: [0.1,'#fff']
|
||||
});
|
||||
|
||||
$.post('<?php echo htmlentities((string) $config["admin_route"]); ?>yunzer/configedit', button, function (res) {
|
||||
layer.close(loadIndex);
|
||||
if (res.code > 0) {
|
||||
layer.msg(res.msg, { icon: 2, time: 2000 });
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 1, time: 1000 });
|
||||
initTable();
|
||||
layer.close(index);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 删除按钮事件
|
||||
$('#btn-del').on('click', function () {
|
||||
var checkStatus = table.checkStatus('lists');
|
||||
var data = checkStatus.data;
|
||||
|
||||
if (data.length === 0) {
|
||||
layer.msg('请选择一条数据进行删除', { icon: 0 });
|
||||
return;
|
||||
}
|
||||
|
||||
layer.confirm('确定要删除该配置吗?', {
|
||||
icon: 3,
|
||||
title: '删除确认',
|
||||
skin: 'layui-layer-molv',
|
||||
btn: ['确定', '取消']
|
||||
}, function () {
|
||||
var loadIndex = layer.load(1, {
|
||||
shade: [0.1,'#fff']
|
||||
});
|
||||
|
||||
$.post('<?php echo htmlentities((string) $config["admin_route"]); ?>yunzer/configdel', { 'config_id': data[0].config_id }, function (res) {
|
||||
layer.close(loadIndex);
|
||||
if (res.code > 0) {
|
||||
layer.msg(res.msg, { icon: 2, time: 2000 });
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 1, time: 1000 });
|
||||
initTable();
|
||||
}
|
||||
}, 'json');
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</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>
|
||||
@@ -0,0 +1,174 @@
|
||||
<?php /*a:1:{s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\index\index.php";i:1745570174;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<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/third/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/index.css" media="all">
|
||||
<script type="text/javascript" src="/static/third/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/static/js/admin.js"></script>
|
||||
<style>
|
||||
.layadmin-side-shrink .layui-layout-admin .layui-logo {
|
||||
width: 60px;
|
||||
background-image: url("/static/images/logob32.jpg");
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body layadmin-themealias="default" class="layui-layout-body">
|
||||
<div id="LAY_app" class="layadmin-tabspage-none">
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
<div class="layui-header">
|
||||
<!-- 头部区域 -->
|
||||
<div style="display: flex;align-items: center;height:70px;">
|
||||
<ul class="layui-nav layui-layout-left">
|
||||
<li class="layui-nav-item layadmin-flexible" lay-unselect onclick="shrink()">
|
||||
<a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
|
||||
<i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
|
||||
<li class="layui-nav-item layui-hide-xs" lay-unselect title="全屏" onclick="fullScreen()">
|
||||
<a href="javascript:;" layadmin-event="fullscreen">
|
||||
<i class="layui-icon layui-icon-screen-full"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-nav-item" lay-unselect>
|
||||
<a href="javascript:;">
|
||||
<cite><?php echo htmlentities((string) $aUser['name']); ?></cite>
|
||||
</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a lay-href="" onclick="menuFire('yunzeradmin/admininfo',1)">个人中心</a></dd>
|
||||
<hr>
|
||||
<dd layadmin-event="logout" style="text-align:center;" onclick="logout()">
|
||||
<a>退出</a>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 侧边菜单 -->
|
||||
<div class="layui-side layui-side-menu">
|
||||
<div class="layui-side-scroll">
|
||||
<div class="layui-logo" lay-href="" style="display: flex;align-items: center;">
|
||||
<img src="/static/images/logo-l-w.png" alt="<?php echo htmlentities((string) $config['admin_name']); ?>"
|
||||
style="max-width: 100%; max-height: 100%;">
|
||||
</div>
|
||||
<ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu"
|
||||
lay-filter="layadmin-system-side-menu">
|
||||
<?php if(is_array($menu) || $menu instanceof \think\Collection || $menu instanceof \think\Paginator): $i = 0; $__LIST__ = $menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
|
||||
<li data-name="" data-jump="" class="layui-nav-item">
|
||||
<a href="javascript:;" lay-tips="<?php echo htmlentities((string) $vo['label']); ?>" lay-direction="2">
|
||||
<i class="layui-icon layui-icons <?php echo htmlentities((string) $vo['icon_class']); ?>"></i>
|
||||
<cite><?php echo htmlentities((string) $vo['label']); ?></cite>
|
||||
</a>
|
||||
<?php if((isset($vo['children']) && $vo['children'])): ?>
|
||||
<dl class="layui-nav-child">
|
||||
<?php if(is_array($vo['children']) || $vo['children'] instanceof \think\Collection || $vo['children'] instanceof \think\Paginator): $i = 0; $__LIST__ = $vo['children'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$cvo): $mod = ($i % 2 );++$i;?>
|
||||
<dd data-name="" data-jump="/">
|
||||
<?php if($cvo['type'] == 1): ?>
|
||||
<a href="javascript:;" onclick="menuFire('<?php echo htmlentities((string) $cvo['src']); ?>',1)">
|
||||
<i class="layui-icon layui-icons <?php echo htmlentities((string) $cvo['icon_class']); ?>"></i><?php echo htmlentities((string) $cvo['label']); ?>
|
||||
</a>
|
||||
<?php elseif($cvo['type'] == 2): ?>
|
||||
<a href="<?php echo htmlentities((string) $cvo['src']); ?>" target="_blank">
|
||||
<i class="layui-icon layui-icons <?php echo htmlentities((string) $cvo['icon_class']); ?>"></i><?php echo htmlentities((string) $cvo['label']); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</dl>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</ul>
|
||||
<div style="position: absolute;bottom:20px;width:200px;display:flex;justify-content: center;">
|
||||
<a style="color:#848484" href="https://www.yunzer.cn/">POWER BY 云泽网</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 主体内容 -->
|
||||
<div class="layui-body" id="LAY_app_body">
|
||||
<div class="layadmin-tabsbody-item layui-show">
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<iframe src="<?php echo htmlentities((string) $config['admin_route']); ?>index/welcome" onload="resetMainHeight(this)"
|
||||
style="width:100%;height:100%;" frameborder="0" scrolling="0"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 辅助元素,一般用于移动设备下遮罩 -->
|
||||
<div class="layadmin-body-shade" layadmin-event="shade" onclick="shrink()"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 辅助元素,一般用于移动设备下遮罩 -->
|
||||
<div class="layadmin-body-shade" layadmin-event="shade"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use(['element', 'layer', 'jquery'], function () {
|
||||
var element = layui.element;
|
||||
$ = layui.jquery;
|
||||
layer = layui.layer;
|
||||
setter = layui.setter;
|
||||
$('#clearcache').on('click', function () {
|
||||
$.ajax({
|
||||
url: "<?php echo htmlentities((string) $config['admin_route']); ?>index/clear",
|
||||
success: function (res) {
|
||||
if (res.code > 0) {
|
||||
layer.msg(res.msg, { 'icon': 2 });
|
||||
} else {
|
||||
layer.msg(res.msg, { 'icon': 1 });
|
||||
setTimeout(function () { parent.window.location.reload(); }, 1000);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
// 重新设置主操作页面高度
|
||||
function resetMainHeight(obj) {
|
||||
// parent 上级
|
||||
// clientHeight 元素的像素高度,包含元素的高度+内边距,不包含水平滚动条,边框和外边距
|
||||
var height = parent.document.documentElement.clientHeight - 80;
|
||||
$(obj).parent('div').height(height);
|
||||
}
|
||||
// 菜单点击
|
||||
function menuFire(obj, num) {
|
||||
if (num == 1) {
|
||||
$('iframe').attr('src', "<?php echo htmlentities((string) $config['admin_route']); ?>" + obj);
|
||||
}
|
||||
var width = screen();
|
||||
if (width < 2) {
|
||||
shrink();
|
||||
}
|
||||
}
|
||||
// 退出
|
||||
function logout() {
|
||||
layer.confirm('确定要退出吗?', {
|
||||
icon: 3,
|
||||
btn: ['确定', '取消']
|
||||
}, function () {
|
||||
$.get("<?php echo htmlentities((string) $config['admin_route']); ?>login/logout", function (res) {
|
||||
if (res.code > 0) {
|
||||
layer.msg(res.msg, { 'icon': 2 });
|
||||
} else {
|
||||
layer.msg(res.msg, { 'icon': 1 });
|
||||
setTimeout(function () { window.location.href = "<?php echo htmlentities((string) $config['admin_route']); ?>login/index"; }, 1000);
|
||||
}
|
||||
}, 'json');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,198 @@
|
||||
<?php /*a:3:{s:68:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzeradmin\useredit.php";i:1745483534;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1745564348;s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!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/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.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/third/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">
|
||||
<input type="hidden" name="uid" value="<?php echo htmlentities((string) $lists['uid']); ?>">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">账户</label>
|
||||
<div class="layui-input-inline"><input type="text" class="layui-input" value="<?php echo htmlentities((string) $lists['account']); ?>" readonly></div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">姓 名</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" class="layui-input" name="name" placeholder="请输入真实姓名" value="<?php echo htmlentities((string) $lists['name']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">手机号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" class="layui-input" name="phone" placeholder="请输入手机号" value="<?php echo htmlentities((string) $lists['phone']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">QQ号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" class="layui-input" name="qq" placeholder="请输入QQ号" value="<?php echo htmlentities((string) $lists['qq']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">部门</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="group_id">
|
||||
<option value=0></option>
|
||||
<?php if(is_array($group) || $group instanceof \think\Collection || $group instanceof \think\Paginator): $i = 0; $__LIST__ = $group;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
|
||||
<option value="<?php echo htmlentities((string) $vo['group_id']); ?>" <?php echo $vo['group_id']==$lists['group_id'] ? 'selected' : ''; ?>><?php echo htmlentities((string) $vo['group_name']); ?></option>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">性别</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="sex" value="1" title="男" <?php echo $lists['sex']==1 ? 'checked' : ''; ?>>
|
||||
<input type="radio" name="sex" value="2" title="女" <?php echo $lists['sex']==2 ? 'checked' : ''; ?>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="status" value="1" title="开启" <?php echo $lists['status']==1 ? 'checked' : ''; ?>>
|
||||
<input type="radio" name="status" value="0" title="禁用" <?php echo $lists['status']==0 ? 'checked' : ''; ?>>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" onclick="save()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form'],function(){
|
||||
form = layui.form;
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
});
|
||||
// 保存管理员
|
||||
function save(){
|
||||
$.post("<?php echo htmlentities((string) $config['admin_route']); ?>yunzeradmin/useredit",$('form').serialize(),function(res){
|
||||
if(res.code>0){
|
||||
layer.alert(res.msg,{icon:2});
|
||||
}else{
|
||||
layer.msg(res.msg);
|
||||
setTimeout(function(){parent.window.location.reload();},1000);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
</script>
|
||||
</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>
|
||||
@@ -0,0 +1,180 @@
|
||||
<?php /*a:3:{s:63:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzer\menuedit.php";i:1745504993;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1745564348;s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!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/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.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/third/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">
|
||||
<input type="hidden" name="smid" value="<?php echo htmlentities((string) $lists['smid']); ?>">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">菜单名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" class="layui-input" name="label" placeholder="请输入菜单名" value="<?php echo htmlentities((string) $lists['label']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">图标</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="icon_class" lay-verify="required" lay-search="">
|
||||
<option value="">请输入layui图标</option>
|
||||
<?php foreach($iconfont as $icon_v): ?>
|
||||
<option value="<?php echo htmlentities((string) $icon_v['icon_css']); ?>" <?php if(($icon_v['icon_css'] == $lists['icon_class'])): ?>selected<?php endif; ?>><?php echo htmlentities((string) $icon_v['icon_css']); ?> <?php echo htmlentities((string) $icon_v['icon_name']); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="number" class="layui-input" name="sort" placeholder="值越大越靠前" value="<?php echo htmlentities((string) $lists['sort']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="status" value="1" title="开启" <?php echo $lists['status']==1 ? 'checked' : ''; ?>>
|
||||
<input type="radio" name="status" value="0" title="禁用" <?php echo $lists['status']==0 ? 'checked' : ''; ?>>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-form-item" style="margin-top:10px;">
|
||||
<div class="layui-input-block">
|
||||
<button type="button" class="layui-btn" onclick="save()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form'],function(){
|
||||
form = layui.form;
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
});
|
||||
|
||||
function save(){
|
||||
$.post('<?php echo htmlentities((string) $config["admin_route"]); ?>yunzer/menuedit',$('form').serialize(),function(res){
|
||||
if(res.code>0){
|
||||
layer.msg(res.msg,{'icon':2});
|
||||
}else{
|
||||
layer.msg(res.msg,{'icon':1});
|
||||
setTimeout(function(){parent.window.location.reload();},1000);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
</script>
|
||||
</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>
|
||||
@@ -0,0 +1,219 @@
|
||||
<?php /*a:3:{s:69:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzeradmin\groupinfo.php";i:1745570756;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1745564348;s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!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/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.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/third/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="add()">
|
||||
<i class="layui-icon layui-icon-add-1"></i>添加
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary" onclick="refresh()">
|
||||
<i class="layui-icon layui-icon-refresh"></i>刷新
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>角色名</th>
|
||||
<th>状态</th>
|
||||
<th>添加时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(is_array($group) || $group instanceof \think\Collection || $group instanceof \think\Paginator): $i = 0; $__LIST__ = $group;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
|
||||
<tr>
|
||||
<td><?php echo htmlentities((string) $vo['group_name']); ?></td>
|
||||
<td><?php echo $vo['status']==1 ? '开启' : '<span style="color:red;">禁用</span>'; ?></td>
|
||||
<td><?php echo date('Y-m-d H:i:s',$vo['create_time']); ?></td>
|
||||
<td>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs"
|
||||
onclick="edit(<?php echo htmlentities((string) $vo['group_id']); ?>)">
|
||||
<i class="layui-icon layui-icon-edit"></i>编辑
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs"
|
||||
onclick="del(<?php echo htmlentities((string) $vo['group_id']); ?>)">
|
||||
<i class="layui-icon layui-icon-delete"></i>删除
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer'], function () {
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
});
|
||||
// 添加
|
||||
function add() {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '添加角色',
|
||||
shade: 0.3,
|
||||
area: ['450px', '550px'],
|
||||
content: "<?php echo htmlentities((string) $config['admin_route']); ?>yunzeradmin/groupadd"
|
||||
});
|
||||
}
|
||||
// 编辑
|
||||
function edit(group_id) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '编辑角色',
|
||||
shade: 0.3,
|
||||
area: ['450px', '550px'],
|
||||
content: "<?php echo htmlentities((string) $config['admin_route']); ?>yunzeradmin/groupedit?group_id=" + group_id
|
||||
});
|
||||
}
|
||||
// 删除
|
||||
function del(group_id) {
|
||||
layer.confirm('确定要删除吗?', {
|
||||
icon: 3,
|
||||
btn: ['确定', '取消']
|
||||
}, function () {
|
||||
$.post("<?php echo htmlentities((string) $config['admin_route']); ?>yunzeradmin/groupdel", { 'group_id': group_id }, function (res) {
|
||||
if (res.code > 0) {
|
||||
layer.alert(res.msg, { icon: 2 });
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 1 });
|
||||
setTimeout(function () { window.location.reload(); }, 1000);
|
||||
}
|
||||
}, 'json');
|
||||
});
|
||||
}
|
||||
//刷新列表
|
||||
function refresh() {
|
||||
window.location.reload();
|
||||
}
|
||||
</script>
|
||||
</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>
|
||||
@@ -0,0 +1,216 @@
|
||||
<?php /*a:3:{s:62:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzer\menuadd.php";i:1745507043;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>
|
||||
<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/third/layui/css/layui.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/third/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" name="label" placeholder="请输入菜单名">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">图标</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="icon_class" lay-verify="required" lay-search="">
|
||||
<option value="">请输入layui图标</option>
|
||||
<?php foreach($iconfont as $icon_v): ?>
|
||||
<option value="<?php echo htmlentities((string) $icon_v['icon_css']); ?>"><?php echo htmlentities((string) $icon_v['icon_css']); ?> <?php echo htmlentities((string) $icon_v['icon_name']); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="type" lay-filter="type">
|
||||
<option value='0' selected>顶级菜单</option>
|
||||
<option value='1'>内部代码</option>
|
||||
<option value='2'>超链接</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" style="display:none;" id="src1">
|
||||
<label class="layui-form-label">内部代码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" class="layui-input" name="src1" placeholder="请输入:模块/方法">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" style="display:none;" id="src2">
|
||||
<label class="layui-form-label">链接地址</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" class="layui-input" name="src2" placeholder="请输入http网址">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="number" class="layui-input" name="sort" placeholder="值越大越靠前">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="status" value="1" title="开启" checked>
|
||||
<input type="radio" name="status" value="0" title="禁用">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-form-item" style="margin-top:10px;">
|
||||
<div class="layui-input-block">
|
||||
<button type="button" class="layui-btn" onclick="save()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form'],function(){
|
||||
var form = layui.form;
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
|
||||
form.on('select(type)', function(data){
|
||||
if(data.value == 1){
|
||||
$("#src1").show();
|
||||
$("#src2").hide();
|
||||
$("#src3").hide();
|
||||
}else if(data.value == 2){
|
||||
$("#src1").hide();
|
||||
$("#src2").show();
|
||||
$("#src3").hide();
|
||||
}else{
|
||||
$("#src1").hide();
|
||||
$("#src2").hide();
|
||||
$("#src3").hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function save(){
|
||||
$.post('<?php echo htmlentities((string) $config["admin_route"]); ?>yunzer/menuadd',$('form').serialize(),function(res){
|
||||
if(res.code>0){
|
||||
layer.msg(res.msg,{'icon':2});
|
||||
}else{
|
||||
layer.msg(res.msg,{'icon':1});
|
||||
setTimeout(function(){parent.window.location.reload();},1000);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
</script>
|
||||
</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>
|
||||
@@ -0,0 +1,234 @@
|
||||
<?php /*a:3:{s:68:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzeradmin\userinfo.php";i:1745571449;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1745564348;s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!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/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.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/third/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="add()">
|
||||
<i class="layui-icon layui-icon-add-1"></i>添加
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary" onclick="refresh()">
|
||||
<i class="layui-icon layui-icon-refresh"></i>刷新
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>真实姓名</th>
|
||||
<th>账户</th>
|
||||
<th>手机</th>
|
||||
<th>QQ</th>
|
||||
<th>角色</th>
|
||||
<th>性别</th>
|
||||
<th>状态</th>
|
||||
<th>登陆次数</th>
|
||||
<th>登陆时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(is_array($lists) || $lists instanceof \think\Collection || $lists instanceof \think\Paginator): $i = 0; $__LIST__ = $lists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
|
||||
<tr>
|
||||
<td><?php echo htmlentities((string) $vo['name']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['account']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['phone']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['qq']); ?></td>
|
||||
<td><?php echo isset($group[$vo['group_id']])?$group[$vo['group_id']]['group_name']:''; ?></td>
|
||||
<td>
|
||||
<?php if($vo['sex']==1): ?>
|
||||
<span style="color:red;">男</span>
|
||||
<?php elseif($vo['sex'] == 2): ?>
|
||||
<span style="color:green;">女</span>
|
||||
<?php else: ?>
|
||||
未知
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php echo $vo['status']==1 ? '开启' : '<span style="color:red;">禁用</span>'; ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['login_count']); ?></td>
|
||||
<td><?php echo date('Y-m-d H:i:s',$vo['update_time']); ?></td>
|
||||
<td>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" onclick="edit(<?php echo htmlentities((string) $vo['uid']); ?>)">
|
||||
<i class="layui-icon layui-icon-edit"></i>编辑
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" onclick="del(<?php echo htmlentities((string) $vo['uid']); ?>)">
|
||||
<i class="layui-icon layui-icon-delete"></i>删除
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer'], function () {
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
});
|
||||
// 添加
|
||||
function add() {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '添加管理员',
|
||||
shade: 0.3,
|
||||
area: ['450px', '550px'],
|
||||
content: "<?php echo htmlentities((string) $config['admin_route']); ?>yunzeradmin/useradd"
|
||||
});
|
||||
}
|
||||
// 编辑
|
||||
function edit(uid) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '编辑管理员',
|
||||
shade: 0.3,
|
||||
area: ['450px', '550px'],
|
||||
content: "<?php echo htmlentities((string) $config['admin_route']); ?>yunzeradmin/useredit?uid=" + uid
|
||||
});
|
||||
}
|
||||
// 删除
|
||||
function del(uid) {
|
||||
layer.confirm('确定要删除吗?', {
|
||||
icon: 3,
|
||||
btn: ['确定', '取消']
|
||||
}, function () {
|
||||
$.post("<?php echo htmlentities((string) $config['admin_route']); ?>yunzeradmin/userdel", { 'uid': uid }, function (res) {
|
||||
if (res.code > 0) {
|
||||
layer.alert(res.msg, { icon: 2 });
|
||||
} else {
|
||||
layer.msg(res.msg);
|
||||
setTimeout(function () { window.location.reload(); }, 1000);
|
||||
}
|
||||
}, 'json');
|
||||
});
|
||||
}
|
||||
//刷新列表
|
||||
function refresh() {
|
||||
window.location.reload();
|
||||
}
|
||||
</script>
|
||||
</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>
|
||||
@@ -0,0 +1,276 @@
|
||||
<?php /*a:3:{s:65:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzer\buttoninfo.php";i:1745505170;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1745564348;s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!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/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.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/third/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="layui-card">
|
||||
<div class="layui-card-header">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-breadcrumb">
|
||||
<a href="<?php echo htmlentities((string) $config['admin_route']); ?>Yunzer/menuInfo"><i class="layui-icon layui-icon-menu-fill"></i> 上级菜单</a>
|
||||
<a><cite>本级菜单</cite></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6" style="text-align: right;">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" onclick="add(<?php echo htmlentities((string) $smid); ?>)">
|
||||
<i class="layui-icon layui-icon-add-1"></i> 添加按钮
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header"><i class="layui-icon layui-icon-tree"></i> 菜单结构</div>
|
||||
<div class="layui-card-body" id="menuTree">
|
||||
<!-- 树形结构将在这里渲染 -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md9">
|
||||
<table class="layui-table" lay-skin="line">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>排序</th>
|
||||
<th>类型</th>
|
||||
<th>按钮名</th>
|
||||
<th>图标</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(is_array($lists) || $lists instanceof \think\Collection || $lists instanceof \think\Paginator): $i = 0; $__LIST__ = $lists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
|
||||
<tr>
|
||||
<td><span class="layui-badge layui-bg-gray"><?php echo htmlentities((string) $vo['sort']); ?></span></td>
|
||||
<td>
|
||||
<?php if(($vo['type']==1)): ?>
|
||||
<span class="layui-badge layui-bg-blue">功能模块</span> <?php echo htmlentities((string) $vo['src']); elseif(($vo['type']==2)): ?>
|
||||
<span class="layui-badge layui-bg-green">超链接</span> <?php echo htmlentities((string) $vo['src']); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><b><?php echo htmlentities((string) $vo['label']); ?></b></td>
|
||||
<td><i class="layui-icon <?php echo htmlentities((string) $vo['icon_class']); ?>"></i> <?php echo htmlentities((string) $vo['icon_class']); ?></td>
|
||||
<td>
|
||||
<?php if(($vo['status']==1)): ?>
|
||||
<span class="layui-badge layui-bg-green">开启</span>
|
||||
<?php else: ?>
|
||||
<span class="layui-badge layui-bg-red">禁用</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-xs" onclick="edit(<?php echo htmlentities((string) $vo['smid']); ?>)">
|
||||
<i class="layui-icon layui-icon-edit"></i> 编辑
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-xs layui-btn-danger" onclick="del(<?php echo htmlentities((string) $vo['smid']); ?>)">
|
||||
<i class="layui-icon layui-icon-delete"></i> 删除
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer', 'tree'], function(){
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
var tree = layui.tree;
|
||||
|
||||
// 构建树形结构数据
|
||||
var treeData = [{
|
||||
title: '当前菜单',
|
||||
id: <?php echo htmlentities((string) $smid); ?>,
|
||||
spread: true,
|
||||
children: []
|
||||
}];
|
||||
|
||||
// 将按钮数据添加到树中
|
||||
<?php if(is_array($lists) || $lists instanceof \think\Collection || $lists instanceof \think\Paginator): $i = 0; $__LIST__ = $lists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
|
||||
treeData[0].children.push({
|
||||
title: '<?php echo htmlentities((string) $vo['label']); ?>',
|
||||
id: <?php echo htmlentities((string) $vo['smid']); ?>,
|
||||
icon: 'layui-icon <?php echo htmlentities((string) $vo['icon_class']); ?>'
|
||||
});
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
|
||||
// 渲染树形结构
|
||||
tree.render({
|
||||
elem: '#menuTree',
|
||||
data: treeData,
|
||||
showLine: true,
|
||||
click: function(obj){
|
||||
var data = obj.data;
|
||||
if(data.id != <?php echo htmlentities((string) $smid); ?>) {
|
||||
edit(data.id);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 添加
|
||||
function add(smid){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '添加按钮',
|
||||
shade: 0.3,
|
||||
area: ['550px','550px'],
|
||||
content: '<?php echo htmlentities((string) $config["admin_route"]); ?>yunzer/buttonadd?smid='+smid
|
||||
});
|
||||
}
|
||||
|
||||
// 编辑
|
||||
function edit(smid){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '编辑按钮',
|
||||
shade: 0.3,
|
||||
area: ['550px','550px'],
|
||||
content: '<?php echo htmlentities((string) $config["admin_route"]); ?>yunzer/buttonedit?smid='+smid
|
||||
});
|
||||
}
|
||||
|
||||
// 删除
|
||||
function del(smid){
|
||||
layer.confirm('确定要删除吗?', {
|
||||
icon: 3,
|
||||
btn: ['确定','取消']
|
||||
}, function(){
|
||||
$.post('<?php echo htmlentities((string) $config["admin_route"]); ?>yunzer/buttondel',{'smid':smid},function(res){
|
||||
if(res.code>0){
|
||||
layer.alert(res.msg,{icon:2});
|
||||
}else{
|
||||
layer.msg(res.msg,{icon:1});
|
||||
setTimeout(function(){window.location.reload();},1000);
|
||||
}
|
||||
},'json');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</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>
|
||||
@@ -0,0 +1,231 @@
|
||||
<?php /*a:3:{s:69:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzeradmin\admininfo.php";i:1745568477;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1745564348;s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!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/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.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/third/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" style="padding:0 20%;">
|
||||
<div class="layui-tab">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">个人信息</li>
|
||||
<li>密码信息</li>
|
||||
<li>其它信息</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div style="padding:15px;">
|
||||
<label class="layui-form-label">账户</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-form-label" style="color:#3881fd;text-align:left;width:100%;"><?php echo htmlentities((string) $aUser['account']); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding:15px;">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-form-label" style="width:100%;text-align:left;color:#999;">账户用于登录系统的账号,不能修改</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding:15px;">
|
||||
<label class="layui-form-label">姓名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" class="layui-input" name="name" placeholder="请输入真实姓名" value="<?php echo htmlentities((string) $aUser['name']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding:15px;">
|
||||
<label class="layui-form-label">手机号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" class="layui-input" name="phone" placeholder="请输入手机号" value="<?php echo htmlentities((string) $aUser['phone']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding:15px;">
|
||||
<label class="layui-form-label">QQ号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" class="layui-input" name="qq" placeholder="请输入QQ号" value="<?php echo htmlentities((string) $aUser['qq']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding:15px;">
|
||||
<label class="layui-form-label">性别</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="sex" value="1" title="男" <?php echo $aUser['status']==1 ? 'checked' : ''; ?>>
|
||||
<input type="radio" name="sex" value="2" title="女" <?php echo $aUser['status']==2 ? 'checked' : ''; ?>>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-tab-item">
|
||||
<div style="padding:15px;">
|
||||
<label class="layui-form-label">老密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" class="layui-input" name="old_pw" placeholder="请输入老密码,不修改不填写">
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding:15px;">
|
||||
<label class="layui-form-label">新密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" class="layui-input" name="new_pw" placeholder="请输入新密码,不修改不填写">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-tab-item">
|
||||
<div style="padding:15px;">
|
||||
<label class="layui-form-label">登陆次数</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-form-label" style="text-align:left;width:100%;"><?php echo htmlentities((string) $aUser['login_count']); ?>次</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding:15px;">
|
||||
<label class="layui-form-label">注册时间</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-form-label" style="text-align:left;width:100%;"><?php echo date('Y-m-d H:i:s',$aUser['create_time']); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding:15px;">
|
||||
<label class="layui-form-label">登陆时间</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-form-label" style="text-align:left;width:100%;"><?php echo date('Y-m-d H:i:s',$aUser['update_time']); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-form-item" style="margin-top:10px;">
|
||||
<div class="layui-input-block" style="text-align:center;">
|
||||
<button type="button" class="layui-btn" onclick="save()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form','element'],function(){
|
||||
var form = layui.form;
|
||||
element = layui.element;
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
});
|
||||
function save(){
|
||||
$.post("<?php echo htmlentities((string) $config['admin_route']); ?>yunzeradmin/admininfo",$('form').serialize(),function(res){
|
||||
if(res.code>0){
|
||||
layer.msg(res.msg,{'icon':2});
|
||||
}else{
|
||||
layer.msg(res.msg,{'icon':1});
|
||||
setTimeout(function(){parent.window.location.reload();},1000);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
</script>
|
||||
</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>
|
||||
@@ -0,0 +1,220 @@
|
||||
<?php /*a:3:{s:65:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzer\buttonedit.php";i:1745483534;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1745564348;s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!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/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.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/third/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">
|
||||
<input type="hidden" name="smid" value="<?php echo htmlentities((string) $lists['smid']); ?>">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">按钮名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" class="layui-input" name="label" placeholder="请输入按钮名" value="<?php echo htmlentities((string) $lists['label']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">图标</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="icon_class" lay-verify="required" lay-search="">
|
||||
<option value="">请输入layui图标</option>
|
||||
<?php foreach($iconfont as $icon_v): ?>
|
||||
<option value="<?php echo htmlentities((string) $icon_v['icon_css']); ?>" <?php if(($icon_v['icon_css'] == $lists['icon_class'])): ?>selected<?php endif; ?>><?php echo htmlentities((string) $icon_v['icon_css']); ?> <?php echo htmlentities((string) $icon_v['icon_name']); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="type" lay-filter="type">
|
||||
<option value='1' <?php echo $lists['type']==1 ? 'selected' : ''; ?>>内部代码</option>
|
||||
<option value='2' <?php echo $lists['type']==2 ? 'selected' : ''; ?>>超链接</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" <?php echo $lists['type']==1 ? 'style="display : none;"':''; ?> id="src1">
|
||||
<label class="layui-form-label">内部代码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" class="layui-input" name="src1" placeholder="请输入:/项目/模块/方法" <?php if($lists['type']==1): ?>value="<?php echo htmlentities((string) $lists['src']); ?>"<?php endif; ?>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" <?php echo $lists['type']==2 ? 'style="display : none;"':''; ?> id="src2">
|
||||
<label class="layui-form-label">链接地址</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" class="layui-input" name="src2" placeholder="请输入http网址" <?php if($lists['type']==2): ?>value="<?php echo htmlentities((string) $lists['src']); ?>"<?php endif; ?>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="number" class="layui-input" name="sort" placeholder="值越大越靠前" value="<?php echo htmlentities((string) $lists['sort']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="status" value="1" title="开启" <?php echo $lists['status']==1 ? 'checked' : ''; ?>>
|
||||
<input type="radio" name="status" value="0" title="禁用" <?php echo $lists['status']==0 ? 'checked' : ''; ?>>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-form-item" style="margin-top:10px;">
|
||||
<div class="layui-input-block">
|
||||
<button type="button" class="layui-btn" onclick="save()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form'],function(){
|
||||
form = layui.form;
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
|
||||
type(<?php echo htmlentities((string) $lists['type']); ?>);
|
||||
form.on('select(type)', function(data){
|
||||
type(data.value);
|
||||
});
|
||||
});
|
||||
function type(value){
|
||||
if(value == 1){
|
||||
$("#src1").show();
|
||||
$("#src2").hide();
|
||||
$("#src3").hide();
|
||||
}else if(value == 2){
|
||||
$("#src1").hide();
|
||||
$("#src2").show();
|
||||
$("#src3").hide();
|
||||
}else{
|
||||
$("#src1").show();
|
||||
$("#src2").hide();
|
||||
$("#src3").hide();
|
||||
}
|
||||
}
|
||||
function save(){
|
||||
$.post('<?php echo htmlentities((string) $config["admin_route"]); ?>yunzer/buttonedit',$('form').serialize(),function(res){
|
||||
if(res.code>0){
|
||||
layer.msg(res.msg,{'icon':2});
|
||||
}else{
|
||||
layer.msg(res.msg,{'icon':1});
|
||||
setTimeout(function(){parent.window.location.reload();},1000);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
</script>
|
||||
</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>
|
||||
@@ -0,0 +1,310 @@
|
||||
<?php /*a:3:{s:66:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\yunzer\configvalue.php";i:1745553696;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1745564348;s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!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/css/moban.css" media="all"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.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/third/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;">
|
||||
<style>
|
||||
.config-container {
|
||||
padding: 20px;
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
.config-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 30px;
|
||||
padding-bottom: 15px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.config-header span {
|
||||
font-size: 18px;
|
||||
color: #2c3e50;
|
||||
font-weight: 500;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.config-header a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.config-header a span {
|
||||
padding: 6px 15px;
|
||||
background: #f8f9fa;
|
||||
border-radius: 4px;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.config-header a span:hover {
|
||||
background: #e9ecef;
|
||||
color: #409EFF;
|
||||
}
|
||||
.layui-form-item {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
.layui-form-label {
|
||||
color: #606266;
|
||||
font-weight: 500;
|
||||
}
|
||||
.layui-input {
|
||||
border-radius: 4px;
|
||||
}
|
||||
.layui-input:focus {
|
||||
border-color: #409EFF;
|
||||
}
|
||||
.layui-textarea {
|
||||
border-radius: 4px;
|
||||
min-height: 100px;
|
||||
}
|
||||
.layui-word-aux {
|
||||
color: #909399;
|
||||
}
|
||||
.layui-btn {
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.layui-btn:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
|
||||
}
|
||||
.upload-preview {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.upload-preview img {
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.upload-preview img:hover {
|
||||
transform: scale(1.02);
|
||||
}
|
||||
.save-button-container {
|
||||
text-align: center;
|
||||
margin-top: 40px;
|
||||
padding-top: 20px;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
.save-button-container .layui-btn {
|
||||
padding: 0 50px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-size: 15px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="config-container">
|
||||
<div class="config-header">
|
||||
<span>站点配置</span>
|
||||
<!-- <a href="<?php echo htmlentities((string) $config['admin_route']); ?>Yunzer/configlist">
|
||||
<span>站点管理</span>
|
||||
</a> -->
|
||||
</div>
|
||||
|
||||
<form class="layui-form">
|
||||
<?php foreach($lists as $lists_v): if(($lists_v['config_type'] == 1)): ?>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"><?php echo htmlentities((string) $lists_v['config_info']); ?></label>
|
||||
<div class="layui-input-inline" style="width: 350px;">
|
||||
<input type="text" class="layui-input" id="<?php echo htmlentities((string) $lists_v['config_name']); ?>" name="<?php echo htmlentities((string) $lists_v['config_name']); ?>" placeholder="<?php echo htmlentities((string) $lists_v['config_desc']); ?>" value="<?php echo htmlentities((string) $lists_v['config_value']); ?>">
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux"><?php echo htmlentities((string) $lists_v['config_desc']); ?></div>
|
||||
</div>
|
||||
<?php elseif(($lists_v['config_type'] == 2)): ?>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"><?php echo htmlentities((string) $lists_v['config_info']); ?></label>
|
||||
<div class="layui-input-inline">
|
||||
<button type="button" class="layui-btn layui-btn-normal" id="<?php echo htmlentities((string) $lists_v['config_name']); ?>">
|
||||
<i class="layui-icon layui-icon-upload"></i> 上传图片
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux"><?php echo htmlentities((string) $lists_v['config_desc']); ?></div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"><?php echo htmlentities((string) $lists_v['config_info']); ?>预览</label>
|
||||
<div class="layui-input-block">
|
||||
<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'])): ?>
|
||||
<div class="upload_pic_li" style="position:relative;width:120px;margin:0 10px 10px 0">
|
||||
<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']); ?>"/>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','upload'],function(){
|
||||
layer = layui.layer;
|
||||
upload = layui.upload;
|
||||
$ = layui.jquery;
|
||||
|
||||
upload.render({
|
||||
elem: "#<?php echo htmlentities((string) $lists_v['config_name']); ?>",
|
||||
url: "<?php echo htmlentities((string) $config['admin_route']); ?>index/upload_img",
|
||||
multiple: true,
|
||||
done: function(res,title){
|
||||
if(res.code > 0){
|
||||
return layer.msg("上传失败,"+res.msg, {icon: 2});
|
||||
}else{
|
||||
$("#yulan_<?php echo htmlentities((string) $lists_v['config_name']); ?>").html('<div class="upload_pic_li" style="position:relative;width:120px;margin:0 10px 10px 0"><img style="width:120px;height:120px;object-fit:cover;" src="'+ res.url +'" class="layui-upload-img" onmouseover="show_img(this)" onmouseleave="hide_img()"><input type="hidden" name="<?php echo htmlentities((string) $lists_v['config_name']); ?>" value="'+res.data+'"/></div>');
|
||||
layer.msg("上传成功", {icon: 1});
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
<?php elseif(($lists_v['config_type'] == 3)): ?>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"><?php echo htmlentities((string) $lists_v['config_info']); ?></label>
|
||||
<div class="layui-input-block">
|
||||
<textarea class="layui-textarea" id="<?php echo htmlentities((string) $lists_v['config_name']); ?>" name="<?php echo htmlentities((string) $lists_v['config_name']); ?>" placeholder="<?php echo htmlentities((string) $lists_v['config_desc']); ?>"><?php echo htmlentities((string) $lists_v['config_value']); ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</form>
|
||||
|
||||
<div class="save-button-container">
|
||||
<button type="button" class="layui-btn layui-btn-normal" onclick="save()">
|
||||
<i class="layui-icon layui-icon-ok"></i> 保存配置
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function save(){
|
||||
var loadIndex = layer.load(1, {
|
||||
shade: [0.1,'#fff']
|
||||
});
|
||||
$.post('<?php echo htmlentities((string) $config["admin_route"]); ?>yunzer/configvalue',$('form').serialize(),function(res){
|
||||
layer.close(loadIndex);
|
||||
if(res.code>0){
|
||||
layer.msg(res.msg,{'icon':2});
|
||||
}else{
|
||||
layer.msg(res.msg,{'icon':1});
|
||||
setTimeout(function(){
|
||||
history.go(0);
|
||||
}, 1000);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
</script>
|
||||
</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>
|
||||
@@ -0,0 +1,130 @@
|
||||
<?php /*a:1:{s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\login\index.php";i:1745549657;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<title>后台管理系统</title>
|
||||
<meta name="renderer" content="yz">
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/login.css">
|
||||
<script type="text/javascript" src="/static/layui/layui.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login">
|
||||
<div class="layadmin-user-login-main">
|
||||
<div class="layadmin-user-login-box layadmin-user-login-header">
|
||||
<img src="/static/images/logo.png" />
|
||||
<h2>后台管理系统</h2>
|
||||
</div>
|
||||
<div class="layadmin-user-login-box layadmin-user-login-body layui-form">
|
||||
<form class="layui-form login-form">
|
||||
<div class="layui-form-item">
|
||||
<label class="layadmin-user-login-icon layui-icon layui-icon-username" for="account"></label>
|
||||
<input type="text" id="account" name="account" placeholder="邮箱" class="layui-input"
|
||||
value="357099073@qq.com">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layadmin-user-login-icon layui-icon layui-icon-password" for="password"></label>
|
||||
<input type="password" name="password" class="layui-input" placeholder="密码" class="layui-input"
|
||||
value="">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs7">
|
||||
<label class="layadmin-user-login-icon layui-icon layui-icon-vercode"
|
||||
for="code"></label>
|
||||
<input type="text" name="code" placeholder="图形验证码" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-col-xs5">
|
||||
<div style="margin-left:10px;">
|
||||
<img src="<?php echo captcha_src(); ?>" class="layadmin-user-login-codeimg" id="img"
|
||||
onclick="reloadImg()">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" style="margin-bottom: 20px;">
|
||||
<input type="checkbox" name="remember" lay-skin="primary" title="记住密码">
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-form-item">
|
||||
<button class="layui-btn layui-btn-fluid" onclick="login()">登 陆</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer', 'form'], function () {
|
||||
var form = layui.form;
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
// 用户名控件获取焦点
|
||||
$('#account').focus();
|
||||
// 回车登录
|
||||
$('input').keydown(function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
login();
|
||||
}
|
||||
});
|
||||
});
|
||||
// 重新生成验证码
|
||||
function reloadImg() {
|
||||
$('#img').attr('src', '<?php echo captcha_src(); ?>?rand=' + Math.random());
|
||||
}
|
||||
|
||||
// 登录处理函数
|
||||
function login() {
|
||||
var account = $('input[name="account"]').val();
|
||||
var password = $('input[name="password"]').val();
|
||||
var code = $('input[name="code"]').val();
|
||||
var remember = $('input[name="remember"]:checked').val();
|
||||
|
||||
if (!account) {
|
||||
layer.msg('邮箱不能为空');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!password) {
|
||||
layer.msg('密码不能为空');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!code) {
|
||||
layer.msg('验证码不能为空');
|
||||
return false;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?php echo url("login"); ?>',
|
||||
data: {
|
||||
account: account,
|
||||
password: password,
|
||||
code: code,
|
||||
remember: remember
|
||||
},
|
||||
dataType: 'json',
|
||||
success: function(res) {
|
||||
if (res.code == 0) {
|
||||
layer.msg(res.msg, {icon: 1, time: 1000}, function() {
|
||||
window.location.href = '<?php echo url("Index/index"); ?>';
|
||||
});
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2});
|
||||
reloadImg();
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
layer.msg('网络错误,请重试', {icon: 2});
|
||||
reloadImg();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user