Commit 96d020d6 authored by Facius's avatar Facius

fix: 【ID1001402】 【小程序-首页-体验弹窗】:来回切换题库,每次都弹出体验弹窗

parent 7d28687d
......@@ -124,6 +124,7 @@ export default {
canExperience: false, // 体验资格
finishCount: 0,
pass: this.$u.random(95, 99),
isAdd: false, // 题库切换
}
},
computed: {
......@@ -261,7 +262,7 @@ export default {
if (info) {
this.selected = info
page.info = null
this.visible = info.state
this.isAdd = this.selected.isAdd
this.pass = this.$u.random(95, 99)
this.queryMyQuestionWarehouseDetail(this.selected.id)
} else {
......@@ -281,6 +282,8 @@ export default {
.checkGetQuestion(id)
.then((res) => {
this.canExperience = res <= 0
this.visible = this.isAdd && this.canExperience
this.isAdd = false
})
.catch((err) => {
console.log(err)
......
......@@ -267,6 +267,7 @@ export default {
})
if (result) {
data.isAdd = true
this.setPageInfo(data)
// 成功
this.$refs.uToast.show({
......@@ -333,7 +334,6 @@ export default {
var pages = getCurrentPages()
if (pages.length >= 1) {
var page = pages[0]
console.log('--------setPageInfo--------', info)
page.info = info
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment