|
@ -27,6 +27,8 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { mapState } from 'vuex' |
|
|
import { mapState } from 'vuex' |
|
|
|
|
|
import shareLog from '@/utils/shareLog' |
|
|
|
|
|
|
|
|
import popupUnlock from '../components/popupUnlock.vue' |
|
|
import popupUnlock from '../components/popupUnlock.vue' |
|
|
import popupQrCode from '../components/popupQrCode.vue' |
|
|
import popupQrCode from '../components/popupQrCode.vue' |
|
|
|
|
|
|
|
@ -54,8 +56,12 @@ |
|
|
...mapState(['userInfo']), |
|
|
...mapState(['userInfo']), |
|
|
}, |
|
|
}, |
|
|
onShow() { |
|
|
onShow() { |
|
|
if (this.id && uni.getStorageSync('token')) { |
|
|
|
|
|
this.detail.id ? this.refreshLockStatus() : this.initData() |
|
|
|
|
|
|
|
|
// if (this.id && uni.getStorageSync('token')) { |
|
|
|
|
|
// this.detail.id ? this.refreshLockStatus() : this.initData() |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
if (this.detail.id) { // 转发后返回页面的场景 |
|
|
|
|
|
this.refreshLockStatus() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
async onLoad(option) { |
|
|
async onLoad(option) { |
|
@ -75,14 +81,15 @@ |
|
|
|
|
|
|
|
|
this.id = id |
|
|
this.id = id |
|
|
|
|
|
|
|
|
if (uni.getStorageSync('token')) { |
|
|
|
|
|
this.initData() |
|
|
|
|
|
} else { |
|
|
|
|
|
uni.navigateTo({ |
|
|
|
|
|
url: '/pages_order/auth/wxLogin' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// if (uni.getStorageSync('token')) { |
|
|
|
|
|
// this.initData() |
|
|
|
|
|
// } else { |
|
|
|
|
|
// uni.navigateTo({ |
|
|
|
|
|
// url: '/pages_order/auth/wxLogin' |
|
|
|
|
|
// }) |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
this.initData() |
|
|
}, |
|
|
}, |
|
|
onShareAppMessage(res) { |
|
|
onShareAppMessage(res) { |
|
|
const { |
|
|
const { |
|
@ -103,6 +110,8 @@ |
|
|
} |
|
|
} |
|
|
this.$fetch('addLogShareInfo', params) |
|
|
this.$fetch('addLogShareInfo', params) |
|
|
|
|
|
|
|
|
|
|
|
shareLog.insert(this.id) |
|
|
|
|
|
|
|
|
return o |
|
|
return o |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
@ -135,7 +144,7 @@ |
|
|
}, |
|
|
}, |
|
|
async fetchCheckShare() { |
|
|
async fetchCheckShare() { |
|
|
try { |
|
|
try { |
|
|
return await this.$fetch('checkArticleShare', { id: this.id }) |
|
|
|
|
|
|
|
|
return shareLog.check(this.id, this.detail.num) |
|
|
} catch (err) { |
|
|
} catch (err) { |
|
|
return {} |
|
|
return {} |
|
|
} |
|
|
} |
|
|