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. 4
      src/main/webapp/template/1/default/css/app.css
  7. 128
      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;
@ -777,4 +777,4 @@
font-size: 14px;
padding-top: 0px;
}
}
}

@ -1,55 +1,55 @@
<html>
<head>
<meta charset="utf-8">
<title>{ms:global.name/}</title>
<meta http-equiv="content-type" content="text/html">
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no,width=device-width">
<meta name="format-detection" content="telephone=no">
<meta name="app-mobile-web-app-capable" content="yes">
<meta name="app-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="keywords" content="{ms:global.keyword/}">
<meta name="description" content="{ms:global.descrip/}">
<script type="text/javascript" src="{ms:global.host/}/static/plugins/vue/2.6.9/vue.min.js"></script>
<link rel="stylesheet" href="{ms:global.host/}/static/plugins/minireset/0.0.2/minireset.min.css">
<link rel="stylesheet" href="https://cdn.mingsoft.net/iconfont/iconfont.css">
<link rel="stylesheet" href="{ms:global.host/}/static/plugins/animate/4.1.0/animate.min.css">
<script src="{ms:global.host/}/static/plugins/element-ui/2.12.0/index.js"></script>
<link rel="stylesheet" href="{ms:global.host/}/static/plugins/element-ui/2.12.0/index.css">
<link rel="stylesheet" href="{ms:global.host/}/{ms:global.style/}/css/app.css">
<!--网络请求框架-->
<script src="{ms:global.host/}/static/plugins/axios/0.18.0/axios.min.js"></script>
<script src="{ms:global.host/}/static/plugins/qs/6.6.0/qs.min.js"></script>
<script src="{ms:global.host/}/static/plugins/ms/1.0.0/ms.js"></script>
<script src="{ms:global.host/}/static/plugins/ms/1.0.0/ms.http.js"></script>
<script src="{ms:global.host/}/static/plugins/ms/1.0.0/ms.util.js"></script>
<head>
<meta charset="utf-8">
<title>{ms:global.name/}</title>
<meta http-equiv="content-type" content="text/html">
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no,width=device-width">
<meta name="format-detection" content="telephone=no">
<meta name="app-mobile-web-app-capable" content="yes">
<meta name="app-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="keywords" content="{ms:global.keyword/}">
<meta name="description" content="{ms:global.descrip/}">
<script type="text/javascript" src="{ms:global.host/}/static/plugins/vue/2.6.9/vue.min.js"></script>
<link rel="stylesheet" href="{ms:global.host/}/static/plugins/minireset/0.0.2/minireset.min.css">
<link rel="stylesheet" href="https://cdn.mingsoft.net/iconfont/iconfont.css">
<link rel="stylesheet" href="{ms:global.host/}/static/plugins/animate/4.1.0/animate.min.css">
<script src="{ms:global.host/}/static/plugins/element-ui/2.12.0/index.js"></script>
<link rel="stylesheet" href="{ms:global.host/}/static/plugins/element-ui/2.12.0/index.css">
<link rel="stylesheet" href="{ms:global.host/}/{ms:global.style/}/css/app.css">
<!--网络请求框架-->
<script src="{ms:global.host/}/static/plugins/axios/0.18.0/axios.min.js"></script>
<script src="{ms:global.host/}/static/plugins/qs/6.6.0/qs.min.js"></script>
<script src="{ms:global.host/}/static/plugins/ms/1.0.0/ms.js"></script>
<script src="{ms:global.host/}/static/plugins/ms/1.0.0/ms.http.js"></script>
<script src="{ms:global.host/}/static/plugins/ms/1.0.0/ms.util.js"></script>
<script>
ms.base = "";
</script>
</script>
<style>
[v-cloak]{
display: none;
}
</style>
</head>
<body>
<div id="app" v-cloak>
<#include "nav.htm" />
<div class="search">
<div class="body">
</style>
</head>
<body>
<div id="app" v-cloak>
<#include "nav.htm" />
<div class="search">
<div class="body">
<span> 关键字 <span style="color: red">{ms:search.content_title/}</span> </span>
<div class="right-body">
<#assign isEmpty=true>
{ms:arclist size=10 ispaging=true}
<#assign isEmpty=false>
<div class="news-item">
<div class="pic">
<div class="news-item">
<div class="pic">
<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>
<span class="desc"> ${field.descrip} </span>
</div>
</div>
<div class="news-content">
<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>
{/ms:arclist}
<#if isEmpty>
@ -68,10 +68,10 @@
:total="contentCount"> </el-pagination>
</div>
</div>
</div>
<#include "footer.htm" />
</div>
</div>
</div>
<#include "footer.htm" />
</div>
<script>
var app = new Vue({
el: '#app',
@ -126,7 +126,7 @@ var app = new Vue({
created(){
}
})
</script>
</script>
<style>
body {
background-color:#fff;
@ -136,7 +136,7 @@ var app = new Vue({
webkit-box-sizing:border-box;
}
.search
.search
{
align-items:center;
flex-direction:row;
@ -152,7 +152,7 @@ var app = new Vue({
padding-left:0px;
margin-top:0px;
}
.search .body
.search .body
{
flex-direction:column;
display:flex;
@ -168,7 +168,7 @@ var app = new Vue({
margin-top:0px;
height:100%;
}
.search .body span
.search .body span
{
padding-bottom:0px;
flex-direction:row;
@ -194,7 +194,7 @@ var app = new Vue({
width: 100%;
}
.search .body .right-body
.search .body .right-body
{
align-items:flex-start;
flex-direction:column;
@ -211,7 +211,7 @@ var app = new Vue({
margin-top:0px;
height:100%;
}
.search .body .right-body .news-item
.search .body .right-body .news-item
{
padding-bottom:0px;
flex-wrap:nowrap;
@ -226,7 +226,7 @@ var app = new Vue({
margin-top:0px;
height:120px;
}
.search .body .right-body .news-item .pic
.search .body .right-body .news-item .pic
{
padding-bottom:0px;
flex-wrap:nowrap;
@ -237,7 +237,7 @@ var app = new Vue({
padding-top:0px;
height:120px;
}
.search .body .right-body .news-item .pic img
.search .body .right-body .news-item .pic img
{
margin-right:0px;
padding-bottom:0px;
@ -249,7 +249,7 @@ var app = new Vue({
height:100%;
margin-left:0px;
}
.search .body .right-body .news-item .news-content
.search .body .right-body .news-item .news-content
{
padding-bottom:0px;
flex-wrap:nowrap;
@ -264,7 +264,7 @@ var app = new Vue({
justify-content:flex-start;
height:100%;
}
.search .body .right-body .news-item .news-content .title
.search .body .right-body .news-item .news-content .title
{
padding-bottom:0px;
flex-direction:row;
@ -274,7 +274,7 @@ var app = new Vue({
padding-top:0px;
padding-left:0px;
}
.search .body .right-body .news-item .news-content .desc
.search .body .right-body .news-item .news-content .desc
{
padding-bottom:8px;
color:#909399;
@ -289,7 +289,7 @@ var app = new Vue({
height:100px;
}
@media (max-width: 768px){
.search
.search
{
align-items:center;
flex-direction:row;
@ -305,7 +305,7 @@ var app = new Vue({
padding-left:0px;
margin-top:0px;
}
.search .body
.search .body
{
padding-bottom:20px;
align-items:center;
@ -319,7 +319,7 @@ var app = new Vue({
padding-left:0px;
justify-content:flex-start;
}
.search .body .right-body
.search .body .right-body
{
align-items:center;
flex-direction:column;
@ -337,7 +337,7 @@ var app = new Vue({
margin-top:0px;
height:100%;
}
.search .body .right-body .news-item
.search .body .right-body .news-item
{
padding-bottom:0px;
flex-wrap:nowrap;
@ -350,7 +350,7 @@ var app = new Vue({
padding-top:0px;
padding-left:0px;
}
.search .body .right-body .news-item .pic
.search .body .right-body .news-item .pic
{
padding-bottom:0px;
flex-wrap:nowrap;
@ -362,7 +362,7 @@ var app = new Vue({
padding-top:0px;
height:120px;
}
.search .body .right-body .news-item .pic img
.search .body .right-body .news-item .pic img
{
padding-bottom:0px;
padding-right:0px;
@ -371,7 +371,7 @@ var app = new Vue({
padding-left:0px;
height:100%;
}
.search .body .right-body .news-item .news-content
.search .body .right-body .news-item .news-content
{
padding-bottom:0px;
flex-wrap:nowrap;
@ -386,7 +386,7 @@ var app = new Vue({
justify-content:flex-start;
height:100%;
}
.search .body .right-body .news-item .news-content .title
.search .body .right-body .news-item .news-content .title
{
padding-bottom:0px;
text-align:left;
@ -399,7 +399,7 @@ var app = new Vue({
padding-left:0px;
margin-top:8px;
}
.search .body .right-body .news-item .news-content .desc
.search .body .right-body .news-item .news-content .desc
{
padding-bottom:8px;
color:#909399;
@ -417,4 +417,4 @@ var app = new Vue({
}</style>
</body>
</html>
</html>

Loading…
Cancel
Save