From 6887129e91d32557c2b57178180329f46df09d12 Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期一, 10 三月 2025 13:23:49 +0800 Subject: [PATCH] feat: api --- apps/bMiniApp/src/stores/modules/user.ts | 54 +++++++++++++++++++++++++++--------------------------- 1 files changed, 27 insertions(+), 27 deletions(-) diff --git a/apps/bMiniApp/src/stores/modules/user.ts b/apps/bMiniApp/src/stores/modules/user.ts index 7e52ace..a2cf9cf 100644 --- a/apps/bMiniApp/src/stores/modules/user.ts +++ b/apps/bMiniApp/src/stores/modules/user.ts @@ -13,7 +13,7 @@ setMatchMakingIdentity, } from '@/utils/storage/auth'; import * as accountServices from '@12333/services/api/Account'; -import * as userServices from '@12333/services/api/User'; +// import * as userServices from '@12333/services/api/User'; import Taro, { useRouter } from '@tarojs/taro'; import { ButtonProps } from '@tarojs/components'; import { debounce } from 'lodash'; @@ -115,7 +115,7 @@ sessionKey: wxMiniAppUserLoginRes.sessionKey, encryptedData: detail.encryptedData, iv: detail.iv, - wxMiniApp: WxMiniAppEnum.浜哄崟鍚堜竴, + wxMiniApp: WxMiniAppEnum.C绔皬绋嬪簭, }; res = await accountServices.wxMiniAppPhoneAuthLogin(params); this.loginSuccess(res); @@ -161,7 +161,7 @@ try { this.setUserInfoAction(res); this.setTokenAction(res); - await this.getCurrentUserInfo(); + // await this.getCurrentUserInfo(); } catch (error) {} }, @@ -189,28 +189,28 @@ sessionKey: wxIndentityRes.sessionKey, encryptedData: detail.encryptedData, iv: detail.iv, - wxMiniApp: WxMiniAppEnum.浜哄崟鍚堜竴, + wxMiniApp: WxMiniAppEnum.C绔皬绋嬪簭, }); this.loginSuccess(res); return res; } 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 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.IdentityModelTokenCacheItem) { this.token = tokenInfo?.accessToken; @@ -293,14 +293,14 @@ this.locationProvince = provinceName; this.firstSetLocation = false; setStorageLocationCity({ city: cityName, province: provinceName }); - if (LocationUtils.isProvinceChange(provinceName)) { - this.resetState(); - myClient.removeQueries(); - globalEventEmitter.trigger('logout/refresh'); - // myClient.invalidateQueries({ - // queryKey: ['logout/refresh'], - // }); - } + // if (LocationUtils.isProvinceChange(provinceName)) { + // this.resetState(); + // myClient.removeQueries(); + // globalEventEmitter.trigger('logout/refresh'); + // // myClient.invalidateQueries({ + // // queryKey: ['logout/refresh'], + // // }); + // } LocationUtils.currentProvinceName = provinceName; }, }, -- Gitblit v1.9.1