提交 b327478c authored 作者: lihuihui's avatar lihuihui

修改bug

上级 4a84a7ce
...@@ -122,10 +122,12 @@ export default { ...@@ -122,10 +122,12 @@ export default {
const params = { id: item.id } const params = { id: item.id }
getActivityDetail(params).then(res => { getActivityDetail(params).then(res => {
this.detailList = res.data this.detailList = res.data
this.handleSign(item) const isCanJump = this.detailList.activity.details.find(i => i.can_jump === 1)
this.handleSign(item, isCanJump)
console.log(this.detailList.activity.details, 'datalist')
}) })
}, },
handleSign(item) { handleSign(item, canJump) {
const time = new Date().getTime() const time = new Date().getTime()
const startTime = new Date(item.start_time.replace(/-/g, '/')).getTime() const startTime = new Date(item.start_time.replace(/-/g, '/')).getTime()
const endTime = new Date(item.end_time.replace(/-/g, '/')).getTime() const endTime = new Date(item.end_time.replace(/-/g, '/')).getTime()
...@@ -136,7 +138,7 @@ export default { ...@@ -136,7 +138,7 @@ export default {
title: '提示', title: '提示',
message: '还有报名流程未交费', message: '还有报名流程未交费',
confirmButtonText: '继续报名', confirmButtonText: '继续报名',
cancelButtonText: this.detailList.self_fill_in.need_fill_in_status === false ? '开始学习' : '', cancelButtonText: this.detailList.self_fill_in.need_fill_in_status === false ? canJump ? '开始学习' : '' : '',
closeOnClickOverlay: true closeOnClickOverlay: true
}) })
.then(() => { .then(() => {
...@@ -147,7 +149,12 @@ export default { ...@@ -147,7 +149,12 @@ export default {
} }
}) })
}) })
.catch(() => {}) .catch(() => {
if (canJump) {
window.location.href = canJump.jump_url
}
console.log(11)
})
// 没有需要填写的步骤 // 没有需要填写的步骤
} else if (!this.detailList.other_fill_in.need_fill_in_status) { } else if (!this.detailList.other_fill_in.need_fill_in_status) {
console.log('333') console.log('333')
...@@ -164,7 +171,7 @@ export default { ...@@ -164,7 +171,7 @@ export default {
title: '提示', title: '提示',
message: '', message: '',
confirmButtonText: '重新报名', confirmButtonText: '重新报名',
cancelButtonText: '开始学习', cancelButtonText: canJump ? '开始学习' : '',
closeOnClickOverlay: true closeOnClickOverlay: true
}) })
.then(() => { .then(() => {
...@@ -175,7 +182,11 @@ export default { ...@@ -175,7 +182,11 @@ export default {
} }
}) })
}) })
.catch(() => {}) .catch(() => {
if (canJump) {
window.location.href = canJump.jump_url
}
})
} }
} }
} else if (time >= endTime) { } else if (time >= endTime) {
......
...@@ -218,12 +218,10 @@ export default { ...@@ -218,12 +218,10 @@ export default {
} }
}, },
handleNext(data) { handleNext(data) {
console.log(this.setpItem, '===', this.stepList.length, this.stepIndex)
if (this.setpItem.num !== this.stepList[this.stepList.length - 1].num) { if (this.setpItem.num !== this.stepList[this.stepList.length - 1].num) {
this.stepIndex++ this.stepIndex++
if (data) { if (data) {
this.setpItem.payData = data this.setpItem.payData = data
// console.log(this.setpItem, '12311')
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论