Commit 0523c91f authored by Facius's avatar Facius

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

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