|
|
@ -3,13 +3,17 @@ import Util from '@/libs/util' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
site: this.$store.state.content.site, |
|
|
|
|
|
|
|
id: this.$route.query.id, |
|
|
|
id: this.$route.query.id, |
|
|
|
preview: this.$route.query.preview, |
|
|
|
preview: this.$route.query.preview, |
|
|
|
modules: [], |
|
|
|
modules: [], |
|
|
|
articles: [] |
|
|
|
articles: [] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
|
|
|
|
site() { |
|
|
|
|
|
|
|
return this.$route.query.siteId || this.$store.state.content.site |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
|
this.getInfo && this.id && this.getInfo() |
|
|
|
this.getInfo && this.id && this.getInfo() |
|
|
|
}, |
|
|
|
}, |
|
|
@ -32,7 +36,7 @@ export default { |
|
|
|
} else { // 栏目
|
|
|
|
} else { // 栏目
|
|
|
|
href = '/column?id=' + link.columnId[link.columnId.length - 1] |
|
|
|
href = '/column?id=' + link.columnId[link.columnId.length - 1] |
|
|
|
} |
|
|
|
} |
|
|
|
href += '&siteId=' + (this.$route.query.siteId || this.site) |
|
|
|
href += '&siteId=' + (this.site) |
|
|
|
if (!link.articleId) href = this.$router.resolve(href).href |
|
|
|
if (!link.articleId) href = this.$router.resolve(href).href |
|
|
|
} else if (type === 3) { // 站外链接
|
|
|
|
} else if (type === 3) { // 站外链接
|
|
|
|
if (link.otherArticleId) { // 文章
|
|
|
|
if (link.otherArticleId) { // 文章
|
|
|
@ -83,7 +87,7 @@ export default { |
|
|
|
const ids = href.split('-') // 栏目文章是用-分割的,栏目是必选,文章不是必选。选择了文章则跳转到文章页,否则跳转到栏目页
|
|
|
|
const ids = href.split('-') // 栏目文章是用-分割的,栏目是必选,文章不是必选。选择了文章则跳转到文章页,否则跳转到栏目页
|
|
|
|
// 站点id:站内链接取当前站点,其他站点链接取siteSelection
|
|
|
|
// 站点id:站内链接取当前站点,其他站点链接取siteSelection
|
|
|
|
const site = cType === 1 ? |
|
|
|
const site = cType === 1 ? |
|
|
|
(this.$route.query.siteId || this.site) : |
|
|
|
(this.site) : |
|
|
|
item.siteSelection |
|
|
|
item.siteSelection |
|
|
|
if (ids[1]) { // 文章
|
|
|
|
if (ids[1]) { // 文章
|
|
|
|
href = '/article?articleId=' + ids[1] |
|
|
|
href = '/article?articleId=' + ids[1] |
|
|
@ -95,7 +99,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
this.toHref(item.isOpen, href) |
|
|
|
this.toHref(item.isOpen, href) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.$router.push(`/article?articleId=${item.id}&siteId=${this.$route.query.siteId || this.site}&id=${this.id}&columnName=${form.columnTitle === 2 ? form.columnTitleCustom : form.columnName}&path=${this.$route.path.replace('/', '')}`) |
|
|
|
this.$router.push(`/article?articleId=${item.id}&siteId=${this.site}&id=${this.id}&columnName=${form.columnTitle === 2 ? form.columnTitleCustom : form.columnName}&path=${this.$route.path.replace('/', '')}`) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 关联栏目的查看全部跳转
|
|
|
|
// 关联栏目的查看全部跳转
|
|
|
|