提交
This commit is contained in:
@@ -44,11 +44,18 @@
|
||||
if (op.needVip) {
|
||||
this.needVip = op.needVip
|
||||
}
|
||||
if(op.subject){
|
||||
this.subject=op.subject
|
||||
}
|
||||
if (op && op.navTitle) {
|
||||
this.navTitle = op.navTitle
|
||||
const param = {}
|
||||
if (this.navTitle === '顺序答题' || this.navTitle === '精简500题') {
|
||||
this.questionArr = [...this.orderQuestion]
|
||||
if(this.subject=='1'){
|
||||
this.questionArr = [...this.orderQuestion_subject1]
|
||||
}else if(this.subject=='4'){
|
||||
this.questionArr = [...this.orderQuestion_subject4]
|
||||
}
|
||||
if (this.needVip === 'true') {
|
||||
if (this.token) {
|
||||
await this.searchUserVip()
|
||||
@@ -65,12 +72,6 @@
|
||||
}
|
||||
this.$refs.question.getQuestionList(JSON.stringify(this.questionArr))
|
||||
} else {
|
||||
if (!storage.get('token')) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.navTitle === '错题本') {
|
||||
param.questionIdList = storage.get(`wrongList_subject${this.subject}`) || []
|
||||
} else if (this.navTitle === '收藏夹') {
|
||||
@@ -85,6 +86,12 @@
|
||||
if (op.examKey) {
|
||||
param.examKey = op.examKey
|
||||
}
|
||||
if(op.isError&&op.isError=='1'){
|
||||
param.isError=Number(op.isError)
|
||||
}
|
||||
if(op.isNew&&op.isNew=='1'){
|
||||
param.isNew=Number(op.isNew)
|
||||
}
|
||||
queryQuestion(param).then(res => {
|
||||
if (res.code == '0000') {
|
||||
this.questionArr = res.data
|
||||
@@ -93,12 +100,9 @@
|
||||
})
|
||||
}
|
||||
}
|
||||
if (op.subject) {
|
||||
this.subject = op.subject
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(useQuestionStore, ["orderQuestion"]), //映射函数,取出tagslist
|
||||
...mapState(useQuestionStore, ["orderQuestion_subject1","orderQuestion_subject4"]), //映射函数,取出tagslist
|
||||
...mapState(useUserStore, ["vipOnList", "token"])
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user