Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cms_sys
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
西魏
cms_sys
Commits
defa5d20
Commit
defa5d20
authored
Jul 30, 2021
by
msgroup
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、登录优化
2、栏目表单优化 3、样式调整
parent
428a24f5
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
16 deletions
+42
-16
IContentDao.xml
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
+4
-4
ShiroConfig.java
src/main/java/net/mingsoft/config/ShiroConfig.java
+30
-1
form.ftl
src/main/webapp/WEB-INF/manager/cms/category/form.ftl
+1
-1
index.ftl
src/main/webapp/WEB-INF/manager/cms/category/index.ftl
+2
-5
index.ftl
src/main/webapp/WEB-INF/manager/cms/generate/index.ftl
+3
-3
app.css
src/main/webapp/template/1/default/css/app.css
+1
-1
search.htm
src/main/webapp/template/1/default/search.htm
+1
-1
No files found.
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
View file @
defa5d20
...
...
@@ -259,18 +259,18 @@
</if>
<if
test=
"beginTime!=null and beginTime!=''"
>
<if
test=
"_databaseId == 'mysql'"
>
and content_datetime
>
=
#{beginTime}
AND ct.UPDATE_DATE
>
=
#{beginTime}
</if>
<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
test=
"endTime!=null and endTime!=''"
>
<if
test=
"_databaseId == 'mysql'"
>
and c
ontent_datetime
>
= #{endTime}
and c
t.UPDATE_DATE
>
= #{endTime}
</if>
<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
test=
"flag!=null and flag!=''"
>
...
...
src/main/java/net/mingsoft/config/ShiroConfig.java
View file @
defa5d20
...
...
@@ -20,11 +20,14 @@
*/
package
net
.
mingsoft
.
config
;
import
cn.hutool.core.codec.Base64
;
import
net.mingsoft.basic.realm.ManagerAuthRealm
;
import
org.apache.shiro.mgt.SecurityManager
;
import
org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor
;
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.servlet.SimpleCookie
;
import
org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
...
...
@@ -97,12 +100,36 @@ public class ShiroConfig {
filterChainDefinitionMap
.
put
(
managerPath
+
"/checkLogin.do"
,
"anon"
);
// 其余接口一律拦截
// 主要这行代码必须放在所有权限设置的最后,不然会导致所有 url 都被拦截
filterChainDefinitionMap
.
put
(
managerPath
+
"/**"
,
"
authc
"
);
filterChainDefinitionMap
.
put
(
managerPath
+
"/**"
,
"
user
"
);
shiroFilterFactoryBean
.
setFilterChainDefinitionMap
(
filterChainDefinitionMap
);
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
*/
...
...
@@ -111,6 +138,8 @@ public class ShiroConfig {
DefaultWebSecurityManager
securityManager
=
new
DefaultWebSecurityManager
();
// 设置realm.
securityManager
.
setRealm
(
customRealm
());
//cookie管理配置对象
securityManager
.
setRememberMeManager
(
rememberMeManager
());
return
securityManager
;
}
...
...
src/main/webapp/WEB-INF/manager/cms/category/form.ftl
View file @
defa5d20
...
...
@@ -57,7 +57,7 @@
<div
class=
"ms-form-tip"
>
列表:
<b>
列表->详情
</b>
的页面,例如:
<i>
新闻列表、图片列表
</i>
,可以多篇文章
<br>
单篇:
<b>
单篇文章
</b>
,例如:
<i>
关于我们、公司介绍
</i>
,只能发一篇文章
<br>
拦截
:外链接,需要配合逻辑判断
<b>
<
#if
>
</b>
和
<b>
自定义链接
</b>
标签使用使用,不能发文章
<br>
链接
:外链接,需要配合逻辑判断
<b>
<
#if
>
</b>
和
<b>
自定义链接
</b>
标签使用使用,不能发文章
<br>
修改栏目时,如果该栏目下存在文章栏目类型则不能修改
</div>
</el-form-item>
...
...
src/main/webapp/WEB-INF/manager/cms/category/index.ftl
View file @
defa5d20
...
...
@@ -50,7 +50,8 @@
</el-table-column>
<el-table-column
label=
"链接地址"
align=
"left"
prop=
"categoryPath"
min-width=
"200"
show-overflow-tooltip
>
<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>
</el-table-column>
<el-table-column
label=
"列表地址"
align=
"left"
prop=
"categoryListUrl"
width=
"100"
show-overflow-tooltip
>
...
...
@@ -58,10 +59,6 @@
<el-table-column
label=
"内容地址"
align=
"left"
prop=
"categoryUrl"
width=
"100"
show-overflow-tooltip
>
<template
slot-scope=
"scope"
>
{{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:''}}
</template>
</el-table-column>
...
...
src/main/webapp/WEB-INF/manager/cms/generate/index.ftl
View file @
defa5d20
...
...
@@ -311,7 +311,7 @@
padding
:
20px
;
outline
:
none
;
outline-offset
:
-1px
;
height
:
40
0px
;
min-height
:
25
0px
;
max-width
:
100%
;
background-color
:
#FFFFFF
;
flex-direction
:
column
;
...
...
@@ -459,7 +459,7 @@
padding
:
20px
;
outline
:
none
;
outline-offset
:
-1px
;
height
:
30
0px
;
min-height
:
25
0px
;
max-width
:
100%
;
background-color
:
#FFFFFF
;
flex-direction
:
column
;
...
...
@@ -604,7 +604,7 @@
padding
:
20px
;
outline
:
none
;
outline-offset
:
-1px
;
height
:
30
0px
;
min-height
:
25
0px
;
max-width
:
100%
;
background-color
:
#FFFFFF
;
flex-direction
:
column
;
...
...
src/main/webapp/template/1/default/css/app.css
View file @
defa5d20
...
...
@@ -102,7 +102,7 @@
flex-direction
:
row
;
display
:
flex
;
padding-right
:
40px
;
width
:
5
0%
;
width
:
7
0%
;
box-sizing
:
border-box
;
padding-left
:
40px
;
justify-content
:
space-between
;
...
...
src/main/webapp/template/1/default/search.htm
View file @
defa5d20
...
...
@@ -47,7 +47,7 @@
<img
title=
""
alt=
""
src=
"{ms:global.host/}/{@ms:file field.litpic/}"
>
</div>
<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>
</div>
</div>
...
...
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