| | |
| | | sessionKey: wxMiniAppUserLoginRes.sessionKey, |
| | | encryptedData: detail.encryptedData, |
| | | iv: detail.iv, |
| | | wxMiniApp: WxMiniAppEnum.C端小程序, |
| | | // wxMiniApp: WxMiniAppEnum.C端小程序, |
| | | }; |
| | | res = await accountServices.wxMiniAppPhoneAuthLogin(params); |
| | | this.loginSuccess(res); |
| | |
| | | |
| | | // 用户手机验证码登入 |
| | | async loginByUsername(data: API.PhoneMesssageCodeLoginInput) { |
| | | let res = await accountServices.phoneMesssageCodeLogin( |
| | | let res = await accountServices.lifePayPhoneMesssageCodeLogin( |
| | | { |
| | | phoneNumber: data.phoneNumber, |
| | | code: data.code, |
| | |
| | | return res; |
| | | }, |
| | | |
| | | async loginSuccess(res: API.IdentityModelTokenCacheItem) { |
| | | try { |
| | | this.setUserInfoAction(res); |
| | | this.setTokenAction(res); |
| | | await this.getCurrentUserInfo(); |
| | | } catch (error) {} |
| | | async loginSuccess(res: API.IdentityModelTokenCacheItem | string) { |
| | | console.log('res: ', res); |
| | | // try { |
| | | // this.setUserInfoAction(res); |
| | | // this.setTokenAction(res); |
| | | // await this.getCurrentUserInfo(); |
| | | // } catch (error) {} |
| | | }, |
| | | |
| | | async wxMiniAppUserLoginFromScan(wxIndentityRes: API.WxMiniAppIndentityInfo, uuid: string) { |
| | |
| | | sessionKey: wxIndentityRes.sessionKey, |
| | | encryptedData: detail.encryptedData, |
| | | iv: detail.iv, |
| | | wxMiniApp: WxMiniAppEnum.C端小程序, |
| | | // wxMiniApp: WxMiniAppEnum.C端小程序, |
| | | }); |
| | | this.loginSuccess(res); |
| | | return res; |