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 Setting from '@/setting'
import Util from '@/libs/util' import Util from '@/libs/util'
export default { export default {
data() { data () {
return { return {
id: +this.$route.query.id id: +this.$route.query.id
} }
}, },
computed: { computed: {
site() { site () {
return this.$route.query.siteId || this.$store.state.content.site return this.$route.query.siteId || this.$store.state.content.site
} }
}, },
mounted() { mounted () {
}, },
methods: { methods: {
// 点击栏目回调 // 点击栏目回调
columnTo(to) { columnTo (to) {
const { typeId,menuVisible } = to const { typeId, menuVisible } = to
// 跳转链接 // 跳转链接
if (typeId === 2) { 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 let href = to.linkAddress
const cType = to.connectionType const cType = to.connectionType
if (cType !== 2) { // 非站外链接 if (cType !== 2) { // 非站外链接
@ -41,9 +41,9 @@ export default {
if (to.isOpen) { if (to.isOpen) {
var userAgent = navigator.userAgent; var userAgent = navigator.userAgent;
var isSafari = /Safari/.test(userAgent) && !/Chrome/.test(userAgent); var isSafari = /Safari/.test(userAgent) && !/Chrome/.test(userAgent);
if(isSafari) { if (isSafari) {
window.location.href = href window.location.href = href
}else { } else {
window.open(href) window.open(href)
} }
} else { } else {
@ -51,12 +51,12 @@ export default {
} }
} else if (typeId !== 4 || (typeId === 4 && !to.children.length)) { } else if (typeId !== 4 || (typeId === 4 && !to.children.length)) {
// 常规栏目跳转到column页,长页栏目直接获取path // 常规栏目跳转到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) { toArtice (item) {
if (item.listStyleId === 74) return false if (item.listStyleId === 74) return false
if (item.articleTemplate === 24) { // 链接 if (item.articleTemplate === 24) { // 链接
let href = item.linkAddress let href = item.linkAddress
const cType = item.connectionType const cType = item.connectionType
@ -78,16 +78,21 @@ export default {
if (item.isOpen) { if (item.isOpen) {
var userAgent = navigator.userAgent; var userAgent = navigator.userAgent;
var isSafari = /Safari/.test(userAgent) && !/Chrome/.test(userAgent); var isSafari = /Safari/.test(userAgent) && !/Chrome/.test(userAgent);
if(isSafari) { if (isSafari) {
window.location.href = href window.location.href = href
}else { } else {
window.open(href) window.open(href)
} }
} else { } else {
location.href = href location.href = href
} }
} else { } 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; object-fit: cover;
} }
ul { ul {
// padding-left: 40px; padding-left: 40px;
list-style: disc; list-style: disc;
li { li {
list-style: inherit; list-style: inherit;
} }
} }
ol { ol {
// padding-left: 40px; padding-left: 40px;
list-style: decimal; list-style: decimal;
li { li {
list-style: inherit; list-style: inherit;

File diff suppressed because it is too large Load Diff

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

Loading…
Cancel
Save