From 1910e9f27373b8b4da75f076762025ceb3419965 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期四, 12 六月 2025 15:40:50 +0800 Subject: [PATCH] fix: 暂时隐藏电信充值通道 --- packages/core/src/lifeRechargeAccountModel.ts | 27 ++++++++++++++++++++------- 1 files changed, 20 insertions(+), 7 deletions(-) diff --git a/packages/core/src/lifeRechargeAccountModel.ts b/packages/core/src/lifeRechargeAccountModel.ts index 42a4afc..952fec3 100644 --- a/packages/core/src/lifeRechargeAccountModel.ts +++ b/packages/core/src/lifeRechargeAccountModel.ts @@ -8,6 +8,12 @@ userId = ''; phoneNumber = ''; channlesNum = ''; + promoterIdNumber = ''; + + /**鐢ㄦ埛鎵�鏈夌殑娓犻亾 */ + userChannles = [] as ChannelOutput[]; + isBackClientUser: boolean; + isGetUserInfo = false; constructor( ctx: BlLifeRecharge<TResponse, TRequestOptions>, @@ -23,25 +29,27 @@ setUserId(userId: string) { this.userId = userId; this.ctx.listener.fireEvent('update', this.ctx); - if (userId) { - this.getUserInfo(userId); - } + // if (userId) { + // this.getUserInfo(userId); + // } } - async getUserInfo(userId: string) { + async getUserInfo(userId?: string) { try { let res = await this.ctx.services.lifePayUserMesssageByIduser( { - id: userId, + id: userId || this.userId, }, { showLoading: false, } ); - this.ctx.isBackClientUser = res.isBackClientUser; if (res && res.isBackClientUser) { this.setUserChannles(res.channlesNum ?? []); } + this.isBackClientUser = res.isBackClientUser; + this.promoterIdNumber = res.promoterIdNumber; + this.isGetUserInfo = true; return res; } catch (error) { console.log('error: ', error); @@ -57,7 +65,12 @@ this.ctx.listener.fireEvent('update', this.ctx); } setUserChannles(userChannles: ChannelOutput[]) { - this.ctx.userChannles = userChannles; + this.userChannles = userChannles; + this.ctx.listener.fireEvent('update', this.ctx); + } + + setUserPromoterIdNumber(promoterIdNumber: string) { + this.promoterIdNumber = promoterIdNumber; this.ctx.listener.fireEvent('update', this.ctx); } } -- Gitblit v1.9.1