|
|
|
@ -188,7 +188,15 @@
|
|
|
|
|
this.isCode = needCode
|
|
|
|
|
this.changeCode()
|
|
|
|
|
this.getLoginConfig()
|
|
|
|
|
this.formData.password = '';
|
|
|
|
|
const userName = uni.getStorageSync('userName');
|
|
|
|
|
const userPsw = uni.getStorageSync('userPsw');
|
|
|
|
|
if(userName && userPsw){
|
|
|
|
|
this.formData.account = userName;
|
|
|
|
|
this.formData.password = userPsw;
|
|
|
|
|
}else{
|
|
|
|
|
this.formData.account = '';
|
|
|
|
|
this.formData.password = '';
|
|
|
|
|
}
|
|
|
|
|
if (options.data) {
|
|
|
|
|
this.tenantUserInfo = JSON.parse(options.data)
|
|
|
|
|
if (this.tenantUserInfo) this.show = true
|
|
|
|
@ -444,6 +452,8 @@
|
|
|
|
|
let token = res.data.token
|
|
|
|
|
this.$store.commit('user/SET_TOKEN', token)
|
|
|
|
|
uni.setStorageSync('token', token)
|
|
|
|
|
uni.setStorageSync("userName",this.formData.account)
|
|
|
|
|
uni.setStorageSync("userPsw",this.formData.password)
|
|
|
|
|
this.$store.dispatch('user/getCurrentUser').then((res) => {
|
|
|
|
|
this.loading = false
|
|
|
|
|
uni.switchTab({
|
|
|
|
|