参数存本地
This commit is contained in:
		@@ -167,8 +167,11 @@ export default {
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    clickLaw(index) {
 | 
			
		||||
      uni.relaunch({
 | 
			
		||||
        url: '/pages/AppLegalLearning/AppLegalLearning?inx=' + index
 | 
			
		||||
      uni.switchTab({
 | 
			
		||||
        url: '/pages/AppLegalLearning/AppLegalLearning',
 | 
			
		||||
        success: ()=> {
 | 
			
		||||
          uni.setStorageSync('inx', index)
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    handleActive({type, appId, url}) {
 | 
			
		||||
 
 | 
			
		||||
@@ -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,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user