From c24cdd854e258712408a7904bdb401c49e3f07c1 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期四, 28 八月 2025 13:09:08 +0800
Subject: [PATCH] fix: 修改通道充值提示语
---
packages/core/src/lifeRecharge.ts | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/packages/core/src/lifeRecharge.ts b/packages/core/src/lifeRecharge.ts
index 409801a..7bd3191 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,8 @@
this.accountModel.setUserId('');
this.accountModel.setPhoneNumber('');
this.accountModel.setUserChannles([]);
+ this.accountModel.isBackClientUser = false;
+ this.accountModel.setUserPromoterIdNumber('');
}
isLogin() {
@@ -53,7 +58,10 @@
}
getRechargeParValue(amount: number | string, rate: number) {
- return ((Number(amount) * rate) / 100).toFixed(2);
+ if (rate > 0) {
+ return ((Number(amount) * rate) / 100).toFixed(2);
+ }
+ return Number(amount).toFixed(2);
}
MaxParValue = 300;
--
Gitblit v1.9.1