yujialong 6 months ago
parent cf0989be5d
commit 06d3a2e6ee
  1. 35
      src/mixins/article/index.js
  2. 4
      src/pages/article/index.vue
  3. 1616
      src/pages/column/index.vue
  4. 4
      src/setting.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)
}
}
}
}

@ -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;

File diff suppressed because it is too large Load Diff

@ -3,7 +3,9 @@
* */
const isDev = process.env.NODE_ENV === 'development' // 开发环境
let host = `${location.origin}/`
if (isDev) {
host = 'http://192.168.31.51:10000/'
}
const Setting = {
/**
* 基础配置

Loading…
Cancel
Save