diff --git a/src/mixins/page/index.js b/src/mixins/page/index.js index d5b035e..1b0e34f 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: { // 获取详情 @@ -71,7 +73,6 @@ export default { this.id = json.id const str = json[json.state ? 'theEditedJson' : 'jsonBeforeEditing'] const list = JSON.parse(str) - console.log("🚀 ~ this.$post ~ list:", list, json.theEditedJson) this.modules.map((e, i) => { e.form = list[i].form @@ -81,10 +82,32 @@ export default { } }) this.originModules = JSON.stringify(this.modules) // 原始json,用以页面离开的时候判断是否需要提示保存 - console.log("🚀 ~ file: index.js:85 ~ this.$post ~ list:", this.modules[0]) + console.log("🚀 ~ file: index.js:85 ~ this.$post ~ list:", this.modules) } }).catch(err => { }) }, + // 获取栏目信息 + async getColumnInfo () { + const { data } = await this.$post(this.api.findColumn, Util.rsa(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/page/about.vue b/src/pages/column/page/about.vue index bc19dc4..c2885e5 100644 --- a/src/pages/column/page/about.vue +++ b/src/pages/column/page/about.vue @@ -1,13 +1,11 @@ @@ -269,23 +212,7 @@ export default { } }, mounted () { - this.$store.commit('user/setCrumbs', [ - { - name: '站点管理', - route: '/site' - }, - { - name: '内容管理', - route: '/column' - }, - { - name: '栏目管理', - route: '/column' - }, - { - name: 'ABOUT' - } - ]) + }, methods: { @@ -295,209 +222,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..0e4659a 100644 --- a/src/pages/column/page/aboutNew.vue +++ b/src/pages/column/page/aboutNew.vue @@ -1,13 +1,11 @@ @@ -228,23 +180,7 @@ export default { } }, mounted () { - this.$store.commit('user/setCrumbs', [ - { - name: '站点管理', - route: '/site' - }, - { - name: '内容管理', - route: '/column' - }, - { - name: '栏目管理', - route: '/column' - }, - { - name: 'ABOUT' - } - ]) + }, methods: { @@ -254,209 +190,254 @@ export default { \ No newline at end of file diff --git a/src/pages/column/page/application.vue b/src/pages/column/page/application.vue index 8e65e9c..0c4bd8c 100644 --- a/src/pages/column/page/application.vue +++ b/src/pages/column/page/application.vue @@ -1,13 +1,11 @@ @@ -184,25 +161,7 @@ export default { modules: Modules.application } }, - mounted () { - this.$store.commit('user/setCrumbs', [ - { - name: '站点管理', - route: '/site' - }, - { - name: '内容管理', - route: '/column' - }, - { - name: '栏目管理', - route: '/column' - }, - { - name: 'APPLICATION' - } - ]) - }, + mounted () { }, methods: { } @@ -211,142 +170,170 @@ export default { \ No newline at end of file diff --git a/src/pages/column/page/careers.vue b/src/pages/column/page/careers.vue index 7e20f63..45930d2 100644 --- a/src/pages/column/page/careers.vue +++ b/src/pages/column/page/careers.vue @@ -1,7 +1,7 @@ @@ -351,23 +267,7 @@ export default { } }, mounted () { - this.$store.commit('user/setCrumbs', [ - { - name: '站点管理', - route: '/site' - }, - { - name: '内容管理', - route: '/column' - }, - { - name: '栏目管理', - route: '/column' - }, - { - name: 'iasf中文首页' - } - ]) + }, methods: { @@ -377,380 +277,459 @@ export default { \ No newline at end of file diff --git a/src/pages/column/page/industrial.vue b/src/pages/column/page/industrial.vue index b0023ca..38b6081 100644 --- a/src/pages/column/page/industrial.vue +++ b/src/pages/column/page/industrial.vue @@ -1,13 +1,11 @@ @@ -218,25 +165,7 @@ export default { modules: Modules.industrial } }, - mounted () { - this.$store.commit('user/setCrumbs', [ - { - name: '站点管理', - route: '/site' - }, - { - name: '内容管理', - route: '/column' - }, - { - name: '栏目管理', - route: '/column' - }, - { - name: '产业应用' - } - ]) - }, + mounted () { }, methods: { } @@ -245,174 +174,207 @@ export default { diff --git a/src/pages/column/page/lightSources.vue b/src/pages/column/page/lightSources.vue index 7ff9620..f7368b3 100644 --- a/src/pages/column/page/lightSources.vue +++ b/src/pages/column/page/lightSources.vue @@ -2,13 +2,11 @@
-

页面设置/全球先进光源

+

页面设置/{{ columnName }}

- 预览 + 预览 保存为草稿 - 发布 + 发布 放弃编辑
@@ -16,43 +14,31 @@
- +
-
点击更换banner与链接
+
点击更换banner与链接

{{ modules[1].form.title }}

-

{{ modules[1].form.des }}

- -
点击更换标题、描述、图片与链接
+

{{ modules[1].form.des }}

+ +
点击更换标题、描述、图片与链接
    -
  • {{ item.name }}
  • +
  • {{ + item.name }}
-
+
@@ -69,8 +55,7 @@ @@ -170,25 +145,7 @@ export default { ] } }, - mounted () { - this.$store.commit('user/setCrumbs', [ - { - name: '站点管理', - route: '/site' - }, - { - name: '内容管理', - route: '/column' - }, - { - name: '栏目管理', - route: '/column' - }, - { - name: '全球先进光源' - } - ]) - }, + mounted () { }, methods: { // tab回调 tabChange (i) { @@ -200,61 +157,74 @@ export default { \ No newline at end of file diff --git a/src/pages/column/page/mission.vue b/src/pages/column/page/mission.vue index a276cbe..d58dba8 100644 --- a/src/pages/column/page/mission.vue +++ b/src/pages/column/page/mission.vue @@ -1,13 +1,11 @@ @@ -101,25 +78,7 @@ export default { modules: Modules.mission } }, - mounted () { - this.$store.commit('user/setCrumbs', [ - { - name: '站点管理', - route: '/site' - }, - { - name: '内容管理', - route: '/column' - }, - { - name: '栏目管理', - route: '/column' - }, - { - name: '关于IASF-使命愿景价值观' - } - ]) - }, + mounted () { }, methods: { } @@ -128,126 +87,150 @@ export default { diff --git a/src/pages/column/page/news.vue b/src/pages/column/page/news.vue index cf4aa49..dd73e68 100644 --- a/src/pages/column/page/news.vue +++ b/src/pages/column/page/news.vue @@ -1,13 +1,11 @@ @@ -347,25 +279,7 @@ export default { active: '' } }, - mounted () { - this.$store.commit('user/setCrumbs', [ - { - name: '站点管理', - route: '/site' - }, - { - name: '内容管理', - route: '/column' - }, - { - name: '栏目管理', - route: '/column' - }, - { - name: 'NEWS&EVENTS' - } - ]) - }, + mounted () { }, methods: { } @@ -374,248 +288,299 @@ export default { \ No newline at end of file diff --git a/src/pages/column/page/newsPress.vue b/src/pages/column/page/newsPress.vue index b508385..58e89be 100644 --- a/src/pages/column/page/newsPress.vue +++ b/src/pages/column/page/newsPress.vue @@ -1,7 +1,7 @@ @@ -119,25 +92,7 @@ export default { }, } }, - mounted () { - this.$store.commit('user/setCrumbs', [ - { - name: '站点管理', - route: '/site' - }, - { - name: '内容管理', - route: '/column' - }, - { - name: '栏目管理', - route: '/column' - }, - { - name: '人才中心' - } - ]) - }, + mounted () { }, methods: { } @@ -146,131 +101,156 @@ export default { \ No newline at end of file diff --git a/src/pages/column/page/team.vue b/src/pages/column/page/team.vue index 33d09d7..1adf89b 100644 --- a/src/pages/column/page/team.vue +++ b/src/pages/column/page/team.vue @@ -2,13 +2,11 @@
-

页面设置/关于IASF-核心团队

+

页面设置/{{ columnName }}

- 预览 + 预览 保存为草稿 - 发布 + 发布 放弃编辑
@@ -16,43 +14,32 @@
- +
-
点击更换banner与链接
+
点击更换banner与链接
    -
  • - +
  • +
    {{ item.title }}

    {{ item.subTitle }}

    -
    +
-
点击更换图片、标题、描述
+
点击更换图片、标题、描述
- +
@@ -66,25 +53,7 @@ export default { modules: Modules.team } }, - mounted () { - this.$store.commit('user/setCrumbs', [ - { - name: '站点管理', - route: '/site' - }, - { - name: '内容管理', - route: '/column' - }, - { - name: '栏目管理', - route: '/column' - }, - { - name: '关于IASF-核心团队' - } - ]) - }, + mounted () { }, methods: { } @@ -93,47 +62,56 @@ export default { \ No newline at end of file diff --git a/src/pages/column/page/userSharing.vue b/src/pages/column/page/userSharing.vue index 3b9a015..e3bcea6 100644 --- a/src/pages/column/page/userSharing.vue +++ b/src/pages/column/page/userSharing.vue @@ -1,13 +1,11 @@ @@ -94,25 +76,7 @@ export default { modules: Modules.userSharing } }, - mounted () { - this.$store.commit('user/setCrumbs', [ - { - name: '站点管理', - route: '/site' - }, - { - name: '内容管理', - route: '/column' - }, - { - name: '栏目管理', - route: '/column' - }, - { - name: '用户共享' - } - ]) - }, + mounted () { }, methods: { } @@ -121,96 +85,111 @@ export default { \ No newline at end of file diff --git a/src/setting.js b/src/setting.js index 317ebcb..8a84f59 100644 --- a/src/setting.js +++ b/src/setting.js @@ -3,9 +3,7 @@ * */ const isDev = process.env.NODE_ENV === 'development' // 开发环境 let host = `${location.origin}/` -if (isDev) { - host = 'http://192.168.31.51:10000/' -} + const Setting = { /** * 基础配置