From 8328df0f84dc6e24896d788166a67263ff029ae5 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期日, 19 十月 2025 14:38:50 +0800
Subject: [PATCH] Merge branch 'dev-1.2.0.1' of http://120.26.58.240:8888/r/flexJobMiniApp into dev-1.2.0.1
---
apps/bMiniApp/src/stores/modules/user.ts | 45 +++++++++++++++++++++++++--------------------
1 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/apps/bMiniApp/src/stores/modules/user.ts b/apps/bMiniApp/src/stores/modules/user.ts
index e95ef68..58c2255 100644
--- a/apps/bMiniApp/src/stores/modules/user.ts
+++ b/apps/bMiniApp/src/stores/modules/user.ts
@@ -31,7 +31,7 @@
userInfo?: Nullable<API.LoginCommandCallback>;
token?: Nullable<string>;
refreshToken?: Nullable<string>;
- userDetail?: Nullable<API.UserInfoV2>;
+ userDetail?: Nullable<API.GetEnterpriseLoginInfoQueryResult>;
firstGetUserDetail?: boolean;
locationCity?: string;
@@ -85,6 +85,10 @@
return getAccountInfoFromAccessToken(this.userInfo?.accessToken);
},
+ userId: (state) => {
+ return state.userDetail?.id;
+ },
+
// matchMakingIdentity(state): MatchMakingIdentityEnum {
// },
@@ -136,7 +140,8 @@
let res = await authServices.passwordLogin(
{
userName: params.userName,
- password: md5Encrypt(params.password),
+ password: params.password,
+ // password: md5Encrypt(params.password),
type: AppLocalConfig.userType,
clientType: AppLocalConfig.clientType,
},
@@ -152,7 +157,7 @@
try {
this.setUserInfoAction(res);
this.setTokenAction(res);
- // await this.getCurrentUserInfo();
+ await this.getCurrentUserInfo();
} catch (error) {}
},
@@ -187,21 +192,21 @@
// } catch (error) {}
},
- // async getCurrentUserInfo() {
- // try {
- // let res = await userServices.getUserInfo({ showLoading: false });
- // if (res) {
- // res.frontStatus = getUserCertificationFrontStatusAdapter(
- // res.userCertificationStatus,
- // res.userCertificationAuditStatus
- // );
- // res.originalAvatarUrl = res.avatarUrl;
- // res.avatarUrl = res.avatarUrl ? setOSSLink(res.avatarUrl) : DefaultAvatar;
- // this.setUserDetail(res);
- // this.firstGetUserDetail = false;
- // }
- // } catch (error) {}
- // },
+ async getCurrentUserInfo() {
+ try {
+ let res = await authServices.getEnterpriseLoginInfo({}, { showLoading: false });
+ if (res) {
+ // res.frontStatus = getUserCertificationFrontStatusAdapter(
+ // res.userCertificationStatus,
+ // res.userCertificationAuditStatus
+ // );
+ res.originalAvatar = res.avatar;
+ res.avatar = res.avatar ? setOSSLink(res.avatar) : DefaultAvatar;
+ this.setUserDetail(res);
+ this.firstGetUserDetail = false;
+ }
+ } catch (error) {}
+ },
setTokenAction(tokenInfo: API.IdentityModelTokenCacheItem) {
this.token = tokenInfo?.accessToken;
@@ -213,7 +218,7 @@
setUserInfo(info);
},
- setUserDetail(detail: API.UserInfoV2) {
+ setUserDetail(detail: API.GetEnterpriseLoginInfoQueryResult) {
this.userDetail = detail;
setUserDetail(detail);
},
@@ -232,7 +237,7 @@
*/
logout() {
this.resetState();
- myClient.removeQueries();
+ // myClient.removeQueries();
goAuthorization();
},
--
Gitblit v1.9.1