石广澎
2025-01-06 2d88676a862d41abfb1f471f2cf071a5bc839adf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import {
    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)
 
/* 根据动态码id获取商铺信息 */
export const queryShopByActQrId = (params, config = {}) => http.get(URL +
    '/payfour-merchant/v1/web/aggregatePayAllin/getPayInfo', params, config)
 
/* 根据订单id获取商铺信息 */
export const queryShopByOnlineId = (params, config = {}) => http.get(URL +
    '/payfour-merchant/v1/web/aggregatePayAllin/getOnlineId', params, config)
 
/* 根据shopId获取商铺信息 */
export const queryShopByShopId = (params, config = {}) => http.get(URL +
    '/payfour-merchant/v1/web/aggregatePayAllin/queryShopByShopId', 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'
    }
    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 = {});
 
/* 获取用户可用优惠券 */
export const queryUseSweepPayCoupon = (params, config = {}) => http.get(URL +
    '/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 = {});
 
/*统一支付*/
export const saveOrder = (params, config = {}) => http.post(URL +
    '/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 getWxOrderInfo = (params, config = {}) => http.post(URL +
    '/payfour-merchant/v1/web/aggregatePayAllin/getWxOrderInfo',
    params, config = {});