拼团功能完善
This commit is contained in:
80
common/api/order/gbOrder.js
Normal file
80
common/api/order/gbOrder.js
Normal file
@@ -0,0 +1,80 @@
|
||||
// 引入 request 文件
|
||||
import request from '@/common/api/request.js'
|
||||
const url = '/order'
|
||||
|
||||
let platformType = '';
|
||||
let payType='';
|
||||
// #ifdef MP-WEIXIN
|
||||
platformType = 'wechat'
|
||||
payType='wechatPay'
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY
|
||||
platformType = 'alipay'
|
||||
payType='aliPay'
|
||||
// #endif
|
||||
|
||||
export const warePage = (data) => {
|
||||
return request({
|
||||
url: url + '/user/gbOrder/ware/page',
|
||||
method: 'get',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export const wareDetail = (data) => {
|
||||
return request({
|
||||
url: url + '/user/gbOrder/ware/detail',
|
||||
method: 'get',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export const record = (data) => {
|
||||
return request({
|
||||
url: url + '/user/gbOrder/record/page',
|
||||
method: 'get',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export const recordDetail = (data) => {
|
||||
return request({
|
||||
url: url + '/user/gbOrder/record/detail',
|
||||
method: 'get',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const exchange = (data) => {
|
||||
// #ifdef MP-WEIXIN
|
||||
const openId=uni.cache.get('userInfo').wechatOpenId;
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY
|
||||
const openId=uni.cache.get('userInfo').alipayOpenId;
|
||||
// #endif
|
||||
return request({
|
||||
url: url + '/user/gbOrder/exchange',
|
||||
method: 'post',
|
||||
data: {
|
||||
platformType,
|
||||
payType,
|
||||
openId,
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
export const applyRefund = (data) => {
|
||||
return request({
|
||||
url: url + '/user/gbOrder/applyRefund',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export const cancelRefund = (data) => {
|
||||
return request({
|
||||
url: url + '/user/gbOrder/cancelRefund',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user