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)
|
|
/* 根据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 = {});
|