diff --git a/ruoyi-admin/src/main/java/com/ruoyi/cms/api/CMSCategoryAPI.java b/ruoyi-admin/src/main/java/com/ruoyi/cms/api/CMSCategoryAPI.java index 1fdfa79..57cc902 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/cms/api/CMSCategoryAPI.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/cms/api/CMSCategoryAPI.java @@ -45,6 +45,10 @@ public class CMSCategoryAPI extends BaseController { */ @PostMapping("/contentList") public AjaxResult contentList(@RequestBody CmsContentQuery contentQuery){ + + + + if (contentQuery.getCategoryId() == null) return success(); return success(categoryService.contentList(contentQuery)); } 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 96e4667..38ee8cb 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 @@ -36,6 +36,7 @@ public class CmsContent extends BaseEntity /** 内容类型(0=文章,1=图片,2=视频) */ @Excel(name = "内容类型(0=文章,1=图片,2=视频)") private String contentType; + private Integer sortNum; /** 标题 */ @Excel(name = "标题") diff --git a/ruoyi-admin/src/main/resources/mapper/cms/CmsContentMapper.xml b/ruoyi-admin/src/main/resources/mapper/cms/CmsContentMapper.xml index 3250f7e..2d34502 100644 --- a/ruoyi-admin/src/main/resources/mapper/cms/CmsContentMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/cms/CmsContentMapper.xml @@ -15,6 +15,7 @@ + @@ -52,6 +53,7 @@ source_url, original, author, + sort_num, editor, summary, tag_name, @@ -85,6 +87,7 @@ source_url, original, author, + sort_num, editor, summary, tag_name, @@ -124,7 +127,7 @@ and accessory_url = #{accessoryUrl} and del_flag = #{delFlag} - order by create_time desc, update_time desc + order by sort_num ASC, create_time desc, update_time desc @@ -255,6 +260,7 @@ source_url, original, author, + sort_num, editor, tag_name, summary, @@ -285,6 +291,7 @@ #{sourceUrl}, #{original}, #{author}, + #{sortNum}, #{editor}, #{tagName}, #{summary}, @@ -326,6 +333,7 @@ author = #{author}, tag_name = #{tagName}, editor = #{editor}, + sort_num = #{sortNum}, summary = #{summary}, status = #{status}, publish_date = #{publishDate}, diff --git a/ruoyi-ui/src/views/cms/content/contentList.vue b/ruoyi-ui/src/views/cms/content/contentList.vue index 80309d9..3624325 100644 --- a/ruoyi-ui/src/views/cms/content/contentList.vue +++ b/ruoyi-ui/src/views/cms/content/contentList.vue @@ -211,6 +211,9 @@ export default { } this.getList(); }, + mounted() { + this.handleQuery() + }, methods: { /** 新增按钮操作 */ handleAdd() { diff --git a/ruoyi-ui/src/views/cms/editor/index.vue b/ruoyi-ui/src/views/cms/editor/index.vue index 0547963..5964c7e 100644 --- a/ruoyi-ui/src/views/cms/editor/index.vue +++ b/ruoyi-ui/src/views/cms/editor/index.vue @@ -4,7 +4,7 @@
保存 - 发布 +
@@ -33,6 +33,15 @@ show-word-limit> + + + + + diff --git a/ruoyi-ui/src/views/home.vue b/ruoyi-ui/src/views/home.vue index d5b69d6..36e0607 100644 --- a/ruoyi-ui/src/views/home.vue +++ b/ruoyi-ui/src/views/home.vue @@ -120,7 +120,7 @@
-
{{getDictLabel(item.imitationType)}}
+
{{getDictLabel(item.imitationType)}}
diff --git a/ruoyi-ui/src/views/officialWebsite/competition.vue b/ruoyi-ui/src/views/officialWebsite/competition.vue index dea0768..e8cea46 100644 --- a/ruoyi-ui/src/views/officialWebsite/competition.vue +++ b/ruoyi-ui/src/views/officialWebsite/competition.vue @@ -296,9 +296,19 @@
-
-
{{item.contentTitle}}
-
{{item.publishDate}}
+ + + + +
+
+
{{item.publishDate}}
+
{{item.contentTitle}}
+
{{item.summary || '' }}
+
+
+ +
@@ -1102,4 +1112,35 @@ export default { color: #00A0E8; cursor: pointer; } +.n-box{ + width: 100%; + display: flex; + justify-content: space-between; + border-bottom: 1px solid #DDDDDD; + box-sizing: border-box; + padding: 15px 0px; + background: #fff; +} +.noticeRsr:hover{ + color: #00A0E8; + cursor: pointer; +} +.v-time{ + font-weight: 500; + font-size: 18px; + color: #005375; + margin-bottom: 15px; +} +.v-title{ + font-weight: bold; + font-size: 24px; + color: #005375; + margin-bottom: 15px; +} +.v-size{ + width: 800px; + font-size: 18px; + color: #999999; +} +