| | |
| | | uni.clearStorage(); |
| | | }, |
| | | onLoad() { |
| | | this.connect() |
| | | // this.connect() |
| | | }, |
| | | methods: { |
| | | Login(){ |
| | |
| | | this.isLogining = false; |
| | | //登录成功后 |
| | | //设置别名 |
| | | jpushModule.setAlias({ |
| | | 'alias': this.phone, |
| | | 'sequence': 1 |
| | | }) |
| | | // jpushModule.setAlias({ |
| | | // 'alias': this.phone, |
| | | // 'sequence': 1 |
| | | // }) |
| | | uni.setStorageSync("tk", res.data.tk); |
| | | uni.setStorageSync("uid",res.data.uid); |
| | | uni.setStorageSync('user', res.data); |
| | |
| | | }else{ |
| | | this.$store.commit('setRoleId', 'user_leader'); |
| | | uni.switchTab({ |
| | | url: '/pages/tabBar/examine/examine' |
| | | url: '/pages/tabBar/firstPage/firstPage' |
| | | }); |
| | | } |
| | | } |