|  |  | 
 |  |  |   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); | 
 |  |  | 
 |  |  |     }); | 
 |  |  |   } | 
 |  |  |  | 
 |  |  |   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) { | 
 |  |  | 
 |  |  |     this.accountModel.setUserId(''); | 
 |  |  |     this.accountModel.setPhoneNumber(''); | 
 |  |  |     this.accountModel.setUserChannles([]); | 
 |  |  |     this.accountModel.isBackClientUser = false; | 
 |  |  |     this.accountModel.setUserPromoterIdNumber(''); | 
 |  |  |   } | 
 |  |  |  | 
 |  |  |   isLogin() { | 
 |  |  | 
 |  |  |   } | 
 |  |  |  | 
 |  |  |   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; |