From 0886e91fdfe3b5528f80d2b6742083aa11d16ebb Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期三, 02 四月 2025 15:54:15 +0800 Subject: [PATCH] fix: 四期bug --- packages/core/src/lifeRecharge.ts | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/core/src/lifeRecharge.ts b/packages/core/src/lifeRecharge.ts index 409801a..d523104 100644 --- a/packages/core/src/lifeRecharge.ts +++ b/packages/core/src/lifeRecharge.ts @@ -17,10 +17,6 @@ static constants = LifeRechargeConstants; constants = LifeRechargeConstants; - /**鐢ㄦ埛鎵�鏈夌殑娓犻亾 */ - userChannles = [] as ChannelOutput[]; - isBackClientUser: boolean; - constructor(options: BlLifeRechargeOptions<TResponse, TRequestOptions>) { this.listener = new LifeRechargeListener(); this.services = new BlLifeRechargeServices(this, options); @@ -31,10 +27,17 @@ }); } + init() { + if (this.accountModel.userId) { + this.accountModel.getUserInfo(); + } + } + async login(body: PhoneMesssageCodeLoginInput, options?: RequestConfig) { try { let res = await this.services.lifePayPhoneMesssageCodeLogin(body, options); this.accountModel.setUserId(res.userId); + this.accountModel.getUserInfo(); this.accountModel.setPhoneNumber(body.phoneNumber); return res; } catch (error) { @@ -46,6 +49,7 @@ this.accountModel.setUserId(''); this.accountModel.setPhoneNumber(''); this.accountModel.setUserChannles([]); + this.accountModel.isBackClientUser = false; } isLogin() { -- Gitblit v1.9.1