diff --git a/ruoyi-admin/src/main/java/com/ruoyi/cms/domain/CmsContent.java b/ruoyi-admin/src/main/java/com/ruoyi/cms/domain/CmsContent.java index d933c73..96e4667 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/cms/domain/CmsContent.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/cms/domain/CmsContent.java @@ -48,6 +48,8 @@ public class CmsContent extends BaseEntity /** 内容 */ @Excel(name = "内容") private String contentDetail; + //标签名称 + private String tagName; /** 来源 */ @Excel(name = "来源") diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 7416da8..ad9caf2 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -95,7 +95,9 @@ token: # 令牌密钥 secret: abcdefghijklmnopqrstuvwxyz # 令牌有效期(默认30分钟) - expireTime: 30 + expireTime: 999999999 + + ## MyBatis配置 #mybatis: diff --git a/ruoyi-admin/src/main/resources/mapper/cms/CmsContentMapper.xml b/ruoyi-admin/src/main/resources/mapper/cms/CmsContentMapper.xml index 928600b..0f8cef6 100644 --- a/ruoyi-admin/src/main/resources/mapper/cms/CmsContentMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/cms/CmsContentMapper.xml @@ -17,6 +17,7 @@ + @@ -53,6 +54,7 @@ author, editor, summary, + tag_name, status, publish_date, offline_date, @@ -111,6 +113,7 @@ content_img, source, source_url, + tag_name, original, author, editor, @@ -170,6 +173,7 @@ original, author, editor, + tag_name, summary, status, publish_date, @@ -199,6 +203,7 @@ #{original}, #{author}, #{editor}, + #{tagName}, #{summary}, #{status}, #{publishDate}, @@ -236,6 +241,7 @@ source_url = #{sourceUrl}, original = #{original}, author = #{author}, + tag_name = #{tagName}, editor = #{editor}, summary = #{summary}, status = #{status}, diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index 38e21be..9b2ce24 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -115,7 +115,7 @@ public class SecurityConfig // 静态资源,可匿名访问 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() - .antMatchers("/api/**", "/ueditor/**","/system/dict/data/type/sys_user_sex").permitAll() + .antMatchers("/api/**", "/ueditor/**","/system/dict/data/type/sys_user_sex","/system/dict/data/type/imitation_type").permitAll() // 除上面外的所有请求全部需要鉴权认证 .anyRequest().authenticated(); }) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/TokenService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/TokenService.java index aa112da..10141a8 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/TokenService.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/TokenService.java @@ -150,7 +150,7 @@ public class TokenService loginUser.setExpireTime(loginUser.getLoginTime() + expireTime * MILLIS_MINUTE); // 根据uuid将loginUser缓存 String userKey = getTokenKey(loginUser.getToken()); - redisCache.setCacheObject(userKey, loginUser, expireTime, TimeUnit.MINUTES); + redisCache.setCacheObject(userKey, loginUser); } /** diff --git a/ruoyi-ui/src/api/system/dict/data.js b/ruoyi-ui/src/api/system/dict/data.js index 6c9eb79..a830ca5 100644 --- a/ruoyi-ui/src/api/system/dict/data.js +++ b/ruoyi-ui/src/api/system/dict/data.js @@ -1,4 +1,5 @@ import request from '@/utils/request' +import {imitationId} from "@/api/gw/home"; // 查询字典数据列表 export function listData(query) { @@ -24,7 +25,22 @@ export function getDicts(dictType) { method: 'get' }) } +export function goDeatail(data) { + if (data.linkType == 0) { + const routeUrl = this.$router.resolve({ name: 'details', query: {id: data.link} }); + window.open(routeUrl.href); + } + if (data.linkType == 1) { + imitationId(data.id).then(res => { + }) + window.open(data.link); + } + if (data.linkType == 2) { + const routeUrl = this.$router.resolve({ name: 'details', query: {id: data.id} }); + window.open(routeUrl.href); + } +} // 新增字典数据 export function addData(data) { return request({ diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js index e24db80..0a79c74 100644 --- a/ruoyi-ui/src/main.js +++ b/ruoyi-ui/src/main.js @@ -16,7 +16,7 @@ import { download } from '@/utils/request' import './assets/icons' // icon import './permission' // permission control -import { getDicts } from "@/api/system/dict/data"; +import {getDicts, goDeatail} from "@/api/system/dict/data"; import { getConfigKey } from "@/api/system/config"; import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi"; // 分页组件 @@ -52,7 +52,7 @@ Vue.prototype.selectDictLabel = selectDictLabel Vue.prototype.selectDictLabels = selectDictLabels Vue.prototype.download = download Vue.prototype.handleTree = handleTree - +Vue.prototype.goDeatail = goDeatail // 全局组件挂载 Vue.component('DictTag', DictTag) Vue.component('Pagination', Pagination) diff --git a/ruoyi-ui/src/views/cms/content/contentList.vue b/ruoyi-ui/src/views/cms/content/contentList.vue index 3fba495..80309d9 100644 --- a/ruoyi-ui/src/views/cms/content/contentList.vue +++ b/ruoyi-ui/src/views/cms/content/contentList.vue @@ -53,20 +53,7 @@ style="width: 200px" @keyup.enter.native="handleQuery"/> - - - - - + - + + + + diff --git a/ruoyi-ui/src/views/cms/editor/index.vue b/ruoyi-ui/src/views/cms/editor/index.vue index 8ffd224..e1a1ad9 100644 --- a/ruoyi-ui/src/views/cms/editor/index.vue +++ b/ruoyi-ui/src/views/cms/editor/index.vue @@ -2,7 +2,7 @@
-
+
保存 发布
@@ -10,95 +10,6 @@ - - - - -
- - - - -
-
- - - - -
-
- - - - {{ dict.label }} - - - -
-
- - - -
-
- - - - -
-
- - - - {{ dict.label }} - - - -
-
-
-
- - - -
- -
-
- -
-
- -
-
-
-
-
@@ -114,36 +25,122 @@ - + + + + + - - - - - - - - - - - - + + - - - - - - - - - + + + + + + + + + +
+ + + + +
+
+ + + + +
+ + + +
+ + + + {{ dict.label }} + + + +
+
+ + + +
+
+ + + + +
+ + + + + + + + + + + + +
+ + + + +
+ +
+ + + + + + +
+
+
+
+
@@ -209,7 +206,7 @@ export default { status: '0', isAccessory: '0', accessoryUrl: [], - linkType: "0", + linkType: "2", link: '' }, rules: { @@ -226,7 +223,7 @@ export default { UEDITOR_CORS_URL: '/static/UEditorPlus/', }, categoryList: "", - linkType: "0", + linkType: "2", linkList: [], } }, @@ -251,7 +248,7 @@ export default { isAccessory: '0', accessoryUrl: [], id: "", - linkType: "0", + linkType: "2", link: '' } }, diff --git a/ruoyi-ui/src/views/hit/imitation/index.vue b/ruoyi-ui/src/views/hit/imitation/index.vue index b671e22..c394966 100644 --- a/ruoyi-ui/src/views/hit/imitation/index.vue +++ b/ruoyi-ui/src/views/hit/imitation/index.vue @@ -1,10 +1,10 @@