From 21b418f4ffb8e76d72819e8d489b3179154cb0c1 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期一, 24 三月 2025 15:46:54 +0800
Subject: [PATCH] fix: 三期需求

---
 packages/core/src/lifeRechargeServices.ts |   88 ++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 77 insertions(+), 11 deletions(-)

diff --git a/packages/core/src/lifeRechargeServices.ts b/packages/core/src/lifeRechargeServices.ts
index ef65c43..e8be114 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,
@@ -122,14 +127,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 +315,29 @@
       ...(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 || {}),
+    });
+  }
 }
 
 export interface PhoneMesssageCodeLoginInput {
@@ -372,6 +401,8 @@
 
 export interface LifePhoneDataCreateLifePayOrderInput {
   userId?: string;
+  /** 娓犻亾Id */
+  channelId?: string;
   productData?: LifePhoneData;
 }
 
@@ -392,6 +423,8 @@
 
 export interface LifeElectricDataCreateLifePayOrderInput {
   userId?: string;
+  /** 娓犻亾Id */
+  channelId?: string;
   productData?: LifeElectricData;
 }
 
@@ -487,6 +520,9 @@
   refundCheckRemark?: string;
   /** 娓犻亾娴佹按鍙� */
   acoolyOrderNo?: string;
+  frontStatus?: LifeRechargeConstants.LifePayOrderFrontStatusEnum;
+  lifePayRefundStatus?: LifeRechargeConstants.LifePayRefundStatusEnum;
+  acoolyStatus?: LifeRechargeConstants.ACOOLYStatusEnum;
 }
 
 export interface ElectricSupportAreaResponse {
@@ -599,6 +635,8 @@
 
 export interface LifeGasDataCreateLifePayOrderInput {
   userId?: string;
+  /** 娓犻亾Id */
+  channelId?: string;
   productData?: LifeGasData;
 }
 
@@ -691,7 +729,7 @@
 }
 
 export interface ChannelsBaseInput {
-  channelId?: string;
+  checkChannelId?: string;
 }
 
 export interface AreaInfo {
@@ -707,3 +745,31 @@
   /** 蹇�熸绱� */
   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;
+}

--
Gitblit v1.9.1