diff --git a/mall4uni/pages/order-detail/order-detail.vue b/mall4uni/pages/order-detail/order-detail.vue index 16c9d0a..5d476e9 100644 --- a/mall4uni/pages/order-detail/order-detail.vue +++ b/mall4uni/pages/order-detail/order-detail.vue @@ -35,8 +35,8 @@ {{wxs.parsePrice(item.price)[0]}} .{{wxs.parsePrice(item.price)[1]}} - 申请售后 - 加购物车 + + @@ -144,7 +144,7 @@ - 删除订单 + 删除订单 联系客服 @@ -276,6 +276,41 @@ export default { }); } }); + }, + //删除已完成||已取消的订单 + delOrderList: function () { + var ths = this; + uni.showModal({ + title: '', + content: '确定要删除此订单吗?', + confirmColor: "#eb2444", + success(res) { + if (res.confirm) { + uni.showLoading(); + var params = { + url: "/p/myOrder/" + ths.orderNumber, + method: "DELETE", + data: {}, + callBack: function (res) { + uni.hideLoading(); + uni.showToast({ + title: res ? res : '删除成功', + icon: 'none' + }); + setTimeout(() => { + uni.redirectTo({ + url: '/pages/orderList/orderList' + }); + },1000) + } + }; + http.request(params); + } else if (res.cancel) { + console.log('用户点击取消'); + } + } + + }); } } };