|
|
@ -67,6 +67,8 @@ export default { |
|
|
|
showEXP: false, |
|
|
|
name: '', |
|
|
|
url: '', |
|
|
|
showStatus: 0, |
|
|
|
detailId: '', |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
@ -81,10 +83,17 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
async onLoad(options) { |
|
|
|
console.log('this.$route.query: ', this.$route); |
|
|
|
const data = await this.$u.api.getQueryButton({}); |
|
|
|
this.name = data.name; |
|
|
|
this.url = data.url; |
|
|
|
const isShowData = await this.$u.api.queryIsShow({}); |
|
|
|
if (isShowData && isShowData.showStatus === 1) { |
|
|
|
this.name = '问卷'; |
|
|
|
this.url = 'https://www.tall.wiki/carbasics/survey'; |
|
|
|
} else { |
|
|
|
if (data) { |
|
|
|
this.name = data.name; |
|
|
|
this.url = data.url; |
|
|
|
} |
|
|
|
} |
|
|
|
if (options.share && options.share === '1') { |
|
|
|
this.shareInit(options); |
|
|
|
} else { |
|
|
@ -198,12 +207,14 @@ export default { |
|
|
|
function preloadFn(that) { |
|
|
|
const detailId = that.tasks.findIndex(task => task.detailId); |
|
|
|
const arr = []; |
|
|
|
that.tasks.forEach(task => { |
|
|
|
if (task.detailId) { |
|
|
|
arr.push(task); |
|
|
|
} |
|
|
|
}); |
|
|
|
that.$nextTick(() => that.$refs.timeLine.setScrollPosition()); |
|
|
|
setTimeout(() => { |
|
|
|
that.tasks.forEach(task => { |
|
|
|
if (task.detailId) { |
|
|
|
arr.push(task); |
|
|
|
} |
|
|
|
}); |
|
|
|
that.$nextTick(() => that.$refs.timeLine.setScrollPosition()); |
|
|
|
}, 100); |
|
|
|
if (detailId !== -1) { |
|
|
|
// 只要有1个真实的任务 就预加载上下周期的任务 |
|
|
|
const { pageCount } = that.$t.task; |
|
|
|