zhengyiming
2025-02-25 3703bdcb3e0eef4428fb6069649622dd3c60d2c8
packages/core/src/lifeRechargeServices.ts
@@ -6,8 +6,32 @@
export class BlLifeRechargeServices<T extends IRequest> {
  private request: T;
  constructor({ request }: BlLifeRechargeServicesOptions<T>) {
  request2: T;
  constructor({ request, axiosOptions }: BlLifeRechargeServicesOptions<T>) {
    this.request = request;
    const axiosInstance = axios.create(axiosOptions);
    // @ts-expect-error
    this.request2 = (url: string, opts: any = { method: 'GET' }) => {
      return new Promise((resolve, reject) => {
        axiosInstance
          .request({ ...opts, url })
          .then((res) => {
            //@ts-ignore
            resolve(res);
          })
          .catch((error) => {
            try {
              // const handler = config?.errorConfig?.errorHandler;
              // if (handler) {
              //   handler(error, opts, config);
              // }
            } catch (e) {
              reject(e);
            }
            reject(error);
          });
      });
    };
  }
  async lifePayPhoneMesssageCodeLogin(body: PhoneMesssageCodeLoginInput, options?: RequestConfig) {
@@ -281,4 +305,6 @@
  orderParamDetailJsonStr?: string;
  /** 下单时间 */
  creationTime?: string;
  /** 退款时间 */
  refundTime?: string;
}