|
|
@@ -34,16 +34,23 @@ export async function login(account: string, password: string) { |
|
|
|
return errorReponse('该账号没有访问权限'); |
|
|
|
} |
|
|
|
|
|
|
|
const systemLoginRes = await system.login(res.data.id, res.data.phone); |
|
|
|
const companyInfoRes = await fetchApi( |
|
|
|
'company/queryFrontDeskCompanyById', |
|
|
|
{ id: userData.companyId }, |
|
|
|
{ silent: true }, |
|
|
|
); |
|
|
|
if (!isReqSuccess(companyInfoRes)) { |
|
|
|
return companyInfoRes; |
|
|
|
} |
|
|
|
const systemLoginRes = await system.login( |
|
|
|
res.data.id, |
|
|
|
res.data.phone, |
|
|
|
companyInfoRes.data?.company?.IpfsApi || '', |
|
|
|
); |
|
|
|
if (!isReqSuccess(systemLoginRes)) { |
|
|
|
return errorReponse('本地网管通讯失败'); |
|
|
|
} |
|
|
|
|
|
|
|
// const companyInfoRes = await fetchApi('company/queryFrontDeskCompanyById', { id: userData.companyId }, { silent: true }); |
|
|
|
// if (!isReqSuccess(companyInfoRes)) { |
|
|
|
// return companyInfoRes; |
|
|
|
// } |
|
|
|
|
|
|
|
// const { data: { company: { SoftwareVersion } = {} } = {} } = companyInfoRes; |
|
|
|
|
|
|
|
// 角色判断 |
|
|
|