Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
7225ca34
Commit
7225ca34
authored
Feb 06, 2019
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复ctxPath问题
parent
d39c21ba
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
122 additions
and
42 deletions
+122
-42
src/main/webapp/assets/common/js/common.js
+18
-25
src/main/webapp/pages/404.html
+12
-0
src/main/webapp/pages/common/_container.html
+12
-4
src/main/webapp/pages/common/tree_dlg.html
+11
-2
src/main/webapp/pages/index.html
+11
-5
src/main/webapp/pages/login.html
+12
-0
src/main/webapp/pages/modular/frame/theme.html
+12
-0
src/main/webapp/pages/modular/frame/welcome.html
+12
-0
src/main/webapp/pages/modular/system/role/role_assign.html
+11
-3
src/main/webapp/pages/modular/system/user/user_roleassign.html
+11
-3
No files found.
src/main/webapp/assets/common/js/common.js
View file @
7225ca34
var
Feng
=
{
// 用common.js必须加上Feng.addCtx("${ctxPath}");
ctxPath
:
""
,
Feng
.
info
=
function
(
info
)
{
addCtx
:
function
(
ctx
)
{
if
(
this
.
ctxPath
===
""
)
{
this
.
ctxPath
=
ctx
;
}
},
info
:
function
(
info
)
{
top
.
layer
.
msg
(
info
,
{
icon
:
6
});
top
.
layer
.
msg
(
info
,
{
icon
:
6
});
},
};
success
:
function
(
info
)
{
Feng
.
success
=
function
(
info
)
{
top
.
layer
.
msg
(
info
,
{
icon
:
1
});
top
.
layer
.
msg
(
info
,
{
icon
:
1
});
},
};
error
:
function
(
info
)
{
Feng
.
error
=
function
(
info
)
{
top
.
layer
.
msg
(
info
,
{
icon
:
2
});
top
.
layer
.
msg
(
info
,
{
icon
:
2
});
},
};
confirm
:
function
(
tip
,
ensure
)
{
Feng
.
confirm
=
function
(
tip
,
ensure
)
{
top
.
layer
.
confirm
(
tip
,
{
top
.
layer
.
confirm
(
tip
,
{
skin
:
'layui-layer-admin'
skin
:
'layui-layer-admin'
},
function
()
{
},
function
()
{
ensure
();
ensure
();
});
});
},
};
currentDate
:
function
()
{
Feng
.
currentDate
=
function
()
{
// 获取当前日期
// 获取当前日期
var
date
=
new
Date
();
var
date
=
new
Date
();
...
@@ -46,8 +40,8 @@ var Feng = {
...
@@ -46,8 +40,8 @@ var Feng = {
// 最后拼接字符串,得到一个格式为(yyyy-MM-dd)的日期
// 最后拼接字符串,得到一个格式为(yyyy-MM-dd)的日期
return
date
.
getFullYear
()
+
seperator
+
nowMonth
+
seperator
+
strDate
;
return
date
.
getFullYear
()
+
seperator
+
nowMonth
+
seperator
+
strDate
;
},
};
getUrlParam
:
function
(
name
)
{
Feng
.
getUrlParam
=
function
(
name
)
{
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
);
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
{
if
(
r
!=
null
)
{
...
@@ -55,8 +49,8 @@ var Feng = {
...
@@ -55,8 +49,8 @@ var Feng = {
}
else
{
}
else
{
return
null
;
return
null
;
}
}
},
};
infoDetail
:
function
(
title
,
info
)
{
Feng
.
infoDetail
=
function
(
title
,
info
)
{
var
display
=
""
;
var
display
=
""
;
if
(
typeof
info
===
"string"
)
{
if
(
typeof
info
===
"string"
)
{
display
=
info
;
display
=
info
;
...
@@ -76,8 +70,8 @@ var Feng = {
...
@@ -76,8 +70,8 @@ var Feng = {
area
:
[
'950px'
,
'600px'
],
//宽高
area
:
[
'950px'
,
'600px'
],
//宽高
content
:
'<div style="padding: 20px;">'
+
display
+
'</div>'
content
:
'<div style="padding: 20px;">'
+
display
+
'</div>'
});
});
},
};
zTreeCheckedNodes
:
function
(
zTreeId
)
{
Feng
.
zTreeCheckedNodes
=
function
(
zTreeId
)
{
var
zTree
=
$
.
fn
.
zTree
.
getZTreeObj
(
zTreeId
);
var
zTree
=
$
.
fn
.
zTree
.
getZTreeObj
(
zTreeId
);
var
nodes
=
zTree
.
getCheckedNodes
();
var
nodes
=
zTree
.
getCheckedNodes
();
var
ids
=
""
;
var
ids
=
""
;
...
@@ -85,10 +79,9 @@ var Feng = {
...
@@ -85,10 +79,9 @@ var Feng = {
ids
+=
","
+
nodes
[
i
].
id
;
ids
+=
","
+
nodes
[
i
].
id
;
}
}
return
ids
.
substring
(
1
);
return
ids
.
substring
(
1
);
},
};
closeAllLoading
:
function
()
{
Feng
.
closeAllLoading
=
function
()
{
layer
.
closeAll
(
'loading'
);
layer
.
closeAll
(
'loading'
);
}
};
};
// 以下代码是配置layui扩展模块的目录,每个页面都需要引入
// 以下代码是配置layui扩展模块的目录,每个页面都需要引入
...
...
src/main/webapp/pages/404.html
View file @
7225ca34
...
@@ -31,6 +31,18 @@
...
@@ -31,6 +31,18 @@
</div>
</div>
<!-- js部分 -->
<!-- js部分 -->
@/* 加入contextPath属性和session超时的配置 */
<script
type=
"text/javascript"
>
var
Feng
=
{
ctxPath
:
""
,
addCtx
:
function
(
ctx
)
{
if
(
this
.
ctxPath
===
""
)
{
this
.
ctxPath
=
ctx
;
}
}
};
Feng
.
addCtx
(
"${ctxPath}"
);
</script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/layui/layui.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/layui/layui.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/js/common.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/js/common.js"
></script>
...
...
src/main/webapp/pages/common/_container.html
View file @
7225ca34
...
@@ -46,15 +46,23 @@
...
@@ -46,15 +46,23 @@
@/* 正文 */
@/* 正文 */
${layoutContent}
${layoutContent}
@/* js和业务用的js数组 */
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/layui/layui.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/js/common.js"
></script>
@/* 加入contextPath属性和session超时的配置 */
@/* 加入contextPath属性和session超时的配置 */
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
var
Feng
=
{
ctxPath
:
""
,
addCtx
:
function
(
ctx
)
{
if
(
this
.
ctxPath
===
""
)
{
this
.
ctxPath
=
ctx
;
}
}
};
Feng
.
addCtx
(
"${ctxPath}"
);
Feng
.
addCtx
(
"${ctxPath}"
);
</script>
</script>
@/* js和业务用的js数组 */
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/layui/layui.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/js/common.js"
></script>
<!--其他插件js-->
<!--其他插件js-->
@if(isNotEmpty(plugins)){
@if(isNotEmpty(plugins)){
@if(array.contain(plugins,"ztree")){
@if(array.contain(plugins,"ztree")){
...
...
src/main/webapp/pages/common/tree_dlg.html
View file @
7225ca34
...
@@ -35,12 +35,21 @@
...
@@ -35,12 +35,21 @@
</div>
</div>
</body>
</body>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/layui/layui.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/js/common.js"
></script>
@/* 加入contextPath属性和session超时的配置 */
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
var
Feng
=
{
ctxPath
:
""
,
addCtx
:
function
(
ctx
)
{
if
(
this
.
ctxPath
===
""
)
{
this
.
ctxPath
=
ctx
;
}
}
};
Feng
.
addCtx
(
"${ctxPath}"
);
Feng
.
addCtx
(
"${ctxPath}"
);
</script>
</script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/layui/layui.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/js/common.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/plugins/jquery/jquery-3.2.1.min.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/plugins/jquery/jquery-3.2.1.min.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/plugins/ztree/jquery.ztree.all.min.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/plugins/ztree/jquery.ztree.all.min.js"
></script>
...
...
src/main/webapp/pages/index.html
View file @
7225ca34
...
@@ -32,14 +32,20 @@
...
@@ -32,14 +32,20 @@
<!-- 加载动画,移除位置在common.js中 -->
<!-- 加载动画,移除位置在common.js中 -->
@include("/common/loading.html"){}
@include("/common/loading.html"){}
<!-- js部分 -->
@/* 加入contextPath属性和session超时的配置 */
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/layui/layui.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/js/common.js"
></script>
<!-- 加入contextPath属性和session超时的配置 -->
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
var
Feng
=
{
ctxPath
:
""
,
addCtx
:
function
(
ctx
)
{
if
(
this
.
ctxPath
===
""
)
{
this
.
ctxPath
=
ctx
;
}
}
};
Feng
.
addCtx
(
"${ctxPath}"
);
Feng
.
addCtx
(
"${ctxPath}"
);
</script>
</script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/layui/layui.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/js/common.js"
></script>
<script>
<script>
layui
.
use
([
'layer'
,
'element'
,
'admin'
,
'index'
],
function
()
{
layui
.
use
([
'layer'
,
'element'
,
'admin'
,
'index'
],
function
()
{
...
...
src/main/webapp/pages/login.html
View file @
7225ca34
...
@@ -102,6 +102,18 @@
...
@@ -102,6 +102,18 @@
</div>
</div>
</div>
</div>
@/* 加入contextPath属性和session超时的配置 */
<script
type=
"text/javascript"
>
var
Feng
=
{
ctxPath
:
""
,
addCtx
:
function
(
ctx
)
{
if
(
this
.
ctxPath
===
""
)
{
this
.
ctxPath
=
ctx
;
}
}
};
Feng
.
addCtx
(
"${ctxPath}"
);
</script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/layui/layui.all.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/layui/layui.all.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/js/common.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/js/common.js"
></script>
</body>
</body>
...
...
src/main/webapp/pages/modular/frame/theme.html
View file @
7225ca34
...
@@ -173,6 +173,18 @@
...
@@ -173,6 +173,18 @@
</div>
</div>
@/* 加入contextPath属性和session超时的配置 */
<script
type=
"text/javascript"
>
var
Feng
=
{
ctxPath
:
""
,
addCtx
:
function
(
ctx
)
{
if
(
this
.
ctxPath
===
""
)
{
this
.
ctxPath
=
ctx
;
}
}
};
Feng
.
addCtx
(
"${ctxPath}"
);
</script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/layui/layui.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/layui/layui.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/js/common.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/js/common.js"
></script>
<script>
<script>
...
...
src/main/webapp/pages/modular/frame/welcome.html
View file @
7225ca34
...
@@ -23,6 +23,18 @@
...
@@ -23,6 +23,18 @@
</div>
</div>
<!-- js部分 -->
<!-- js部分 -->
@/* 加入contextPath属性和session超时的配置 */
<script
type=
"text/javascript"
>
var
Feng
=
{
ctxPath
:
""
,
addCtx
:
function
(
ctx
)
{
if
(
this
.
ctxPath
===
""
)
{
this
.
ctxPath
=
ctx
;
}
}
};
Feng
.
addCtx
(
"${ctxPath}"
);
</script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/layui/layui.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/layui/layui.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/js/common.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/js/common.js"
></script>
...
...
src/main/webapp/pages/modular/system/role/role_assign.html
View file @
7225ca34
...
@@ -25,13 +25,21 @@
...
@@ -25,13 +25,21 @@
</div>
</div>
</div>
</div>
</div>
</div>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/layui/layui.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/js/common.js"
></script>
<!-- 加入contextPath属性和session超时的配置 -->
@/* 加入contextPath属性和session超时的配置 */
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
var
Feng
=
{
ctxPath
:
""
,
addCtx
:
function
(
ctx
)
{
if
(
this
.
ctxPath
===
""
)
{
this
.
ctxPath
=
ctx
;
}
}
};
Feng
.
addCtx
(
"${ctxPath}"
);
Feng
.
addCtx
(
"${ctxPath}"
);
</script>
</script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/layui/layui.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/js/common.js"
></script>
<!--其他插件js-->
<!--其他插件js-->
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/plugins/jquery/jquery-3.2.1.min.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/plugins/jquery/jquery-3.2.1.min.js"
></script>
...
...
src/main/webapp/pages/modular/system/user/user_roleassign.html
View file @
7225ca34
...
@@ -25,13 +25,21 @@
...
@@ -25,13 +25,21 @@
</div>
</div>
</div>
</div>
</div>
</div>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/layui/layui.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/js/common.js"
></script>
<!-- 加入contextPath属性和session超时的配置 -->
@/* 加入contextPath属性和session超时的配置 */
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
var
Feng
=
{
ctxPath
:
""
,
addCtx
:
function
(
ctx
)
{
if
(
this
.
ctxPath
===
""
)
{
this
.
ctxPath
=
ctx
;
}
}
};
Feng
.
addCtx
(
"${ctxPath}"
);
Feng
.
addCtx
(
"${ctxPath}"
);
</script>
</script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/layui/layui.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/js/common.js"
></script>
<!--其他插件js-->
<!--其他插件js-->
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/plugins/jquery/jquery-3.2.1.min.js"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/plugins/jquery/jquery-3.2.1.min.js"
></script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment