Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
MCMS
Commits
defa5d20
Commit
defa5d20
authored
Jul 30, 2021
by
msgroup
Browse files
1、登录优化
2、栏目表单优化 3、样式调整
parent
428a24f5
Changes
7
Show whitespace changes
Inline
Side-by-side
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
View file @
defa5d20
...
@@ -259,18 +259,18 @@
...
@@ -259,18 +259,18 @@
</if>
</if>
<if
test=
"beginTime!=null and beginTime!=''"
>
<if
test=
"beginTime!=null and beginTime!=''"
>
<if
test=
"_databaseId == 'mysql'"
>
<if
test=
"_databaseId == 'mysql'"
>
and content_datetime
>
= #{beginTime}
AND ct.UPDATE_DATE
>
=
#{beginTime}
</if>
</if>
<if
test=
"_databaseId == 'oracle'"
>
<if
test=
"_databaseId == 'oracle'"
>
and c
ontent_datetime
>
= to_date(#{beginTime}, 'yyyy-mm-dd hh24:mi:ss')
and c
t.UPDATE_DATE
>
= to_date(#{beginTime}, 'yyyy-mm-dd hh24:mi:ss')
</if>
</if>
</if>
</if>
<if
test=
"endTime!=null and endTime!=''"
>
<if
test=
"endTime!=null and endTime!=''"
>
<if
test=
"_databaseId == 'mysql'"
>
<if
test=
"_databaseId == 'mysql'"
>
and c
ontent_datetime
>
= #{endTime}
and c
t.UPDATE_DATE
>
= #{endTime}
</if>
</if>
<if
test=
"_databaseId == 'oracle'"
>
<if
test=
"_databaseId == 'oracle'"
>
and c
ontent_datetime
>
= to_date(#{endTime}, 'yyyy-mm-dd hh24:mi:ss')
and c
t.UPDATE_DATE
>
= to_date(#{endTime}, 'yyyy-mm-dd hh24:mi:ss')
</if>
</if>
</if>
</if>
<if
test=
"flag!=null and flag!=''"
>
<if
test=
"flag!=null and flag!=''"
>
...
...
src/main/java/net/mingsoft/config/ShiroConfig.java
View file @
defa5d20
...
@@ -20,11 +20,14 @@
...
@@ -20,11 +20,14 @@
*/
*/
package
net.mingsoft.config
;
package
net.mingsoft.config
;
import
cn.hutool.core.codec.Base64
;
import
net.mingsoft.basic.realm.ManagerAuthRealm
;
import
net.mingsoft.basic.realm.ManagerAuthRealm
;
import
org.apache.shiro.mgt.SecurityManager
;
import
org.apache.shiro.mgt.SecurityManager
;
import
org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor
;
import
org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor
;
import
org.apache.shiro.spring.web.ShiroFilterFactoryBean
;
import
org.apache.shiro.spring.web.ShiroFilterFactoryBean
;
import
org.apache.shiro.web.mgt.CookieRememberMeManager
;
import
org.apache.shiro.web.mgt.DefaultWebSecurityManager
;
import
org.apache.shiro.web.mgt.DefaultWebSecurityManager
;
import
org.apache.shiro.web.servlet.SimpleCookie
;
import
org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator
;
import
org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
...
@@ -97,12 +100,36 @@ public class ShiroConfig {
...
@@ -97,12 +100,36 @@ public class ShiroConfig {
filterChainDefinitionMap
.
put
(
managerPath
+
"/checkLogin.do"
,
"anon"
);
filterChainDefinitionMap
.
put
(
managerPath
+
"/checkLogin.do"
,
"anon"
);
// 其余接口一律拦截
// 其余接口一律拦截
// 主要这行代码必须放在所有权限设置的最后,不然会导致所有 url 都被拦截
// 主要这行代码必须放在所有权限设置的最后,不然会导致所有 url 都被拦截
filterChainDefinitionMap
.
put
(
managerPath
+
"/**"
,
"
authc
"
);
filterChainDefinitionMap
.
put
(
managerPath
+
"/**"
,
"
user
"
);
shiroFilterFactoryBean
.
setFilterChainDefinitionMap
(
filterChainDefinitionMap
);
shiroFilterFactoryBean
.
setFilterChainDefinitionMap
(
filterChainDefinitionMap
);
return
shiroFilterFactoryBean
;
return
shiroFilterFactoryBean
;
}
}
/**
* cookie对象
* @return
*/
public
SimpleCookie
rememberMeCookie
()
{
// 设置cookie名称,对应login.html页面的<input type="checkbox" name="rememberMe"/>
SimpleCookie
cookie
=
new
SimpleCookie
(
"rememberMe"
);
// 设置cookie的过期时间,单位为秒,这里为一天
cookie
.
setMaxAge
(
86400
);
return
cookie
;
}
/**
* cookie管理对象
* @return
*/
public
CookieRememberMeManager
rememberMeManager
()
{
CookieRememberMeManager
cookieRememberMeManager
=
new
CookieRememberMeManager
();
cookieRememberMeManager
.
setCookie
(
rememberMeCookie
());
// rememberMe cookie加密的密钥
cookieRememberMeManager
.
setCipherKey
(
Base64
.
decode
(
"4AvVhmFLUs0KTA3Kprsdag=="
));
return
cookieRememberMeManager
;
}
/**
/**
* 注入 securityManager
* 注入 securityManager
*/
*/
...
@@ -111,6 +138,8 @@ public class ShiroConfig {
...
@@ -111,6 +138,8 @@ public class ShiroConfig {
DefaultWebSecurityManager
securityManager
=
new
DefaultWebSecurityManager
();
DefaultWebSecurityManager
securityManager
=
new
DefaultWebSecurityManager
();
// 设置realm.
// 设置realm.
securityManager
.
setRealm
(
customRealm
());
securityManager
.
setRealm
(
customRealm
());
//cookie管理配置对象
securityManager
.
setRememberMeManager
(
rememberMeManager
());
return
securityManager
;
return
securityManager
;
}
}
...
...
src/main/webapp/WEB-INF/manager/cms/category/form.ftl
View file @
defa5d20
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
<div class="ms-form-tip">
<div class="ms-form-tip">
列表:<b>列表->详情</b> 的页面,例如:<i>新闻列表、图片列表</i>,可以多篇文章<br>
列表:<b>列表->详情</b> 的页面,例如:<i>新闻列表、图片列表</i>,可以多篇文章<br>
单篇:<b>单篇文章</b>,例如:<i>关于我们、公司介绍</i>,只能发一篇文章<br>
单篇:<b>单篇文章</b>,例如:<i>关于我们、公司介绍</i>,只能发一篇文章<br>
拦截
:外链接,需要配合逻辑判断<b><#if></b>和<b>自定义链接</b>标签使用使用,不能发文章<br>
链接
:外链接,需要配合逻辑判断<b><#if></b>和<b>自定义链接</b>标签使用使用,不能发文章<br>
修改栏目时,如果该栏目下存在文章栏目类型则不能修改
修改栏目时,如果该栏目下存在文章栏目类型则不能修改
</div>
</div>
</el-form-item>
</el-form-item>
...
...
src/main/webapp/WEB-INF/manager/cms/category/index.ftl
View file @
defa5d20
...
@@ -50,7 +50,8 @@
...
@@ -50,7 +50,8 @@
</el-table-column>
</el-table-column>
<el-table-column label="链接地址" align="left" prop="categoryPath" min-width="200" show-overflow-tooltip>
<el-table-column label="链接地址" align="left" prop="categoryPath" min-width="200" show-overflow-tooltip>
<template slot-scope="scope">
<template slot-scope="scope">
<span style="cursor: pointer" class="copyBtn" :data-clipboard-text="'
{
ms
:
global
.url
/
}
'+scope.row.categoryPath+'/index.html'" @click="copyContent">
{{
"{ms:global.url/}"
+
scope
.row.categoryPath
+
"/index.html"
}}
</span>
<span v-if="scope.row.categoryType == '1' || scope.row.categoryType == '2'" style="cursor: pointer" class="copyBtn" :data-clipboard-text="'
{
ms
:
global
.url
/
}
'+scope.row.categoryPath+'/index.html'" @click="copyContent">
{{
"{ms:global.url/}"
+
scope
.row.categoryPath
+
"/index.html"
}}
</span>
<span v-if="scope.row.categoryType == '3'" style="cursor: pointer" class="copyBtn" :data-clipboard-text="scope.row.categoryDiyUrl" @click="copyContent">
{{
scope
.row.categoryDiyUrl
}}
</span>
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="列表地址" align="left" prop="categoryListUrl" width="100" show-overflow-tooltip>
<el-table-column label="列表地址" align="left" prop="categoryListUrl" width="100" show-overflow-tooltip>
...
@@ -58,10 +59,6 @@
...
@@ -58,10 +59,6 @@
<el-table-column label="内容地址" align="left" prop="categoryUrl" width="100" show-overflow-tooltip>
<el-table-column label="内容地址" align="left" prop="categoryUrl" width="100" show-overflow-tooltip>
<template slot-scope="scope">
<template slot-scope="scope">
{{
scope
.row.categoryType
==
'
1
'?
scope
.row.categoryUrl
:
''
}}
{{
scope
.row.categoryType
==
'
1
'?
scope
.row.categoryUrl
:
''
}}
</template>
</el-table-column>
<el-table-column label="封面地址" align="left" prop="categoryUrl" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{
scope
.row.categoryType
==
'
2
'?
scope
.row.categoryUrl
:
''
}}
{{
scope
.row.categoryType
==
'
2
'?
scope
.row.categoryUrl
:
''
}}
</template>
</template>
</el-table-column>
</el-table-column>
...
...
src/main/webapp/WEB-INF/manager/cms/generate/index.ftl
View file @
defa5d20
...
@@ -311,7 +311,7 @@
...
@@ -311,7 +311,7 @@
padding
:
20
px
;
padding
:
20
px
;
outline
:
none
;
outline
:
none
;
outline-offset
:
-1
px
;
outline-offset
:
-1
px
;
height
:
40
0
px
;
min-
height
:
25
0
px
;
max-width
:
100
%;
max-width
:
100
%;
background-color
:
#
FFFFFF
;
background-color
:
#
FFFFFF
;
flex-direction
:
column
;
flex-direction
:
column
;
...
@@ -459,7 +459,7 @@
...
@@ -459,7 +459,7 @@
padding
:
20
px
;
padding
:
20
px
;
outline
:
none
;
outline
:
none
;
outline-offset
:
-1
px
;
outline-offset
:
-1
px
;
height
:
30
0
px
;
min-
height
:
25
0
px
;
max-width
:
100
%;
max-width
:
100
%;
background-color
:
#
FFFFFF
;
background-color
:
#
FFFFFF
;
flex-direction
:
column
;
flex-direction
:
column
;
...
@@ -604,7 +604,7 @@
...
@@ -604,7 +604,7 @@
padding
:
20
px
;
padding
:
20
px
;
outline
:
none
;
outline
:
none
;
outline-offset
:
-1
px
;
outline-offset
:
-1
px
;
height
:
30
0
px
;
min-
height
:
25
0
px
;
max-width
:
100
%;
max-width
:
100
%;
background-color
:
#
FFFFFF
;
background-color
:
#
FFFFFF
;
flex-direction
:
column
;
flex-direction
:
column
;
...
...
src/main/webapp/template/1/default/css/app.css
View file @
defa5d20
...
@@ -102,7 +102,7 @@
...
@@ -102,7 +102,7 @@
flex-direction
:
row
;
flex-direction
:
row
;
display
:
flex
;
display
:
flex
;
padding-right
:
40px
;
padding-right
:
40px
;
width
:
5
0%
;
width
:
7
0%
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding-left
:
40px
;
padding-left
:
40px
;
justify-content
:
space-between
;
justify-content
:
space-between
;
...
...
src/main/webapp/template/1/default/search.htm
View file @
defa5d20
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
<img
title=
""
alt=
""
src=
"{ms:global.host/}/{@ms:file field.litpic/}"
>
<img
title=
""
alt=
""
src=
"{ms:global.host/}/{@ms:file field.litpic/}"
>
</div>
</div>
<div
class=
"news-content"
>
<div
class=
"news-content"
>
<a
href=
"{ms:global.url/}${field.link}"
class=
"title"
>
${field.title}
</a>
<a
href=
"{ms:global.url/}${field.link}"
class=
"title"
>
${field.title
?replace(search.content_title,'
<font
color=
"red"
>
'+search.content_title+'
</font>
')
}
</a>
<span
class=
"desc"
>
${field.descrip}
</span>
<span
class=
"desc"
>
${field.descrip}
</span>
</div>
</div>
</div>
</div>
...
...
Write
Preview
Supports
Markdown
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