Commit 0523c91f authored by Facius's avatar Facius

fix: 【ID1001408】 【小程序-首页】:未登录时,点击每日一练、全部试题、模拟考试时,未跳转到授权登录页面。

parent 9e748cbe
......@@ -351,6 +351,12 @@ export default {
},
// 每日一练
handleAnswer() {
if (!this.vuex_token) {
this.$u.route({
url: 'pages/login/index',
})
return
}
if (this.info.cardId) {
// 练习
this.$u.route({
......@@ -378,9 +384,6 @@ export default {
},
})
} else {
// 绑卡提示
// this.type = 'bound'
// this.show = true
this.$u.route({
url: 'pages/learn/detail',
params: {
......@@ -391,9 +394,6 @@ export default {
}
} else {
this.show = true
// this.$u.route({
// url: 'pages/learn/selectCategory',
// })
}
},
handleClickLeftTop() {
......@@ -444,6 +444,12 @@ export default {
})
},
handleClickExam(index) {
if (!this.vuex_token) {
this.$u.route({
url: 'pages/login/index',
})
return
}
if (this.info.cardId) {
// 已绑卡
if (index == 0) {
......@@ -462,10 +468,6 @@ export default {
}
} else if (this.info.id) {
// 已选题库
// 绑卡
// this.type = 'bound'
// this.show = true
this.$u.route({
url: 'pages/learn/detail',
params: {
......@@ -476,12 +478,15 @@ export default {
} else {
// 未选题库
this.show = true
// this.$u.route({
// url: 'pages/learn/selectCategory',
// })
}
},
handleClick(path, params) {
if (!this.vuex_token) {
this.$u.route({
url: 'pages/login/index',
})
return
}
if (this.info.cardId) {
if (params) {
this.setPageInfo(params)
......@@ -492,9 +497,6 @@ export default {
})
} else if (this.info.id) {
// 已选题库未绑卡
// 绑卡
// this.type = 'bound'
// this.show = true
this.$u.route({
url: 'pages/learn/detail',
params: {
......@@ -504,9 +506,6 @@ export default {
})
} else {
this.show = true
// this.$u.route({
// url: 'pages/learn/selectCategory',
// })
}
},
// getProvinceList() {
......@@ -527,15 +526,7 @@ export default {
}
},
chagefinishCount() {
this.finishCount = this.questionList[this.questionWarehouseId]
? this.questionList[this.questionWarehouseId].reduce(
(accumulator, currentValue) => {
if (currentValue.submitStatus) accumulator++
return accumulator
},
0
)
: 0
this.finishCount = this.answerCount[this.questionWarehouseId] || 0
},
handleSelectTip() {
this.$u.route({
......
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