This commit is contained in:
shijingjing
2023-03-15 17:28:36 +08:00
parent 43cee8bd0f
commit c1ca841f28
2 changed files with 4 additions and 9 deletions

View File

@@ -170,7 +170,7 @@ export default {
uni.switchTab({
url: '/pages/AppLegalLearning/AppLegalLearning',
success: ()=> {
uni.setStorageSync('inx', index)
uni.$emit('update',{inx: index})
}
})
},

View File

@@ -35,11 +35,9 @@ export default {
}
},
onShow() {
console.log(uni.getStorageSync('inx'),'index');
if(uni.getStorageSync('inx')) {
console.log(uni.getStorageSync('inx'), 'inx');
this.currIndex = uni.getStorageSync('inx')
}
uni.$once('update',(data)=> {
this.currIndex = data.inx
})
if(this.currIndex == 0) {
this.$refs.OnlineClass.getList();
} else {
@@ -52,9 +50,6 @@ export default {
}
});
},
onHide() {
uni.removeStorageSync('inx')
},
components: {
OnlineClass,
GeneralLawExam