From e372854c71bc97d162452cc4b3f5cfa586da50a8 Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期四, 22 五月 2025 17:06:31 +0800 Subject: [PATCH] feat: UI --- packages/core/src/lifeRechargeAccountModel.ts | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/core/src/lifeRechargeAccountModel.ts b/packages/core/src/lifeRechargeAccountModel.ts index 42a4afc..45a7dfd 100644 --- a/packages/core/src/lifeRechargeAccountModel.ts +++ b/packages/core/src/lifeRechargeAccountModel.ts @@ -9,6 +9,10 @@ phoneNumber = ''; channlesNum = ''; + /**鐢ㄦ埛鎵�鏈夌殑娓犻亾 */ + userChannles = [] as ChannelOutput[]; + isBackClientUser: boolean; + constructor( ctx: BlLifeRecharge<TResponse, TRequestOptions>, options: BlLifeRechargeAccountModelOptions = {} @@ -23,22 +27,22 @@ 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; + this.isBackClientUser = res.isBackClientUser; if (res && res.isBackClientUser) { this.setUserChannles(res.channlesNum ?? []); } @@ -57,7 +61,7 @@ this.ctx.listener.fireEvent('update', this.ctx); } setUserChannles(userChannles: ChannelOutput[]) { - this.ctx.userChannles = userChannles; + this.userChannles = userChannles; this.ctx.listener.fireEvent('update', this.ctx); } } -- Gitblit v1.9.1