This commit is contained in:
weipengfei 2024-03-15 11:47:19 +08:00
commit ba7056e3be
2 changed files with 102 additions and 54 deletions

View File

@ -245,11 +245,15 @@ export function postOrderComputed(key, data) {
// 生成订单
export function orderCreate(data) {
return request.post("order/create", data, { noAuth: true });
return request.post("order/create", data, {
noAuth: true
});
}
// 新的生成订单
export function createOrder(data) {
return request.post("v2/order/create", data, { noAuth: true });
return request.post("v2/order/create", data, {
noAuth: true
});
}
// 生成其他订单
export function createOtherOrder(data) {
@ -257,37 +261,51 @@ export function createOtherOrder(data) {
}
// 未支付订单
export function groupOrderList(data) {
return request.get("order/group_order_list", data, { noAuth: true });
return request.get("order/group_order_list", data, {
noAuth: true
});
}
// 批量退款列表
export function refundBatch(id) {
return request.get("refund/batch_product/" + id, { noAuth: true });
return request.get("refund/batch_product/" + id, {
noAuth: true
});
}
// 退款商品
export function refundProduct(id, data) {
return request.get("refund/product/" + id, data, { noAuth: true });
return request.get("refund/product/" + id, data, {
noAuth: true
});
}
// 申请退款
export function refundApply(id, data) {
return request.post("refund/apply/" + id, data, { noAuth: true });
return request.post("refund/apply/" + id, data, {
noAuth: true
});
}
// 退款理由
export function refundMessage() {
return request.get("common/refund_message", { noAuth: true });
return request.get("common/refund_message", {
noAuth: true
});
}
// 退款列表
export function refundList(data) {
return request.get("refund/list", data, { noAuth: true });
return request.get("refund/list", data, {
noAuth: true
});
}
// 退款详情
export function refundDetail(id) {
return request.get("refund/detail/" + id, { noAuth: true });
return request.get("refund/detail/" + id, {
noAuth: true
});
}
// 物流列表
@ -297,17 +315,23 @@ export function expressList() {
// 退回商品提交
export function refundBackGoods(id, data) {
return request.post("refund/back_goods/" + id, data, { noAuth: true });
return request.post("refund/back_goods/" + id, data, {
noAuth: true
});
}
// 退款记录删除
export function refundDel(id) {
return request.post("refund/del/" + id, { noAuth: true });
return request.post("refund/del/" + id, {
noAuth: true
});
}
// 退款记录删除
export function refundExpress(id) {
return request.get("refund/express/" + id, { noAuth: true });
return request.get("refund/express/" + id, {
noAuth: true
});
}
// 核销二维码
@ -341,7 +365,9 @@ export function getReceiptOrder(id) {
* @param object data
*/
export function getCallBackUrlApi(key) {
return request.get('common/pay_key/' + key, {}, { noAuth: true });
return request.get('common/pay_key/' + key, {}, {
noAuth: true
});
}
/**
* 发票订单
@ -372,3 +398,11 @@ export function refundCancelApi(id) {
export function refundlist(data) {
return request.get(`refund/list`, data);
}
/**
* 售后
* @param object data
*/
export function uploadVoucherApi(data) {
return request.get(`other_order/upload/:${data.id}`, data);
}

View File

@ -385,7 +385,8 @@
orderTake,
otherOrderTake,
applyInvoiceApi,
refundList
refundList,
uploadVoucherApi
} from '@/api/order.js';
import {
getUserInfo
@ -669,7 +670,20 @@
uploadVoucher(item) {
let that = this;
that.$util.uploadImageOne('upload/image', res => {
const path = res.data.path;
uni.showLoading({
title: "上传中..."
})
uploadVoucherApi({
id: item.order_id,
url: res.data.path
}).then(res => {
uni.hideLoading();
this.$util.Tips({
title: "上传成功"
})
}).catch(() => {
uni.hideLoading();
})
});
},