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

修改跳转

上级 f7375967
......@@ -100,8 +100,10 @@ export default {
if (userRole !== 0) {
this.roleChange = userRole
}
if (window.localStorage.isExamEnd === 'true') {
this.abilityExam()
if (window.localStorage.isExamEnd === 'true' || window.localStorage.isExamEnd === true) {
if (this.$store.state.isVip) {
this.abilityExam()
}
}
},
methods: {
......@@ -130,29 +132,45 @@ export default {
})
},
setRole() {
this.$store.dispatch('checkIsVip').then(isVip => {
if (isVip) {
const param = {
type: 2
}
api.setRole({ role: this.roleChange }).then(res => {
if (res.code === 0) {
api.getExamStatus(param).then(res => {
if (parseInt(res.status) === 0 || parseInt(res.status === 3)) {
this.isExamPop = true
} else {
this.goAbilityExam(1)
}
})
}
})
return false
if (this.$store.state.isVip) {
const param = {
type: 2
}
this.$router.push({
path: '/payPage'
api.setRole({ role: this.roleChange }).then(res => {
if (res.code === 0) {
api.getExamStatus(param).then(res => {
if (parseInt(res.status) === 0 || parseInt(res.status === 3)) {
this.isExamPop = true
} else {
this.goAbilityExam(1)
}
})
}
})
return false
}
this.$router.push({
path: '/payPage'
})
// const param = {
// type: 2
// }
// api.setRole({ role: this.roleChange }).then(res => {
// if (res.code === 0) {
// api.getExamStatus(param).then(res => {
// if (res.status === '0' || res.status === 0 || res.status === '3' || res.status === 3) {
// this.isExamPop = true
// } else {
// this.goAbilityExam(1)
// }
// })
// }
// })
}
},
beforeMount() {
// 检测是否是付费用户
this.$store.dispatch('checkIsVip')
}
}
</script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论