From 847d368435d189cba684a8efd5f50a7d230a6e79 Mon Sep 17 00:00:00 2001
From: 石广澎 <shiguangpeng@163.com>
Date: 星期五, 30 八月 2024 21:26:43 +0800
Subject: [PATCH] feat(支付): 去除无用代码、依赖
---
common/api/index.js | 128 +++++++++---------------------------------
1 files changed, 27 insertions(+), 101 deletions(-)
diff --git a/common/api/index.js b/common/api/index.js
index 53ac3a7..8dd96e6 100644
--- a/common/api/index.js
+++ b/common/api/index.js
@@ -1,126 +1,52 @@
import {
- config
+ config
} from '@/common/config.js';
+
const http = uni.$u.http;
const URL = config.baseURL;
-/* 鑾峰彇鍟嗛摵淇℃伅 */
-export const queryShop = (params, config = {}) => http.get(URL +
- '/payfour-merchant/v1/web/aggregatePayAllin/queryShopById', params, config)
+/* 鏍规嵁cid鑾峰彇鍟嗛摵淇℃伅 */
+export const queryShopByCid = (params, config = {}) => http.get(URL +
+ '/payfour-merchant/v1/web/aggregatePayAllin/queryShopById', params, config)
-/* 鑾峰彇鎴愬姛椤甸潰閰嶇疆 */
-export const getPayCompleteUrl = (params, config = {}) => http.get(URL +
- '/payfour-base/v1/base/pc/global/config/getPayCompleteUrl', params, config)
+/* 鏍规嵁shopId鑾峰彇鍟嗛摵淇℃伅 */
+export const queryShopByShopId = (params, config = {}) => http.get(URL +
+ '/payfour-merchant/v1/web/aggregatePayAllin/queryShopByShopId', params, config)
-/* 鑾峰彇绉垎浠峰�� */
-export const getScoreWorth = (params, config = {}) => http.get(URL +
- '/payfour-merchant/v1/web/aggregatePayAllin/getScoreWorth', params, config)
-
-/* 鑾峰彇鐢ㄦ埛閾惰鍗� */
-export const myBankCard = (params, config = {}) => http.get(URL +
- '/payfour-shop/v1/shop/wechat/h5/bankCard/myBankCard', params, config)
-
-/* 鑾峰彇鍟嗛摵寰俊閰嶇疆 */
-export const getWechatInfo = (params, config = {}) => http.get(URL +
- '/payfour-merchant/v1/web/aggregatePayAllin/getWechatInfo', params, config = {});
-/* 闈欓粯鎺堟潈鐧诲綍 */
-export const getOpenIdBase = (params, config = {}) => http.get(URL +
- '/payfour-merchant/v1/web/aggregatePayAllin/getOpenIdBase', params, config = {});
-
-/* 寰俊鏅�氭巿鏉冪櫥褰� */
-export const getOpenId = (params, config = {}) => http.get(URL + '/payfour-merchant/v1/web/aggregatePayAllin/getOpenId',
- params, config = {});
-/* 鏀粯瀹濇櫘閫氭巿鏉冪櫥褰� */
-export const getUserId = (params, config = {}) => http.get(URL + '/payfour-merchant/v1/web/h5PayAli/getUserIdByCode',
- 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 queryScore = (params, config = {}) => http.get(URL +
- '/payfour-merchant/v1/web/aggregatePayAllin/queryScore', 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 saveWxOrder = (params, config = {}) => http.post(URL +
- '/payfour-merchant/v1/web/aggregatePayAllin/saveWxOrder', 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 = {});
-
-/* 鍥惧舰楠岃瘉鍚� */
-export const getVerify = (params, config = {}) => http.get(URL +
- '/payfour-merchant/v1/web/aggregatePayAllin/getVerify', params, config = {});
-
-/* 鐭俊楠岃瘉鐮� */
-export const getH5PayCheckVerifyCode = (params, config = {}) => http.post(URL +
- '/payfour-merchant/v1/web/aggregatePayAllin/getH5PayCheckVerifyCode', params, config = {});
-
-/* 寰俊鏀粯 */
-export const h5PayLogin = (params, config = {}) => http.post(URL + '/payfour-shop/v1/shop/web/wechat/h5PayLogin',
- params, config = {});
-
-/* 閫氳仈蹇嵎鏀粯 */
-export const tlPay = (params, config = {}) => http.post(URL +
- '/payfour-merchant/v1/web/aggregatePayAllin/pay/scanpayagreeconfirm',
- 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 = {});
-
-/* 鍒ゆ柇鏄惁鍦ㄥ崱娈靛唴 */
-export const isContain = (params, config = {}) => http.get(URL +
- '/payfour-base/v1/base/pc/bankCardPeriod/isContain',
- params, config = {});
-
-/* 鑾峰彇閾惰鍗¢厤缃� */
-export const bankCardStyle = (params, config = {}) => http.get(URL +
- '/payfour-base/v1/base/pc/global/config/bankCardStyle',
- params, config = {});
-
-/* 鑾峰彇鐢ㄦ埛淇℃伅 */
-export const getUserInfo = (params, config = {}) => http.post(URL +
- '/payfour-shop/v1/shop/wechat/h5/bankCard/noEnc',
- params, config = {});
-/* 鑾峰彇搴楅摵浼樻儬淇℃伅 */
-export const queryMyDiscount = (params, config = {}) => http.get(URL +
- '/payfour-merchant/v1/web/aggregatePayAllin/queryMyDiscount',
- params, config = {});
-/* 绛剧害鐢宠缁戝崱 */
-export const signUpToApply = (params, config = {}) => http.post(URL +
- '/payfour-shop/v1/shop/wechat/h5/bankCard/signUpToApply',
- params, config = {});
-
-/* 绛剧害鐢宠纭 */
-export const bindCard = (params, config = {}) => http.post(URL +
- '/payfour-shop/v1/shop/wechat/h5/bankCard/bindCard',
- params, config = {});
-
-/* 鑾峰彇缁戝崱娲诲姩璧犻�佺殑浼樻儬鍒� */
-export const getMyCoupUseDetail = (params, config = {}) => http.get(URL +
- '/payfour-merchant/v1/web/aggregatePayAllin/headBand/getMyCoupUseDetail',
- params, config = {});
-/* 鑾峰彇棣栫粦鏈夌ぜ */
-export const headBand = (params, config = {}) => http.get(URL +
- '/payfour-shop/v1/shop/wechat/activity/headBand/detail',
- params, config = {});
+ '/payfour-merchant/v1/web/aggregatePayAllin/getWxOrderInfo',
+ params, config = {});
--
Gitblit v1.9.1