参数存本地

This commit is contained in:
shijingjing
2023-03-15 16:51:26 +08:00
parent 17543b1fca
commit 43b7aa757b
2 changed files with 10 additions and 7 deletions

View File

@@ -35,6 +35,9 @@ export default {
}
},
onShow() {
if(uni.getStorageSync('inx')) {
this.currIndex = uni.getStorageSync('inx')
}
if(this.currIndex == 0) {
this.$refs.OnlineClass.getList();
} else {
@@ -47,11 +50,8 @@ export default {
}
});
},
onLoad(o) {
if(o) {
console.log(o);
this.currIndex = o.inx
}
onUnload() {
uni.removeStorageSync('inx')
},
components: {
OnlineClass,