登录增加切换身份置空商户号

This commit is contained in:
2024-10-16 14:15:48 +08:00
parent d0bb6bff46
commit 7030d60847
2 changed files with 14 additions and 7 deletions

View File

@@ -145,7 +145,8 @@
import {
ref,
reactive,
onMounted
onMounted,
watch
} from 'vue';
import {
$loginByPwd,
@@ -339,9 +340,15 @@
})
// #endif
}
watch(()=>accountType.sel,(newval)=>{
if(newval==1){
vdata.formData.merchantName=uni.getStorageSync('merchantName')||''
}else{
vdata.formData.username=''
}
})
// 封装登录成功后的操作
async function loginFinishFunc(loginBizData) {
// 保存 token
storageManage.setLogin(loginBizData)
storageManage.token(loginBizData.token)