From ad51ed1be27d4ed156c6922403c506896aceab37 Mon Sep 17 00:00:00 2001 From: Eratosici Date: Tue, 14 Dec 2021 09:23:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E8=AE=A2=E5=8D=95=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/order-detail/order-detail.vue | 41 ++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/pages/order-detail/order-detail.vue b/pages/order-detail/order-detail.vue index 16c9d0a..eb357ce 100644 --- a/pages/order-detail/order-detail.vue +++ b/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('用户点击取消'); + } + } + }); } } };