diff --git a/src/assets/images/publication-bg.png b/src/assets/images/publication-bg.png new file mode 100644 index 0000000..3b8c9b6 Binary files /dev/null and b/src/assets/images/publication-bg.png differ diff --git a/src/mixins/article/index.js b/src/mixins/article/index.js index 78b4126..eddd63f 100644 --- a/src/mixins/article/index.js +++ b/src/mixins/article/index.js @@ -30,7 +30,7 @@ export default { const ids = href.split('-') // 栏目文章是用-分割的,栏目是必选,文章不是必选。选择了文章则跳转到文章页,否则跳转到栏目页 // 站点id:站内链接取当前站点,其他站点链接取siteSelection const site = cType === 1 ? - (this.$route.query.siteId || this.site) : + (this.site) : to.siteSelection if (ids[1]) { // 文章 href = '/article?articleId=' + ids[1] @@ -54,7 +54,7 @@ export default { } } else if (typeId !== 4 || (typeId === 4 && !to.children.length)) { // 常规栏目跳转到column页,长页栏目直接获取path - this.$router.push(`/${typeId === 3 ? to.path : 'column'}?id=${to.id}&siteId=${this.$route.query.siteId || this.site}`).catch(err => {}) + this.$router.push(`/${typeId === 3 ? to.path : 'column'}?id=${to.id}&siteId=${this.site}`).catch(err => {}) } }, // 跳转文章页面 @@ -66,7 +66,7 @@ export default { const ids = href.split('-') // 栏目文章是用-分割的,栏目是必选,文章不是必选。选择了文章则跳转到文章页,否则跳转到栏目页 // 站点id:站内链接取当前站点,其他站点链接取siteSelection const site = cType === 1 ? - (this.$route.query.siteId || this.site) : + (this.site) : item.siteSelection if (ids[1]) { // 文章 href = '/article?articleId=' + ids[1] @@ -89,7 +89,7 @@ export default { location.href = href } } else { - this.$router.push(`/article?articleId=${item.id}&site=${this.$route.query.siteId || this.site}&id=${item.columnId}`) + this.$router.push(`/article?articleId=${item.id}&site=${this.site}&id=${item.columnId}`) } } } diff --git a/src/pages/column/index.vue b/src/pages/column/index.vue index 29847de..6196487 100644 --- a/src/pages/column/index.vue +++ b/src/pages/column/index.vue @@ -235,9 +235,13 @@ export default { }, // 判断是否是出版物模板,如果是则跳转 handlePublication() { - this.$post(`${this.api.getsSublevelColumnsUnderALevel}?id=${this.id}&siteId=${this.site}`).then(({ data }) => { - data.length && data.every(e => e.templateId == 11) && this.$router.push(`/publication?siteId=${this.site}&id=${this.id}`) // 如果子级每个栏目都是出版物类型 - }).catch(err => {}) + if (this.info.templateId === 11) { // 出版社直接跳转到单个的出版社页面(/publication/single),否则就查询子级是否是出版社模板(templateId = 11),是的话就跳转到/publication/index,必须是每个子级都是出版社才跳转,后者是前者的集合(专利、专著、论文) + this.$router.push(`/publication/single?siteId=${this.site}&id=${this.id}&type=${this.info.listStyleId}`) + } else { + this.$post(`${this.api.getsSublevelColumnsUnderALevel}?id=${this.id}&siteId=${this.site}`).then(({ data }) => { + data.length && data.every(e => e.templateId == 11) && this.$router.push(`/publication?siteId=${this.site}&id=${this.id}`) // 如果子级每个栏目都是出版物类型 + }).catch(err => {}) + } }, // 获取banner 规则:当前栏目有上传的,用当前的,没有上传的话,读取上级的(上级没有读上上级,以此类推)都没有的读取默认的 getBanner(data) { diff --git a/src/pages/publication/index.vue b/src/pages/publication/index.vue index c0b4402..715cd00 100644 --- a/src/pages/publication/index.vue +++ b/src/pages/publication/index.vue @@ -55,6 +55,7 @@ export default { this.id && this.$post(`${this.api.findColumn}?id=${this.id}`) .then(({ data }) => { + if (!data.columnBanner) data.columnBanner = require('@/assets/images/publication-bg.png'); this.info = data }) .catch((res) => { }) diff --git a/src/pages/publication/monograph.vue b/src/pages/publication/monograph.vue index 0592893..0c4895c 100644 --- a/src/pages/publication/monograph.vue +++ b/src/pages/publication/monograph.vue @@ -15,7 +15,7 @@