From f69230529eb904b4fdc0335b47d33863bcc47916 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 28 Nov 2024 11:02:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E7=AB=A0=E9=A1=B5=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E5=92=8C=E6=90=9C=E7=B4=A2=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/article/add/index.vue | 7 ++++++- src/pages/article/list/index.vue | 6 +++--- src/setting.js | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/pages/article/add/index.vue b/src/pages/article/add/index.vue index 83de73f..8c88138 100644 --- a/src/pages/article/add/index.vue +++ b/src/pages/article/add/index.vue @@ -1275,7 +1275,12 @@ export default { this.$post(this.api.updateArticle, form).then(res => { this.updateFile(fileId, form, form.id) Util.successMsg('修改成功') - next ? next() : this.$router.push(`list?columnId=` + form.columnId + (form.columnId != this.originColumnId ? '&last=1' : '')) // 更改了所属栏目,则给列表传递一个last参数,跳转到最后一页 + if (next) { + next() + } else { + // 更改了所属栏目,则给列表传递一个last参数,跳转到最后一页 + form.columnId != this.originColumnId ? this.$router.push(`list?columnId=${form.columnId}&last=1`) : this.$router.back() + } }).catch(err => { this.submiting = false }) diff --git a/src/pages/article/list/index.vue b/src/pages/article/list/index.vue index 58cd984..27e9d68 100644 --- a/src/pages/article/list/index.vue +++ b/src/pages/article/list/index.vue @@ -139,9 +139,9 @@ export default { name: '修改人' } ], - keyword: '', + keyword: this.$route.query.keyword || '', list: [], - page: 1, + page: +this.$route.query.page || 1, pageSize: 10, total: 0, modifiedTimeSort: '', @@ -263,7 +263,7 @@ export default { // 文章列表 getData () { const id = this.$refs.column.getCurrentKey() - this.$router.push(`/article?columnId=${id}`).catch(e => { }) + this.$router.push(`/article?columnId=${id}&page=${this.page}&keyword=${this.keyword || ''}`).catch(e => { }) const { keyword } = this const data = { siteId: this.$store.state.content.site.id, diff --git a/src/setting.js b/src/setting.js index 18002e7..477d115 100644 --- a/src/setting.js +++ b/src/setting.js @@ -4,7 +4,7 @@ const isDev = process.env.NODE_ENV === 'development' // 开发环境 let host = location.origin if (isDev) { - host = 'https://huorantech.com' + host = 'https://info.izhixinyun.com' // host = 'http://192.168.31.217:10000' }