王浩宇 2 years ago
parent
commit
b8ed24ee4c
  1. 6
      pages/login/index.vue

6
pages/login/index.vue

@ -92,7 +92,9 @@
} }
this.$http.post("/blade-auth/oauth/token",param,headers).then((res)=>{ this.$http.post("/blade-auth/oauth/token",param,headers).then((res)=>{
// console.log(res)
this.saveLocal(res) this.saveLocal(res)
if(res.role_name == 'CUSTOMER_USER'){ if(res.role_name == 'CUSTOMER_USER'){
// //
uni.redirectTo({ uni.redirectTo({
@ -131,7 +133,9 @@
uni.setStorageSync("role_id",res.role_id) uni.setStorageSync("role_id",res.role_id)
uni.setStorageSync("role_name",res.role_name) uni.setStorageSync("role_name",res.role_name)
uni.setStorageSync("tenant_id",res.tenant_id) uni.setStorageSync("tenant_id",res.tenant_id)
uni.setStorageSync("regionId",res.detail.otherInfo.regionId) if(res.role_name == 'SUPERVISE_USER'){
uni.setStorageSync("regionId",res.detail.otherInfo.regionId)
}
} }
} }
} }

Loading…
Cancel
Save