同步代码到仓库

This commit is contained in:
GaoHao
2024-10-12 18:22:56 +08:00
commit 5586573ff1
37 changed files with 5248 additions and 0 deletions

51
api/index.js Normal file
View File

@@ -0,0 +1,51 @@
import http from './http.js'
const request=http.request
/**
* 店铺二维码支付
* @returns
*/
export function createOrder(data) {
return request({
url: `/pay/createOrder`,
method: 'post',
data
})
}
/**
* 获取支付宝userId 或 微信openId
* @returns
*/
export function getOpenId(params) {
return request({
url: `/pay/openId`,
method: 'get',
params
})
}
/**
* 获取订单信息
* @returns
*/
export function orderorderInfo(params) {
return request({
url: `/pay/noToken/queryOrderInfo`,
method: 'get',
params
})
}
/**
* 取消支付
* @param {Object} data
*/
export function cancelOrderPay(data) {
return request({
url: `/notify/cancel`,
method: 'post',
data
})
}