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']) console.log('json=》',json) 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=378' if (i == 1) path = '/overviewDevHistory?id=379' if (i == 2) path = '/overviewTrailer?id=380' if (i == 3) path = '/overviewLocation?id=381' if (i == 4) path = '/overviewSetup?id=382' this.$router.push(path + '&siteId=4') }, }, filters: { i18nName(name,type) { switch (name) { case 'S³FEL介绍': return type.t('column.sfeLintroduce') case '发展历程': return type.t('column.develHistory') case 'S³FEL宣传片': return type.t('column.sfeltrailer') case '地理位置': return type.t('column.geographicLocation') case '机构设置': return type.t('column.organization') default: return name } } } };