Commit 287e3086 authored by 罗超's avatar 罗超

更改判定

parent f38ea3db
......@@ -87,6 +87,15 @@
},
changeErpUserHandler(x){
uni.setStorageSync("erpUserInfo",x)
let users=uni.getStorageSync('users')
uni.removeStorageSync('userInfo')
if(users && users.length>0){
users.forEach(item=>{
if(item.Account==x.ClassInAccount){
uni.setStorageSync('userInfo',item)
}
})
}
uni.reLaunch({
url:'/pages/index/index'
})
......
......@@ -218,7 +218,12 @@
}
if(flag || uni.getStorageSync("userInfo")){
uni.setStorageSync("ErpStus",r.Data)
methods.jumpPage()
let account=[]
r.Data.forEach(x=>{
account.push(x.ClassInAccount)
})
methods.setAccountsLogin(`'${account.join("','")}'`)
}else{
uni.showToast({
title: '账号错误,未匹配到学员信息',
......@@ -237,7 +242,17 @@
});
}
})
}
},
setAccountsLogin(Accounts){
getLoginAccounts({Accounts}).then(r=>{
let erpStus=uni.getStorageSync('ErpStus')
if(r.Data && r.Data.length>0){
uni.setStorageSync("users",r.Data)
}
methods.jumpPage()
})
},
};
onMounted(() => {});
let that = methods;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment