| | |
| | | accountInfo(): Partial<AccountInfo> { |
| | | return getAccountInfoFromAccessToken(this.userInfo?.accessToken); |
| | | }, |
| | | |
| | | userId: (state) => { |
| | | return state.userInfo?.id ?? ''; |
| | | }, |
| | | }, |
| | | actions: { |
| | | // 手机号授权Code登录 |
| | |
| | | }, |
| | | |
| | | 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) {} |
| | | // 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) {} |
| | | }, |
| | | |
| | | setTokenAction(tokenInfo: API.LoginCommandCallback) { |