ソースを参照

网关登陆增加字段

main
郑州 3年前
コミット
391024b9c7
2個のファイルの変更15行の追加8行の削除
  1. +2
    -2
      src/services/system.ts
  2. +13
    -6
      src/services/user.ts

+ 2
- 2
src/services/system.ts ファイルの表示

@@ -45,10 +45,10 @@ const system = {
},
/* 发往网关的请求 */
// 登陆
login: async (userId: string, userPhone: string) => {
login: async (userId: string, userPhone: string, api: string) => {
const res = await fetchLocalApi<null>(
'login',
{ userId, userPhone },
{ userId, userPhone, api },
{ silent: true },
);
sendSocketMessage(`login:${userPhone}`);


+ 13
- 6
src/services/user.ts ファイルの表示

@@ -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;

// 角色判断


読み込み中…
キャンセル
保存