diff --git a/src/libs/util.js b/src/libs/util.js index 406faf1..9a95e88 100644 --- a/src/libs/util.js +++ b/src/libs/util.js @@ -150,7 +150,6 @@ const util = { // 传入站点id,判断是否英文 getLang(id) { let siteId = util.getQuery('siteId') -console.log("🚀 ~ file: main.js:42 ~ siteId:", siteId) return Setting.enIds.includes(siteId ? +siteId : store.state.content.site) ? 'en' : 'zh' }, }; diff --git a/src/pages/article/index.vue b/src/pages/article/index.vue index d85fa2c..4d51777 100644 --- a/src/pages/article/index.vue +++ b/src/pages/article/index.vue @@ -79,12 +79,24 @@ export default { // 获取文章详情 getInfo () { // 预览直接取缓存数据,不然就调接口 - if (this.preview) { - const data = localStorage.getItem('article') - this.form = data + let cache = localStorage.getItem('article') + if (this.preview && cache) { + cache = JSON.parse(cache) + const temId = cache.articleTemplate + this.form = cache + this.routes = [ + { + name: cache.columnName, + }, + { + name: cache.title + } + ] if (temId == 69) this.isParty = 1 // 组织架构(articleTemplate=69)是另一套主题,加个class即可 if (temId == 72) this.isPeople = 1 // 人物详情(articleTemplate=72)要隐藏除了正文和摘要以外的所有字段 - data.releaseTime = data.releaseTime.split(' ')[0] + if (cache.releaseTime) cache.releaseTime = cache.releaseTime.split(' ')[0] + this.loaded = true + console.log("🚀 ~ file: index.vue:90 ~ getInfo ~ cache:", this.form, cache) } else { this.$post(`${this.api.findArticle}?id=${this.id}`).then(async ({ data }) => { // 设置面包屑 @@ -138,7 +150,6 @@ export default { }, // 列表详情 getColumnInfo () { - console.log("🚀 ~ file: index.vue:125 ~ getColumnInfo ~ this.columnId:", this.columnId) this.columnId && this.$post(`${this.api.findColumn}?id=${this.columnId}`) .then(({ data }) => { if (data.detailStyleId == 69) this.isParty = 1 diff --git a/src/pages/iasf/index.vue b/src/pages/iasf/index.vue index 49a8c59..1c1e53a 100644 --- a/src/pages/iasf/index.vue +++ b/src/pages/iasf/index.vue @@ -116,73 +116,88 @@
{{ item.releaseTime }}
-{{ curArticle1.releaseTime }}
+{{ item.releaseTime }}
-{{ curArticle2.releaseTime }}
+{{ item.activityStartTime.split(' ')[0].split('-')[2] }}
-{{ item.activityStartTime.split(' ')[0].split('-')[0] + '-' + item.activityStartTime.split(' ')[0].split('-')[1] }}
-{{ curArticle3.activityStartTime.split(' ')[0].split('-')[2] }}
+{{ curArticle3.activityStartTime.split(' ')[0].split('-')[0] + '-' + curArticle3.activityStartTime.split(' ')[0].split('-')[1] }}
+{{ item.name }} | -{{ item.country }} | -{{ item.address }} | -{{ item.accelerator }} | -{{ item.gev }} | -{{ item.wavelength }} | -{{ item.repetitive }} | -{{ item.facility }} | -{{ item.stations }} | -{{ item.status }} | -{{ item.time }} | -
{{ item.name }} | +{{ item.country }} | +{{ item.address }} | +{{ item.accelerator }} | +{{ item.gev }} | +{{ item.wavelength }} | +{{ item.repetitive }} | +{{ item.facility }} | +{{ item.stations }} | +{{ item.status }} | +{{ item.time }} | +
暂无数据 | + colspan="20">暂无数据