From 55c03f35a31979aefd46aead13a145c9b293e6d8 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期四, 27 三月 2025 17:38:55 +0800
Subject: [PATCH] fix: 四期需求

---
 packages/core/src/lifeRechargeServices.ts |  142 +++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 123 insertions(+), 19 deletions(-)

diff --git a/packages/core/src/lifeRechargeServices.ts b/packages/core/src/lifeRechargeServices.ts
index ef65c43..ca95c57 100644
--- a/packages/core/src/lifeRechargeServices.ts
+++ b/packages/core/src/lifeRechargeServices.ts
@@ -18,12 +18,17 @@
       ...axiosConfig,
       // baseURL: process.env.NODE_ENV === 'development' ? '/' : 'https://api.81812333.com',
       requestInterceptors: [
-        // [
-        //   (config) => {
-        //     console.log('config2: ', config);
-        //     return config;
-        //   },
-        // ],
+        [
+          (config) => {
+            if (config.params) {
+              config.params.checkChannelId = this.ctx.accountModel.channlesNum;
+            }
+            if (config.data) {
+              config.data.checkChannelId = this.ctx.accountModel.channlesNum;
+            }
+            return config;
+          },
+        ],
         ...axiosConfig.requestInterceptors,
       ],
       timeout: 10 * 1000,
@@ -37,14 +42,17 @@
   }
 
   async lifePayPhoneMesssageCodeLogin(body: PhoneMesssageCodeLoginInput, options?: RequestConfig) {
-    return this.request<string>('/api/Account/LifePayPhoneMesssageCodeLogin', {
-      method: 'POST',
-      headers: {
-        'Content-Type': 'application/json',
-      },
-      data: body,
-      ...(options || {}),
-    });
+    return this.request<LifePayPhoneMesssageCodeLoginOutput>(
+      '/api/Account/LifePayPhoneMesssageCodeLogin',
+      {
+        method: 'POST',
+        headers: {
+          'Content-Type': 'application/json',
+        },
+        data: body,
+        ...(options || {}),
+      }
+    );
   }
 
   /** 鑾峰彇鎶樻墸 GET /api/LifePay/GetRate */
@@ -122,14 +130,15 @@
   }
 
   /** 鏍规嵁璁㈠崟鍙疯幏鍙栨敮浠樼姸鎬� GET /api/LifePay/GetPayStatusByOrderNo */
-  async getPayStatusByOrderNo(params: APIgetPayStatusByOrderNoParams, options?: RequestConfig) {
+  async getPayStatusByOrderNo(body: GetPayStatusByOrderNoInput, options?: RequestConfig) {
     return this.request<LifeRechargeConstants.LifePayStatusEnum>(
       '/api/LifePay/GetPayStatusByOrderNo',
       {
-        method: 'GET',
-        params: {
-          ...params,
+        method: 'POST',
+        headers: {
+          'Content-Type': 'application/json',
         },
+        data: body,
         ...(options || {}),
       }
     );
@@ -309,6 +318,45 @@
       ...(options || {}),
     });
   }
+
+  /** 鑾峰彇椤荤煡 GET /api/LifePay/GetIntroInfo */
+  async getIntroInfo(params: APIgetIntroInfoParams, options?: RequestConfig) {
+    return this.request<LifePayIntroInfoOutput[]>('/api/LifePay/GetIntroInfo', {
+      method: 'GET',
+      params: {
+        ...params,
+      },
+      ...(options || {}),
+    });
+  }
+
+  /** 鑾峰彇娓犻亾鎶樻墸 GET /api/LifePay/GetChannelRate */
+  async getChannelRate(body: ChannelsBaseInput, options?: RequestConfig) {
+    return this.request<ChannelRateOutput>('/api/LifePay/GetChannelRate', {
+      method: 'POST',
+      headers: {
+        'Content-Type': 'application/json',
+      },
+      data: body,
+      ...(options || {}),
+    });
+  }
+
+  /** 鑾峰彇鍦ㄧ嚎瀹㈡湇 GET /api/LifePay/GetOnlineService */
+  async getOnlineService(options?: RequestConfig) {
+    return this.request<string>('/api/LifePay/GetOnlineService', {
+      method: 'GET',
+      ...(options || {}),
+    });
+  }
+
+  /** 鑾峰彇鍏ㄩ儴缂磋垂娓犻亾 GET /api/LifePay/GetLifePayChannlesAllList */
+  async getLifePayChannlesAllList(options?: RequestConfig) {
+    return this.request<CreateEditPayChannelsInput[]>('/api/LifePay/GetLifePayChannlesAllList', {
+      method: 'GET',
+      ...(options || {}),
+    });
+  }
 }
 
 export interface PhoneMesssageCodeLoginInput {
@@ -372,6 +420,8 @@
 
 export interface LifePhoneDataCreateLifePayOrderInput {
   userId?: string;
+  /** 娓犻亾Id */
+  channelId?: string;
   productData?: LifePhoneData;
 }
 
@@ -392,6 +442,8 @@
 
 export interface LifeElectricDataCreateLifePayOrderInput {
   userId?: string;
+  /** 娓犻亾Id */
+  channelId?: string;
   productData?: LifeElectricData;
 }
 
@@ -481,12 +533,17 @@
   creationTime?: string;
   /** 閫�娆炬椂闂� */
   refundTime?: string;
+  /** 閫�娆剧敵璇锋椂闂� */
+  refundApplyTime?: string;
   /** 閫�娆惧嚟璇� */
   refundCredentialsImgUrl?: string;
   refundApplyRemark?: string;
   refundCheckRemark?: string;
   /** 娓犻亾娴佹按鍙� */
   acoolyOrderNo?: string;
+  frontStatus?: LifeRechargeConstants.LifePayOrderFrontStatusEnum;
+  lifePayRefundStatus?: LifeRechargeConstants.LifePayRefundStatusEnum;
+  acoolyStatus?: LifeRechargeConstants.ACOOLYStatusEnum;
 }
 
 export interface ElectricSupportAreaResponse {
@@ -599,6 +656,8 @@
 
 export interface LifeGasDataCreateLifePayOrderInput {
   userId?: string;
+  /** 娓犻亾Id */
+  channelId?: string;
   productData?: LifeGasData;
 }
 
@@ -691,7 +750,7 @@
 }
 
 export interface ChannelsBaseInput {
-  channelId?: string;
+  checkChannelId?: string;
 }
 
 export interface AreaInfo {
@@ -707,3 +766,48 @@
   /** 蹇�熸绱� */
   quickQuery?: string;
 }
+
+export interface GetPayStatusByOrderNoInput {
+  checkChannelId?: string;
+  orderNo?: string;
+}
+
+export interface APIgetIntroInfoParams {
+  type?: LifeRechargeConstants.LifePayOrderTypeEnum;
+}
+
+export interface LifePayIntroInfoOutput {
+  type?: IntroInfoTypeEnum;
+  lifePayType?: LifeRechargeConstants.LifePayOrderTypeEnum;
+  /** 鎽樿 */
+  contentSummary?: string;
+  /** 鏂囨湰鍐呭 */
+  content?: string;
+  /** 鍥剧墖/瑙嗛璺緞 */
+  path?: string;
+  /** 鎺掑簭 */
+  sequence?: number;
+}
+
+export type IntroInfoTypeEnum = 0 | 1 | 2 | 3 | 4;
+
+export interface ChannelRateOutput {
+  channlesRate?: number;
+}
+
+export interface CreateEditPayChannelsInput {
+  id?: string;
+  channlesName?: string;
+  channlesNum?: string;
+  channlesRate?: number;
+  channlesRakeRate?: number;
+}
+
+export interface LifePayPhoneMesssageCodeLoginOutput {
+  /** 鐢ㄦ埛Id */
+  userId?: string;
+  /** 鏄惁鏄悗鍙扮敤鎴� */
+  isBackClientUser?: boolean;
+  /** 娓犻亾鍙� */
+  channlesNum?: string[];
+}

--
Gitblit v1.9.1