zhengyiming
2025-03-10 866879aaf4b209e4820d21d11f9569e72dd6e0a5
packages/core/src/lifeRecharge.ts
@@ -3,18 +3,18 @@
  PhoneMesssageCodeLoginInput,
  RequestConfig,
} from './lifeRechargeServices';
import { IRequest, BlLifeRechargeOptions } from './types';
import { BlLifeRechargeOptions } from './types';
import { LifeRechargeConstants } from './lifeRechargeConstants';
import { BlLifeRechargeAccountModel } from './lifeRechargeAccountModel';
export class BlLifeRecharge<T extends IRequest = IRequest> {
  services: BlLifeRechargeServices<T>;
export class BlLifeRecharge<TResponse = any, TRequestOptions = any> {
  services: BlLifeRechargeServices<TResponse, TRequestOptions>;
  accountModel: BlLifeRechargeAccountModel;
  static constants = LifeRechargeConstants;
  constants = LifeRechargeConstants;
  constructor(options: BlLifeRechargeOptions<T>) {
  constructor(options: BlLifeRechargeOptions<TResponse, TRequestOptions>) {
    this.services = new BlLifeRechargeServices(options);
    this.accountModel = new BlLifeRechargeAccountModel({
      userId: options.userId,
@@ -45,4 +45,10 @@
  getRechargeParValue(amount: number | string, rate: number) {
    return (Number(amount) * rate).toFixed(2);
  }
  MaxParValue = 300;
  filterParValueList(parValueList: string[]) {
    return parValueList.filter((x) => Number(x) <= this.MaxParValue);
  }
}