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: '新闻类目管理' }, } ], },{