懒羊羊
2023-11-14 8286c62256f23bc2367a6729c0f46f84215e380b
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html class="${bg!}">
 
@/**
@ *      本页面所用的模板变量
@ *
@ * title          :  页面的标题
@ * layoutContent  :  主页面的html内容
@ * js             :  业务所需要的js,为数组
@ * css            :  业务所需要的css,为数组
@ * bg             :  背景颜色
@ * plugins        :  需要用到的插件,目前有["ztree"]
@ **/
 
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>${title!"管理系统"}</title>
    <link rel="stylesheet" href="${ctxPath}/assets/common/libs/layui/css/layui.css?v=${constants.getReleaseVersion()}"/>
    <link rel="stylesheet" href="${ctxPath}/assets/common/module/admin.css?v=${constants.getReleaseVersion()}" media="all"/>
    <link rel="stylesheet" href="${ctxPath}/assets/expand/css/form.css?v=${constants.getReleaseVersion()}" media="all"/>
 
    <!--其他插件css-->
    @if(isNotEmpty(plugins)){
        @if(array.contain(plugins,"ztree")){
        <link href="${ctxPath}/assets/expand/plugins/ztree/zTreeStyle.css?v=${constants.getReleaseVersion()}" rel="stylesheet" type="text/css" />
        @}
    @}
 
    @/* 其他业务用的css */
    @if(isNotEmpty(css)){
        @for(item in css){
            @if(strutil.startWith(item,"/")){
                @item = ctxPath + item;
            @}
            <link href="${item}?v=${constants.getReleaseVersion()}" rel="stylesheet" type="text/css" />
        @}
    @}
</head>
 
<body>
 
@/* 页面加载loading */
@ include("/common/loading.html"){}
 
@/* 正文 */
${layoutContent}
 
@/* 加入contextPath属性和session超时的配置 */
<script type="text/javascript">
    var Feng = {
        ctxPath: "${ctxPath}",
        version: '${constants.getReleaseVersion()}'
    };
</script>
 
@/* js和业务用的js数组 */
<script type="text/javascript" src="${ctxPath}/assets/common/libs/layui/layui.js?v=${constants.getReleaseVersion()}"></script>
<script type="text/javascript" src="${ctxPath}/assets/common/js/common.js?v=${constants.getReleaseVersion()}"></script>
 
<!--其他插件js-->
@if(isNotEmpty(plugins)){
    @if(array.contain(plugins,"ztree")){
    <script src="${ctxPath}/assets/expand/plugins/jquery/jquery-3.2.1.min.js?v=${constants.getReleaseVersion()}"></script>
    <script src="${ctxPath}/assets/expand/plugins/ztree/jquery.ztree.all.min.js?v=${constants.getReleaseVersion()}"></script>
    @}
    @if(array.contain(plugins,"ue")){
    <script src="${ctxPath}/assets/expand/plugins/jquery/jquery-3.2.1.min.js"></script>
    <script src="${ctxPath}/assets/expand/plugins/ueditor/ueditor.config.js"></script>
    <script src="${ctxPath}/assets/expand/plugins/ueditor/ueditor.all.js"></script>
    @}
@}
 
@if(isNotEmpty(js)){
    @for(item in js){
        @if(strutil.startWith(item,"/")){
            @item = ctxPath + item;
        @}
        <script src="${item}?v=${constants.getReleaseVersion()}"></script>
    @}
@}
 
<script>
    /**
     * 按键监听esc
     */
    layui.use(['admin'], function () {
        var admin = layui.admin;
        var $ = layui.jquery;
 
        $(window).keydown(function (event) {
            if (event.keyCode === 27) {
                admin.closeThisDialog();
            }
        });
    });
</script>
 
</body>
</html>