From a2a6ade27d3e89d5f686a13f6e037584fbe915b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A6=86=E9=92=B1=E8=90=BD=E5=B0=BD=E6=A7=BF=E8=8A=B1?= =?UTF-8?q?=E7=A8=80?= <2675540038@qq.com> Date: Tue, 18 Jun 2024 09:33:08 +0800 Subject: [PATCH] 1 --- index.html | 75 +++++++++++--- src/pages/activity/activity_index.vue | 38 +++++++- src/pages/association/index.vue | 31 +++++- src/pages/association/person.vue | 2 +- src/pages/news/news_index.vue | 34 ++++++- src/pages/news/news_type.vue | 135 ++++++++++++++++++++++++++ src/router/modules/components.ts | 6 ++ 7 files changed, 298 insertions(+), 23 deletions(-) create mode 100644 src/pages/news/news_type.vue diff --git a/index.html b/index.html index 15db5e8..8a8e00c 100644 --- a/index.html +++ b/index.html @@ -1,17 +1,68 @@ - - - - + + + + - - -
- - + + +
+ + - + + diff --git a/src/pages/activity/activity_index.vue b/src/pages/activity/activity_index.vue index 7a87870..79eeb20 100644 --- a/src/pages/activity/activity_index.vue +++ b/src/pages/activity/activity_index.vue @@ -29,6 +29,9 @@ + +
+ + +
@@ -84,10 +90,11 @@ - + @@ -113,6 +120,7 @@ export default { news_image: '', news_image_show:[], showtime:'', + news_hits:0, }, addMode: false, isEdit: false, @@ -126,6 +134,7 @@ export default { {colKey: 'news_hits', title: '点击量', align: 'center'}, {colKey: 'news_source', title: '来源', align: 'center'}, {colKey: 'showtime', title: '创建时间', align: 'center'}, + {colKey: 'top', title: '置顶', align: 'center'}, {colKey: 'select', title: '操作', width: 200, align: 'center'}, ], pagination: { @@ -208,6 +217,23 @@ export default { onCreated(editor) { this.editor = Object.seal(editor); }, + topNews(row){ + console.log(row); + this.$request + .post('/common/listtopping', {id: row.news_id,type:'news'}) + .then((res) => { + if (res.code == 1) { + this.$message.success('置顶成功'); + this.getList(); + } else { + this.$message.error(res.msg); + } + console.log(res); + }) + .catch((e) => { + console.log(e); + }); + }, del(d) { console.log(d); this.$request @@ -238,6 +264,7 @@ export default { news_image: '', news_image_show:[], showtime:'', + news_hits:0, }; }, edit(d) { @@ -251,7 +278,8 @@ export default { this.addForm.news_auto = d.news_auto; this.addForm.news_source = d.news_source; this.addForm.news_content = d.news_content; - this.addForm.showtime = d.showtime; + this.addForm.showtime = d.showtime + this.addForm.news_hits = d.news_hits; this.addMode = true; this.isEdit = true; }, @@ -272,7 +300,7 @@ export default { }, getGory(){ this.$request - .post("/news/gory") + .post("/gory/index") .then((res) => { console.log(res); if (res.code == 1) { diff --git a/src/pages/news/news_type.vue b/src/pages/news/news_type.vue new file mode 100644 index 0000000..a3857c7 --- /dev/null +++ b/src/pages/news/news_type.vue @@ -0,0 +1,135 @@ + + + diff --git a/src/router/modules/components.ts b/src/router/modules/components.ts index 17b0929..32bf505 100644 --- a/src/router/modules/components.ts +++ b/src/router/modules/components.ts @@ -81,6 +81,12 @@ export default [ name: 'newsIndex', component: () => import('@/pages/news/news_index.vue'), meta: { title: '新闻内容管理' }, + }, + { + path: 'news_type', + name: 'newsType', + component: () => import('@/pages/news/news_type.vue'), + meta: { title: '新闻类目管理' }, } ], },{