diff --git a/src/mixins/overview/index.js b/src/mixins/overview/index.js new file mode 100644 index 0000000..b256d1f --- /dev/null +++ b/src/mixins/overview/index.js @@ -0,0 +1,34 @@ +export default { + data() { + return { + tabs: ['S³FEL介绍', '发展历程', 'S³FEL宣传片', '地理位置', '机构设置'], + } + }, + methods: { + // 获取文章详情 + getInfo() { + // 预览/详情 + this.$post(`${this.api[this.preview ? 'getRedisCache' : 'findPage']}?columnId=${this.id}`).then(({ data }) => { + if (data.length) { + // state:已发布(1)则取theEditedJson,草稿(0)则取jsonBeforeEditing + const json = JSON.parse(this.preview ? + data : + data[data.length - 1][data[data.length - 1].state ? 'theEditedJson' : 'jsonBeforeEditing']) + this.modules = json + console.log("🚀 ~ file: index.vue ~ line 180 ~ this.$post ~ json", json) + } + }).catch(err => {}) + }, + // tab回调 + tabChange(i) { + this.active = i + // 跳转到固定的长页,这里的id不能变 + let path = '/overviewIntro?id=220' + if (i == 1) path = '/overviewDevHistory?id=214' + if (i == 2) path = '/overviewTrailer?id=215' + if (i == 3) path = '/overviewLocation?id=216' + if (i == 4) path = '/overviewSetup?id=217' + this.$router.push(path + '&siteId=3') + }, + } +}; \ No newline at end of file diff --git a/src/pages/overviewDevHistory/index.vue b/src/pages/overviewDevHistory/index.vue index 6129898..1800c14 100644 --- a/src/pages/overviewDevHistory/index.vue +++ b/src/pages/overviewDevHistory/index.vue @@ -46,13 +46,13 @@ + + \ No newline at end of file diff --git a/src/pages/overviewLocation/index.vue b/src/pages/overviewLocation/index.vue index 9fea22b..b736817 100644 --- a/src/pages/overviewLocation/index.vue +++ b/src/pages/overviewLocation/index.vue @@ -21,38 +21,20 @@ diff --git a/src/pages/overviewSetup/index.vue b/src/pages/overviewSetup/index.vue index 21b94e5..2098ca9 100644 --- a/src/pages/overviewSetup/index.vue +++ b/src/pages/overviewSetup/index.vue @@ -31,38 +31,20 @@ diff --git a/src/pages/overviewTrailer/index.vue b/src/pages/overviewTrailer/index.vue index 3c9d081..188fbbe 100644 --- a/src/pages/overviewTrailer/index.vue +++ b/src/pages/overviewTrailer/index.vue @@ -27,38 +27,20 @@ diff --git a/src/router/modules/overviewIntro.js b/src/router/modules/overviewIntro.js new file mode 100644 index 0000000..5c075d4 --- /dev/null +++ b/src/router/modules/overviewIntro.js @@ -0,0 +1,14 @@ +import BasicLayout from '@/layouts/home' +const name = 'overviewIntro' +export default { + path: `/${name}`, + component: BasicLayout, + children: [ + { + name, + path: `/${name}`, + component: () => import(`@/pages/${name}`), + meta: { title: '' } + } + ] +};