Commit 68d362c0 authored by spc's avatar spc

fxied

parent bfe59b18
...@@ -103,4 +103,8 @@ export const fetchOrderExpressRoute = (data) => api.get('/c/order/express/route' ...@@ -103,4 +103,8 @@ export const fetchOrderExpressRoute = (data) => api.get('/c/order/express/route'
* @returns {Promise} API响应 * @returns {Promise} API响应
* @description 取消订单 * @description 取消订单
*/ */
export const fetchOrderCancel = (data) => api.post('/c/order/cancel', data); export const fetchOrderCancel = (data) => api.post('/c/order/cancel', data, {
headers: {
'Content-Type': 'form-data'
}
});
...@@ -861,17 +861,14 @@ export default { ...@@ -861,17 +861,14 @@ export default {
await this.exchangeGoods(); await this.exchangeGoods();
} }
} finally { } finally {
this.isSubmitting = false; // isSubmitting由调用方重置
uni.hideLoading();
} }
}, },
// 兑换商品(仅处理非实物商品) // 兑换商品(仅处理非实物商品)
async exchangeGoods() { async exchangeGoods() {
try { try {
// 防连点检查
if (this.isSubmitting) return;
this.isSubmitting = true;
uni.showLoading({ uni.showLoading({
title: '兑换中...' title: '兑换中...'
}); });
......
...@@ -408,7 +408,7 @@ export default { ...@@ -408,7 +408,7 @@ export default {
this.closeModal(); this.closeModal();
await this.createOrder(); await this.createOrder();
} finally { } finally {
this.isSubmitting = false; // isSubmitting由调用方重置
} }
}, },
...@@ -421,10 +421,6 @@ export default { ...@@ -421,10 +421,6 @@ export default {
// 创建订单 // 创建订单
async createOrder() { async createOrder() {
try { try {
// 防连点检查
if (this.isSubmitting) return;
this.isSubmitting = true;
uni.showLoading({ uni.showLoading({
title: '下单中...' title: '下单中...'
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment