参数存本地
This commit is contained in:
@@ -167,8 +167,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
clickLaw(index) {
|
clickLaw(index) {
|
||||||
uni.relaunch({
|
uni.switchTab({
|
||||||
url: '/pages/AppLegalLearning/AppLegalLearning?inx=' + index
|
url: '/pages/AppLegalLearning/AppLegalLearning',
|
||||||
|
success: ()=> {
|
||||||
|
uni.setStorageSync('inx', index)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleActive({type, appId, url}) {
|
handleActive({type, appId, url}) {
|
||||||
|
|||||||
@@ -35,6 +35,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
if(uni.getStorageSync('inx')) {
|
||||||
|
this.currIndex = uni.getStorageSync('inx')
|
||||||
|
}
|
||||||
if(this.currIndex == 0) {
|
if(this.currIndex == 0) {
|
||||||
this.$refs.OnlineClass.getList();
|
this.$refs.OnlineClass.getList();
|
||||||
} else {
|
} else {
|
||||||
@@ -47,11 +50,8 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onLoad(o) {
|
onUnload() {
|
||||||
if(o) {
|
uni.removeStorageSync('inx')
|
||||||
console.log(o);
|
|
||||||
this.currIndex = o.inx
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
OnlineClass,
|
OnlineClass,
|
||||||
|
|||||||
Reference in New Issue
Block a user