84a6c0f0f1522cb66eaaad93f90a227e.php
3.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php /*a:3:{s:87:"/Applications/XAMPP/xamppfiles/htdocs/cltphp/application/admin/view/category/index.html";i:1535013539;s:84:"/Applications/XAMPP/xamppfiles/htdocs/cltphp/application/admin/view/common/head.html";i:1534993700;s:84:"/Applications/XAMPP/xamppfiles/htdocs/cltphp/application/admin/view/common/foot.html";i:1535107019;}*/ ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><?php echo config('sys_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, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="/static/plugins/layui/css/layui.css" media="all" />
<link rel="stylesheet" href="/static/admin/css/global.css" media="all">
<link rel="stylesheet" href="/static/common/css/font.css" media="all">
</head>
<body class="skin-<?php if(!empty($_COOKIE['skin'])){echo $_COOKIE['skin'];}else{echo '0';setcookie('skin','0');}?>">
<div class="admin-main layui-anim layui-anim-upbit">
<fieldset class="layui-elem-field layui-field-title">
<legend><?php echo htmlentities($title); ?></legend>
</fieldset>
<blockquote class="layui-elem-quote">
<a href="<?php echo url('add'); ?>" class="layui-btn layui-btn-sm"><?php echo lang('add'); ?>栏目</a>
</blockquote>
<table class="layui-table">
<thead>
<tr>
<th>编号</th>
<th>栏目名称<span id="cateNameMsg">(点击查看内容)</span></th>
<th>所属模型</th>
<th>导航</th>
<th><?php echo lang('order'); ?></th>
<th>操作</th>
</tr>
</thead>
<tbody id="con">
<?php echo $categorys; ?>
</tbody>
<tfoot>
</table>
</div>
<script type="text/javascript" src="/static/plugins/layui/layui.js"></script>
<script src="/static/common/js/jquery.2.1.1.min.js"></script>
<script>
layui.use('table', function(){
var $= layui.jquery;
$('body').on('blur','.list_order',function() {
var id = $(this).attr('data-id');
var sort = $(this).val();
var loading = layer.load(1, {shade: [0.1, '#fff']});
$.post('<?php echo url("cOrder"); ?>',{id:id,sort:sort},function(res){
layer.close(loading);
if(res.code === 1){
layer.msg(res.msg, {time: 1000, icon: 1}, function () {
location.href = res.url;
});
}else{
layer.msg(res.msg,{time:1000,icon:2});
}
})
});
});
function del(id) {
layer.confirm('你确定要删除该栏目及其子栏目吗?', {icon: 3}, function (index) {
$.post('<?php echo url("del"); ?>', {id: id}, function (data) {
if (data.status === 1) {
layer.alert(data.info, {icon: 6}, function(index){
layer.close(index);
window.location.href=data.url;
});
}else{
layer.msg(data.info,{icon:5});
}
});
layer.close(index);
});
}
</script>