| | |
| | | export class BlLifeRechargeServices<TResponse = any, TRequestOptions = any> { |
| | | private request: IRequest; |
| | | constructor({ axiosConfig }: BlLifeRechargeServicesOptions<TResponse, TRequestOptions>) { |
| | | this.request = Request.create(axiosConfig); |
| | | this.request = Request.create({ |
| | | ...axiosConfig, |
| | | // baseURL: process.env.NODE_ENV === 'development' ? '/' : 'https://api.81812333.com', |
| | | timeout: 10 * 1000, |
| | | headers: { |
| | | Accept: 'application/json, text/plain, */*', |
| | | 'Content-Type': 'application/json', |
| | | 'X-Requested-With': 'XMLHttpRequest', |
| | | }, |
| | | withCredentials: true, |
| | | }); |
| | | } |
| | | |
| | | async lifePayPhoneMesssageCodeLogin(body: PhoneMesssageCodeLoginInput, options?: RequestConfig) { |
| | |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取我的全部户号列表 POST /api/LifePay/GetUserAccountAllList */ |
| | | async getUserAccountAllList(body: QueryUserAccountAllListInput, options?: RequestConfig) { |
| | | return this.request<UserAccountListOutput[]>('/api/LifePay/GetUserAccountAllList', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 添加或修改我的户号 POST /api/LifePay/AddUpdateUserAccount */ |
| | | async addUpdateUserAccount(body: AddUpdateUserAccountInput, options?: RequestConfig) { |
| | | return this.request<number>('/api/LifePay/AddUpdateUserAccount', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 创建生活缴费燃气订单 POST /api/LifePay/CreateLifePayGasOrder */ |
| | | async createLifePayGasOrder(body: LifeGasDataCreateLifePayOrderInput, options?: RequestConfig) { |
| | | return this.request<CreateLifePayOrderOutput>('/api/LifePay/CreateLifePayGasOrder', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取燃气面值 GET /api/LifePay/GetGasParValue */ |
| | | async getGasParValue(options?: RequestConfig) { |
| | | return this.request<GasParValueResponse>('/api/LifePay/GetGasParValue', { |
| | | method: 'GET', |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | } |
| | | |
| | | export interface PhoneMesssageCodeLoginInput { |
| | | /** 手机号 */ |
| | | phoneNumber: string; |
| | | /** 验证码 */ |
| | | code: string; |
| | | // code: string; |
| | | } |
| | | |
| | | export interface LifePayRateListOutput { |
| | |
| | | lifePayType?: LifeRechargeConstants.LifePayTypeEnum; |
| | | openId?: string; |
| | | attach?: string; |
| | | payAppId?: string; |
| | | } |
| | | |
| | | export interface ModelPaymentMiniPay { |
| | |
| | | timeExpire?: string; |
| | | message?: string; |
| | | } |
| | | |
| | | export interface QueryUserAccountAllListInput { |
| | | /** 用户Id */ |
| | | userId?: string; |
| | | lifePayOrderType?: LifeRechargeConstants.LifePayOrderTypeEnum; |
| | | } |
| | | |
| | | export interface UserAccountListOutput { |
| | | id?: string; |
| | | lifePayType?: LifeRechargeConstants.LifePayOrderTypeEnum; |
| | | /** 运营商 */ |
| | | operators?: string; |
| | | /** 手机号/户号 */ |
| | | content?: string; |
| | | /** 省 */ |
| | | province?: string; |
| | | /** 市 */ |
| | | city?: string; |
| | | /** 拓展字段(电费类型) */ |
| | | extraProperties?: string; |
| | | /** 备注 */ |
| | | remark?: string; |
| | | /** 创建时间 */ |
| | | creationTime?: string; |
| | | isDeleted?: boolean; |
| | | } |
| | | |
| | | export interface AddUpdateUserAccountInput { |
| | | id?: string; |
| | | /** 用户编号 */ |
| | | userId?: string; |
| | | lifePayType?: LifeRechargeConstants.LifePayOrderTypeEnum; |
| | | /** 运营商 */ |
| | | operators?: string; |
| | | /** 手机号/户号 */ |
| | | content?: string; |
| | | /** 省 */ |
| | | province?: string; |
| | | /** 市 */ |
| | | city?: string; |
| | | /** 拓展字段(电费类型) */ |
| | | extraProperties?: string; |
| | | /** 备注 */ |
| | | remark?: string; |
| | | } |
| | | |
| | | export interface LifeGasDataCreateLifePayOrderInput { |
| | | userId?: string; |
| | | productData?: LifeGasData; |
| | | } |
| | | |
| | | export interface LifeGasData { |
| | | /** 充值面额,单位为元。 */ |
| | | parValue: number; |
| | | /** 天然气公司类型,"zhong_ran"代表中燃燃气,"bei_jing"代表北京燃气。 */ |
| | | gasOrgType: string; |
| | | /** 燃气户号 */ |
| | | gasAccount: string; |
| | | /** 省份 */ |
| | | province: string; |
| | | /** 城市 */ |
| | | city?: string; |
| | | } |
| | | |
| | | export interface GasParValueResponse { |
| | | success?: boolean; |
| | | requestNo?: string; |
| | | partnerId?: string; |
| | | service?: string; |
| | | version?: string; |
| | | protocol?: string; |
| | | context?: string; |
| | | ext?: any; |
| | | code?: string; |
| | | message?: string; |
| | | detail?: string; |
| | | gasParValue?: GasParValueOutput; |
| | | } |
| | | |
| | | export interface GasParValueOutput { |
| | | gasOrgName?: string; |
| | | gasOrgCode?: string; |
| | | parValue?: string[]; |
| | | rate?: number; |
| | | comments?: string; |
| | | } |