1、登录优化

2、栏目表单优化
3、样式调整
master
msgroup 4 years ago
parent 428a24f500
commit defa5d2033
  1. 8
      src/main/java/net/mingsoft/cms/dao/IContentDao.xml
  2. 31
      src/main/java/net/mingsoft/config/ShiroConfig.java
  3. 2
      src/main/webapp/WEB-INF/manager/cms/category/form.ftl
  4. 7
      src/main/webapp/WEB-INF/manager/cms/category/index.ftl
  5. 6
      src/main/webapp/WEB-INF/manager/cms/generate/index.ftl
  6. 2
      src/main/webapp/template/1/default/css/app.css
  7. 2
      src/main/webapp/template/1/default/search.htm

@ -259,18 +259,18 @@
</if>
<if test="beginTime!=null and beginTime!=''">
<if test="_databaseId == 'mysql'">
and content_datetime &gt;= #{beginTime}
AND ct.UPDATE_DATE &gt;= #{beginTime}
</if>
<if test="_databaseId == 'oracle'">
and content_datetime &gt;= to_date(#{beginTime}, 'yyyy-mm-dd hh24:mi:ss')
and ct.UPDATE_DATE &gt;= to_date(#{beginTime}, 'yyyy-mm-dd hh24:mi:ss')
</if>
</if>
<if test="endTime!=null and endTime!=''">
<if test="_databaseId == 'mysql'">
and content_datetime &gt;= #{endTime}
and ct.UPDATE_DATE &gt;= #{endTime}
</if>
<if test="_databaseId == 'oracle'">
and content_datetime &gt;= to_date(#{endTime}, 'yyyy-mm-dd hh24:mi:ss')
and ct.UPDATE_DATE &gt;= to_date(#{endTime}, 'yyyy-mm-dd hh24:mi:ss')
</if>
</if>
<if test="flag!=null and flag!=''">

@ -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;
}

@ -57,7 +57,7 @@
<div class="ms-form-tip">
列表:<b>列表->详情</b> 的页面,例如:<i>新闻列表、图片列表</i>,可以多篇文章<br>
单篇:<b>单篇文章</b>,例如:<i>关于我们、公司介绍</i>,只能发一篇文章<br>
拦截:外链接,需要配合逻辑判断<b>&lt;#if&gt;</b>和<b>自定义链接</b>标签使用使用,不能发文章<br>
链接:外链接,需要配合逻辑判断<b>&lt;#if&gt;</b>和<b>自定义链接</b>标签使用使用,不能发文章<br>
修改栏目时,如果该栏目下存在文章栏目类型则不能修改
</div>
</el-form-item>

@ -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>

@ -311,7 +311,7 @@
padding:20px;
outline:none;
outline-offset:-1px;
height:400px;
min-height:250px;
max-width:100%;
background-color:#FFFFFF;
flex-direction:column;
@ -459,7 +459,7 @@
padding:20px;
outline:none;
outline-offset:-1px;
height:300px;
min-height:250px;
max-width:100%;
background-color:#FFFFFF;
flex-direction:column;
@ -604,7 +604,7 @@
padding:20px;
outline:none;
outline-offset:-1px;
height:300px;
min-height:250px;
max-width:100%;
background-color:#FFFFFF;
flex-direction:column;

@ -102,7 +102,7 @@
flex-direction: row;
display: flex;
padding-right: 40px;
width: 50%;
width: 70%;
box-sizing: border-box;
padding-left: 40px;
justify-content: space-between;

@ -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>

Loading…
Cancel
Save