| | |
| | | Login(){ |
| | | this.isLogining = true; |
| | | login(this.form).then(res => { |
| | | console.log("res",res) |
| | | if (res.code === 100) { |
| | | this.isLogining = false; |
| | | //登录成功后 |
| | |
| | | uni.setStorageSync("tk", res.data.tk); |
| | | uni.setStorageSync("uid",res.data.uid); |
| | | uni.setStorageSync('user', res.data); |
| | | uni.setStorageSync('unittype',res.data.unittype); |
| | | uni.setStorageSync('roleName', res.data.role.roleName); |
| | | console.log("登录--------",res.data.tk) |
| | | if(res.data.role.roleName == '工作人员'){ |
| | | this.$store.commit('setRoleId', 'user_other'); |
| | | uni.switchTab({ |
| | |
| | | }, |
| | | connect() { |
| | | uni.$on('connectStatusChange', (connectStatus) => { |
| | | console.log('进入连接') |
| | | var connectStr = '' |
| | | if (connectStatus == true) { |
| | | connectStr = '已连接' |