diff --git a/src/mixins/article/index.js b/src/mixins/article/index.js index 86415b1..d250889 100644 --- a/src/mixins/article/index.js +++ b/src/mixins/article/index.js @@ -1,26 +1,26 @@ import Setting from '@/setting' import Util from '@/libs/util' export default { - data() { + data () { return { id: +this.$route.query.id } }, computed: { - site() { + site () { return this.$route.query.siteId || this.$store.state.content.site } }, - mounted() { - + mounted () { + }, methods: { // 点击栏目回调 - columnTo(to) { - const { typeId,menuVisible } = to + columnTo (to) { + const { typeId, menuVisible } = to // 跳转链接 if (typeId === 2) { - if ( menuVisible === 1 && to.children.find(i=>i.menuVisible ===1)) return + if (menuVisible === 1 && to.children.find(i => i.menuVisible === 1)) return let href = to.linkAddress const cType = to.connectionType if (cType !== 2) { // 非站外链接 @@ -41,9 +41,9 @@ export default { if (to.isOpen) { var userAgent = navigator.userAgent; var isSafari = /Safari/.test(userAgent) && !/Chrome/.test(userAgent); - if(isSafari) { + if (isSafari) { window.location.href = href - }else { + } else { window.open(href) } } else { @@ -51,12 +51,12 @@ 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.site}`).catch(err => {}) + this.$router.push(`/${typeId === 3 ? to.path : 'column'}?id=${to.id}&siteId=${this.site}`).catch(err => { }) } }, // 跳转文章页面 - toArtice(item) { - if (item.listStyleId === 74) return false + toArtice (item) { + if (item.listStyleId === 74) return false if (item.articleTemplate === 24) { // 链接 let href = item.linkAddress const cType = item.connectionType @@ -78,16 +78,21 @@ export default { if (item.isOpen) { var userAgent = navigator.userAgent; var isSafari = /Safari/.test(userAgent) && !/Chrome/.test(userAgent); - if(isSafari) { + if (isSafari) { window.location.href = href - }else { + } else { window.open(href) } } else { location.href = href } } else { - this.$router.push(`/article?articleId=${item.id}&siteId=${this.site}&id=${item.columnId}`) + const path = `/article?articleId=${item.id}&siteId=${this.site}&id=${item.columnId}` + if (this.site == 2) { + window.open(this.$router.resolve(path).href) + } else { + this.$router.push(path) + } } } } diff --git a/src/pages/article/index.vue b/src/pages/article/index.vue index 06e4100..1d52c64 100644 --- a/src/pages/article/index.vue +++ b/src/pages/article/index.vue @@ -241,14 +241,14 @@ export default { object-fit: cover; } ul { - // padding-left: 40px; + padding-left: 40px; list-style: disc; li { list-style: inherit; } } ol { - // padding-left: 40px; + padding-left: 40px; list-style: decimal; li { list-style: inherit; diff --git a/src/pages/column/index.vue b/src/pages/column/index.vue index 0274f1e..513a708 100644 --- a/src/pages/column/index.vue +++ b/src/pages/column/index.vue @@ -1,11 +1,7 @@ -
- +
+

{{ $t('column.comming') }}

-
+