From ac49206b91d13bb0f21a281962fc5dde3ed93859 Mon Sep 17 00:00:00 2001
From: lifizer <913626195@qq.com>
Date: Wed, 22 May 2024 14:21:51 +0800
Subject: [PATCH] =?UTF-8?q?Fix(=E8=AE=A2=E5=8D=95):[#1621]=E5=B7=B2?=
=?UTF-8?q?=E5=AE=8C=E6=88=90=E7=9A=84=E8=AE=A2=E5=8D=95=E6=97=A0=E6=B3=95?=
=?UTF-8?q?=E5=88=A0=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
libs/order.js | 39 +++++++++++++++++-------------
pages/order/OrderDetails/index.vue | 12 +++++----
2 files changed, 29 insertions(+), 22 deletions(-)
diff --git a/libs/order.js b/libs/order.js
index 0091705..2978b15 100644
--- a/libs/order.js
+++ b/libs/order.js
@@ -49,25 +49,30 @@ export function takeOrderHandle(orderId) {
export function delOrderHandle(orderId) {
return new Promise((resolve, reject) => {
- dialog.confirm({
- mes: "确认删除该订单?",
- opts() {
- delOrder(orderId)
- .then(res => {
+ uni.showModal({
+ title: '提示',
+ content: '确认删除该订单?',
+ success(res) {
+ if (res.confirm) {
+ delOrder(orderId).then(res => {
uni.showToast({
- title: '删除成功', icon: 'success', duration: 2000
- });
- resolve(res);
+ title: '删除成功',
+ icon: 'success',
+ duration: 2000
+ })
+ resolve(res)
+ }).catch(err => {
+ uni.showToast({
+ title: '删除失败',
+ icon: 'none',
+ duration: 2000
+ })
+ reject(err)
})
- .catch(err => {
- uni.showToast({
- title: '删除失败', icon: 'none', duration: 2000
- });
- reject(err);
- });
- }
- });
- });
+ }
+ }
+ })
+ })
}
export function payOrderHandle(orderId, type, from) {
diff --git a/pages/order/OrderDetails/index.vue b/pages/order/OrderDetails/index.vue
index 1bc26ae..fd38dd7 100644
--- a/pages/order/OrderDetails/index.vue
+++ b/pages/order/OrderDetails/index.vue
@@ -233,9 +233,11 @@
删除订单
- 查看物流
+ 查看物流
@@ -483,8 +485,8 @@ export default {
},
delOrder() {
delOrderHandle(this.orderInfo.orderId).then(() => {
- setTimeout(() => this.goBack(), 300);
- });
+ this.goBack()
+ })
},
setOfflinePayStatus: function (status) {
var that = this;