diff --git a/src/mixins/page/index.js b/src/mixins/page/index.js index e7b4bc0..cf344ad 100644 --- a/src/mixins/page/index.js +++ b/src/mixins/page/index.js @@ -17,6 +17,7 @@ export default { curListIndex: 0, curData: {}, pass: false, + columnName: '', } }, components: { @@ -40,6 +41,7 @@ export default { }, mounted () { this.getInfo() + this.getColumnInfo() }, methods: { // 获取详情 @@ -88,6 +90,28 @@ export default { this.pass = true } }, + // 获取栏目信息 + async getColumnInfo () { + const { data } = await this.$post(`${this.api.findColumn}?id=${this.columnId}`) + this.columnName = data.columnName + this.$store.commit('user/setCrumbs', [ + { + name: '站点管理', + route: '/site' + }, + { + name: '内容管理', + route: '/column' + }, + { + name: '栏目管理', + route: '/column' + }, + { + name: data.columnName + } + ]) + }, // 展开模块设置 toSet (i, listIndex) { this.curModule = i diff --git a/src/pages/column/add/index.vue b/src/pages/column/add/index.vue index 8ab8d82..ae10f2a 100644 --- a/src/pages/column/add/index.vue +++ b/src/pages/column/add/index.vue @@ -566,6 +566,14 @@ export default { token: Util.local.get(Setting.tokenKey) }, }).then(({ data }) => { + if (data.code === 401) { + Util.errorMsg("登录过期,请重新登录"); + setTimeout(() => { + this.$store.dispatch('user/logout') + }, 1000); + return false + } + let url = this.form.columnBanner url && this.$del(this.api.delFile, [url.split('/').pop()]).then(res => { }).catch(e => { }) // 删除替换掉的图片 this.form.columnBanner = data.url diff --git a/src/pages/column/page/about.vue b/src/pages/column/page/about.vue index bc19dc4..32f84f6 100644 --- a/src/pages/column/page/about.vue +++ b/src/pages/column/page/about.vue @@ -1,13 +1,11 @@ @@ -268,25 +211,7 @@ export default { modules: Modules.about } }, - mounted () { - this.$store.commit('user/setCrumbs', [ - { - name: '站点管理', - route: '/site' - }, - { - name: '内容管理', - route: '/column' - }, - { - name: '栏目管理', - route: '/column' - }, - { - name: 'ABOUT' - } - ]) - }, + mounted () { }, methods: { } @@ -295,209 +220,254 @@ export default { \ No newline at end of file diff --git a/src/pages/column/page/aboutNew.vue b/src/pages/column/page/aboutNew.vue index 7ea1ae1..5e23cb3 100644 --- a/src/pages/column/page/aboutNew.vue +++ b/src/pages/column/page/aboutNew.vue @@ -1,13 +1,11 @@ @@ -227,25 +179,7 @@ export default { modules: Modules.about } }, - mounted () { - this.$store.commit('user/setCrumbs', [ - { - name: '站点管理', - route: '/site' - }, - { - name: '内容管理', - route: '/column' - }, - { - name: '栏目管理', - route: '/column' - }, - { - name: 'ABOUT' - } - ]) - }, + mounted () { }, methods: { } @@ -254,209 +188,254 @@ export default { \ No newline at end of file diff --git a/src/pages/column/page/aboutUs.vue b/src/pages/column/page/aboutUs.vue index 7f27525..ae40d69 100644 --- a/src/pages/column/page/aboutUs.vue +++ b/src/pages/column/page/aboutUs.vue @@ -1,7 +1,7 @@