You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Scan-Pay-H5/Utils/Api.js

26 lines
861 B

import {
POST
} from './Request.js';
let app = getApp();
let base = app.globalData.url;
// 门店详情
export const getQrCodeDetail = params => {
return POST('POST', `${base}/payQrCode/getQrCodeDetail`, params).then(res => res.data);
}
//银行卡识别
export const recognizeBankCard = params => {
return POST('GET', `${base}/ocr/recognizeBankCard`, params).then(res => res.data);
}
//H5 code 转化openid
export const getAccessToken = params => {
return POST('GET', `${base}/wechat/getAccessToken`, params).then(res => res.data);
}
//创建 JSAPI 订单
export const createJSAPIOrder = params => {
return POST('POST', `${base}/tradeOrder/createJSAPIOrder`, params).then(res => res.data);
}
// 支付 JSAPI 订单
export const jsapiPay = params => {
return POST('POST', `${base}/pay/jsapiPay`, params).then(res => res.data);
}