From c9aed0a7a2cfa34fc2116bf38ed47513cd9c12ef Mon Sep 17 00:00:00 2001
From: 石广澎 <shiguangpeng@163.com>
Date: 星期四, 08 八月 2024 15:13:52 +0800
Subject: [PATCH] feat(支付): 云闪付

---
 common/api/index.js |   47 +++++++++++++++++++++++------------------------
 1 files changed, 23 insertions(+), 24 deletions(-)

diff --git a/common/api/index.js b/common/api/index.js
index e802088..a38ca85 100644
--- a/common/api/index.js
+++ b/common/api/index.js
@@ -1,57 +1,56 @@
 import {
-	config
+    config
 } from '@/common/config.js';
+
 const http = uni.$u.http;
 const URL = config.baseURL;
 
 /* 鏍规嵁cid鑾峰彇鍟嗛摵淇℃伅 */
 export const queryShopByCid = (params, config = {}) => http.get(URL +
-	'/payfour-merchant/v1/web/aggregatePayAllin/queryShopById', params, config)
+    '/payfour-merchant/v1/web/aggregatePayAllin/queryShopById', params, config)
 
 /* 鏍规嵁shopId鑾峰彇鍟嗛摵淇℃伅 */
 export const queryShopByShopId = (params, config = {}) => http.get(URL +
-	'/payfour-merchant/v1/web/aggregatePayAllin/queryShopByShopId', params, config)
+    '/payfour-merchant/v1/web/aggregatePayAllin/queryShopByShopId', params, config)
+
 /* 鑾峰彇绉垎浠峰�� */
 export const getScoreWorth = (params, config = {}) => http.get(URL +
-	'/payfour-merchant/v1/web/aggregatePayAllin/getScoreWorth', params, config)
+    '/payfour-merchant/v1/web/aggregatePayAllin/getScoreWorth', params, config)
 
-
-/* 闈欓粯鎺堟潈鐧诲綍 */
-export const getOpenIdBase = (params, config = {}) => http.get(URL +
-	'/payfour-merchant/v1/web/aggregatePayAllin/getOpenIdBase', params, config = {});
-
+/*缁熶竴鎺堟潈*/
 export const userLogin = (params, config = {}) => {
-	let path = '/payfour-merchant/v1/web/aggregatePayAllin/getOpenId'
-	if(params.platform==5){
-		path = '/payfour-merchant/v1/web/h5PayAli/getUserIdByCode'
-	}
-	return http.get(URL + path,
-		params, config = {})
+    let path = '/payfour-merchant/v1/web/aggregatePayAllin/getOpenId' //寰俊鎺堟潈
+    if (params.platform == 5) { //鏀粯瀹濇巿鏉�
+        path = '/payfour-merchant/v1/web/h5PayAli/getUserIdByCode'
+    }
+    if (params.platform == 15) { //浜戦棯浠樻巿鏉�
+        path = '/payfour-merchant/v1/web/h5PayUnionPay/getUserIdByCode'
+    }
+    return http.get(URL + path,
+        params, config = {})
 };
 
 /* 鑾峰彇鐢ㄦ埛鍙敤浼樻儬鍒� 闈㈠�兼渶澶х殑*/
 export const queryMyUseSweepPayMaxCoupon = (params, config = {}) => http.get(URL +
-	'/payfour-merchant/v1/web/aggregatePayAllin/queryMyUseSweepPayMaxCoupon', params, config = {});
+    '/payfour-merchant/v1/web/aggregatePayAllin/queryMyUseSweepPayMaxCoupon', params, config = {});
 
 /* 鑾峰彇鐢ㄦ埛鍙敤浼樻儬鍒� */
 export const queryUseSweepPayCoupon = (params, config = {}) => http.get(URL +
-	'/payfour-merchant/v1/web/aggregatePayAllin/queryUseSweepPayCoupon', params, config = {});
+    '/payfour-merchant/v1/web/aggregatePayAllin/queryUseSweepPayCoupon', params, config = {});
 
 /* 鑾峰彇寰俊js sdk閰嶇疆 */
 export const getWechatConfigInfo = (params, config = {}) => http.post(URL +
-	'/payfour-merchant/v1/web/aggregatePayAllin/getWechatConfigInfo', params, config = {});
+    '/payfour-merchant/v1/web/aggregatePayAllin/getWechatConfigInfo', params, config = {});
 
 /*缁熶竴鏀粯*/
 export const saveOrder = (params, config = {}) => http.post(URL +
-	'/payfour-merchant/v1/web/aggregatePayAllin/saveOrder', params, config = {});
+    '/payfour-merchant/v1/web/aggregatePayAllin/saveOrder', params, config = {});
 
 /*鍙栨秷璁㈠崟*/
 export const closeOrder = (params, config = {}) => http.get(URL +
-	'/payfour-merchant/v1/web/aggregatePayAllin/scanPayOrderClose', params, config = {});
+    '/payfour-merchant/v1/web/aggregatePayAllin/scanPayOrderClose', params, config = {});
 
 /* 寰俊鏀粯缁撴灉 */
 export const getWxOrderInfo = (params, config = {}) => http.post(URL +
-	'/payfour-merchant/v1/web/aggregatePayAllin/getWxOrderInfo',
-	params, config = {});
-
-
+    '/payfour-merchant/v1/web/aggregatePayAllin/getWxOrderInfo',
+    params, config = {});

--
Gitblit v1.9.1