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' }