From a87eb4c3b6fe14ae9dedc84de651aa596a42f939 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 17 Aug 2023 10:55:05 +0800 Subject: [PATCH] fix --- src/components/breadcrumb/index.vue | 70 +-- src/pages/article/index.vue | 98 ++-- src/pages/contactUs/index.vue | 4 +- src/pages/governance/index.vue | 10 +- src/pages/iasf/index.vue | 181 +++--- src/pages/lightSources/index.vue | 62 ++- src/pages/overview/index.vue | 39 +- src/pages/talentCenter/index.vue | 824 +++++++++++++++------------- 8 files changed, 661 insertions(+), 627 deletions(-) diff --git a/src/components/breadcrumb/index.vue b/src/components/breadcrumb/index.vue index 95245d5..e7fa089 100644 --- a/src/components/breadcrumb/index.vue +++ b/src/components/breadcrumb/index.vue @@ -1,67 +1,35 @@
\ No newline at end of file diff --git a/src/pages/article/index.vue b/src/pages/article/index.vue index 840e641..d85fa2c 100644 --- a/src/pages/article/index.vue +++ b/src/pages/article/index.vue @@ -52,6 +52,7 @@ export default { return { id: this.$route.query.articleId, columnId: +this.$route.query.id, + preview: this.$route.query.preview, loaded: false, routes: [], form: {}, @@ -77,54 +78,63 @@ export default { methods: { // 获取文章详情 getInfo () { - this.id && this.$post(`${this.api.findArticle}?id=${this.id}`).then(async ({ data }) => { - // 设置面包屑 - const { columnName, path, id } = this.$route.query - this.routes = [ - { - name: columnName || data.columnName, - path: path ? '/' + path : '', - query: { - id: id || data.columnId + // 预览直接取缓存数据,不然就调接口 + if (this.preview) { + const data = localStorage.getItem('article') + this.form = data + if (temId == 69) this.isParty = 1 // 组织架构(articleTemplate=69)是另一套主题,加个class即可 + if (temId == 72) this.isPeople = 1 // 人物详情(articleTemplate=72)要隐藏除了正文和摘要以外的所有字段 + data.releaseTime = data.releaseTime.split(' ')[0] + } else { + this.$post(`${this.api.findArticle}?id=${this.id}`).then(async ({ data }) => { + // 设置面包屑 + const { columnName, path, id } = this.$route.query + this.routes = [ + { + name: columnName || data.columnName, + path: path ? '/' + path : '', + query: { + id: id || data.columnId + } + }, + { + name: data.title } - }, - { - name: data.title - } - ] - // 文章被禁用了就直接返回 - if (data.isDisable) { - this.$router.back() - } else { - const temId = data.articleTemplate - let path = `?articleId=${this.id}&id=${id}&columnName=${columnName || ''}&path=${path || ''}` - if (temId === 25 || temId === 26) { // 会议活动/期刊详情 - this.$router.replace((temId === 25 ? '/article/activity' : '/publish/show') + path) + ] + // 文章被禁用了就直接返回 + if (data.isDisable) { + this.$router.back() } else { - if (temId == 69) this.isParty = 1 // 组织架构(articleTemplate=69)是另一套主题,加个class即可 - if (temId == 72) this.isPeople = 1 // 人物详情(articleTemplate=72)要隐藏除了正文和摘要以外的所有字段 - data.releaseTime = data.releaseTime.split(' ')[0] - this.form = data - this.columnId = data.columnId - // 如果没上传banner - if (!data.bannerImg) { - const columns = await this.$post(this.api.listWithTree, { - siteId: this.site, - columnName: '', - templateId: '', - typeId: '', - isSort: 1 - }) - this.getBanner(columns.data) - this.form.bannerImg = this.gotBanner ? this.columnBanner || require('@/assets/images/article-banner.png') : '' - } + const temId = data.articleTemplate + let path = `?articleId=${this.id}&id=${id}&columnName=${columnName || ''}&path=${path || ''}` + if (temId === 25 || temId === 26) { // 会议活动/期刊详情 + this.$router.replace((temId === 25 ? '/article/activity' : '/publish/show') + path) + } else { + if (temId == 69) this.isParty = 1 // 组织架构(articleTemplate=69)是另一套主题,加个class即可 + if (temId == 72) this.isPeople = 1 // 人物详情(articleTemplate=72)要隐藏除了正文和摘要以外的所有字段 + data.releaseTime = data.releaseTime.split(' ')[0] + this.form = data + this.columnId = data.columnId + // 如果没上传banner + if (!data.bannerImg) { + const columns = await this.$post(this.api.listWithTree, { + siteId: this.site, + columnName: '', + templateId: '', + typeId: '', + isSort: 1 + }) + this.getBanner(columns.data) + this.form.bannerImg = this.gotBanner ? this.columnBanner || require('@/assets/images/article-banner.png') : '' + } - // 浏览量+1 - this.$post(`${this.api.articlePreview}?contentId=${this.id}`).then(({ data }) => { }).catch(err => { }) - this.loaded = true + // 浏览量+1 + this.$post(`${this.api.articlePreview}?contentId=${this.id}`).then(({ data }) => { }).catch(err => { }) + this.loaded = true + } } - } - }).catch(err => { }) + }).catch(err => { }) + } }, // 列表详情 getColumnInfo () { diff --git a/src/pages/contactUs/index.vue b/src/pages/contactUs/index.vue index f0d29d8..121cbf0 100644 --- a/src/pages/contactUs/index.vue +++ b/src/pages/contactUs/index.vue @@ -17,9 +17,7 @@{{ modules[1].form.address }}
-{{ modules[1].form.phone }}
-{{ modules[1].form.email }}
+{{ curArticle1.releaseTime }}
-{{ item.releaseTime }}
+{{ curArticle2.releaseTime }}
-{{ item.releaseTime }}
+{{ curArticle3.activityStartTime.split(' ')[0] }}
-{{ item.activityStartTime.split(' ')[0].split('-')[2] }}
+{{ item.activityStartTime.split(' ')[0].split('-')[0] + '-' + item.activityStartTime.split(' ')[0].split('-')[1] }}
+光源名称 | -国家 | +国家和地区 | 地点 | 加速器技术 | 能量/GeV | 波长范围/nm | -重复频率/Hz Repetition rate | -设施长度/m Overall length | -线站数量 | +重复频率/Hz | +设施长度/m | +实验站/个 | 状态 | -出光时间 | +建成时间 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ item.name }} | +{{ item.name }} | {{ item.country }} | {{ item.address }} | {{ item.accelerator }} | @@ -204,6 +202,10 @@ export default { font-size: 0.9rem; text-align: left; } + .link { + color: #1583ff; + cursor: pointer; + } } .copyright { margin-top: 10px; diff --git a/src/pages/overview/index.vue b/src/pages/overview/index.vue index f6bc719..5c35fe9 100644 --- a/src/pages/overview/index.vue +++ b/src/pages/overview/index.vue @@ -121,11 +121,17 @@ data-wow-delay="0.5s">{{ modules[8].form.des }}