From 18ff1c99a7757f6ea905c8d49d2c50e498953c3c Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Mon, 21 Nov 2022 16:52:46 +0800 Subject: [PATCH] fix --- src/mixins/page/index.js | 26 +++++++++++++++++--- src/pages/about/index.vue | 27 +++++++++------------ src/pages/application/index.vue | 19 ++++++++++----- src/pages/article/index.vue | 3 ++- src/pages/careers/index.vue | 16 ++++++------ src/pages/column/index.vue | 2 +- src/pages/edu/index.vue | 9 +++---- src/pages/home/index.vue | 17 +++++++------ src/pages/news/index.vue | 15 +++++++----- src/pages/newsPress/index.vue | 4 +-- src/pages/newsProcurement/index.vue | 4 +-- src/pages/research/index.vue | 8 +++--- src/styles/common.scss | 4 +++ src/styles/font/SF-Pro-Display-Bold.otf | Bin 0 -> 334728 bytes src/styles/font/SF-Pro-Display-Regular.otf | Bin 0 -> 298944 bytes src/styles/page/page.scss | 6 +++-- 16 files changed, 98 insertions(+), 62 deletions(-) create mode 100644 src/styles/font/SF-Pro-Display-Bold.otf create mode 100644 src/styles/font/SF-Pro-Display-Regular.otf diff --git a/src/mixins/page/index.js b/src/mixins/page/index.js index e2e91a6..3266d2d 100644 --- a/src/mixins/page/index.js +++ b/src/mixins/page/index.js @@ -3,6 +3,7 @@ import Util from '@/libs/util' export default { data() { return { + site: this.$store.state.content.site, id: this.$route.query.id, preview: this.$route.query.preview, modules: [], @@ -13,18 +14,37 @@ export default { this.getInfo() }, methods: { - // banner打开链接 + // 打开链接 openLink(item) { const { link } = item + if (link.linkName === '无') return false + console.log("🚀 ~ file: index.js ~ line 19 ~ openLink ~ link", link) let href = link.linkAddress - if (link.connectionType !== 2) { - + const type = link.connectionType + if (type === 1) { + if (link.articleId) { // 文章 + href = '/article?id=' + link.articleId + } else { // 栏目 + href = '/column?id=' + link.columnId[link.columnId.length - 1] + } + href = this.$router.resolve(href + '&siteId=' + (this.$route.query.siteId || this.site)).href + } else if (type === 3) { + if (link.otherArticleId) { // 文章 + href = '/article?id=' + link.otherArticleId + } else { // 栏目 + href = '/column?id=' + link.otherColumnId[link.otherColumnId.length - 1] + } + href = this.$router.resolve(href + '&siteId=' + link.site).href } if (link.isOpen) { window.open(href) } else { location.href = href } + }, + // 跳转文章页面 + toArtice(item) { + this.$router.push(`/article?id=${item.id}&site=${this.$route.query.siteId || this.site}`) } } }; \ No newline at end of file diff --git a/src/pages/about/index.vue b/src/pages/about/index.vue index 097b014..256597c 100644 --- a/src/pages/about/index.vue +++ b/src/pages/about/index.vue @@ -3,7 +3,7 @@ @@ -119,17 +119,17 @@

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

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