| | |
| | | import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'; |
| | | import { IRequest, BlLifeRechargeServicesOptions } from './types'; |
| | | |
| | | export interface PhoneMesssageCodeLoginInput { |
| | | /** 手机号 */ |
| | | phoneNumber: string; |
| | | /** 验证码 */ |
| | | code: string; |
| | | } |
| | | |
| | | export interface RequestConfig {} |
| | | |
| | | export class BlLifeRechargeServices<T extends IRequest> { |
| | | request: T; |
| | | private request: T; |
| | | constructor({ request }: BlLifeRechargeServicesOptions<T>) { |
| | | this.request = request; |
| | | } |
| | | |
| | | async lifePayPhoneMesssageCodeLogin(body: PhoneMesssageCodeLoginInput, options?: RequestConfig) { |
| | | return this.request<string>('/api/Account/LifePayPhoneMesssageCodeLogin', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | } |