From 47d56a8b0f22fb15a46b69dfd46fac23560ad2cd Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 12 五月 2026 09:07:49 +0800
Subject: [PATCH] 改bug
---
mini-program/pagesA/pages/order/order.vue | 44 +++++++++++++++++++++++++++++++++-----------
1 files changed, 33 insertions(+), 11 deletions(-)
diff --git a/mini-program/pagesA/pages/order/order.vue b/mini-program/pagesA/pages/order/order.vue
index 7a5a293..12164f3 100644
--- a/mini-program/pagesA/pages/order/order.vue
+++ b/mini-program/pagesA/pages/order/order.vue
@@ -178,7 +178,8 @@
{ name: '寰呮敮浠�', id: 0 ,index:1},
{ name: '寰呭彂璐�/鑷彁', id: 1,index:2 },
{ name: '寰呮敹璐�', id: 2 ,index:3},
- ]
+ ],
+ loading: false
};
},
onLoad(options) {
@@ -280,9 +281,12 @@
},
payOrder(item){
var that = this;
+ if (this.loading) return;
+ this.loading = true
this.$u.api.replayPay({
orderId: item.id
}).then(res => {
+ this.loading = false
if (res.code === 200) {
wx.requestPayment({
timeStamp: res.data.response.timeStamp,
@@ -296,6 +300,9 @@
} else {
uni.showToast({ title: '璁㈠崟鍙栨秷鏀粯', icon: 'none' })
}
+ },
+ fail(err) {
+ console.log(err)
}
})
}
@@ -312,16 +319,22 @@
if(this.userType == 1 || this.currentOrder==null || this.currentOrder.id == null) {
return
}
+ if (this.loading) return;
+ this.loading = true
var that =this
let res = await this.$u.api.affirmOrder({ orderId: this.currentOrder.id });
- if (res.code === 200 ) {
+ this.loading = false
+ that.showDone = false
+ if (res.code === 200 ) {
+ that.getFirstPageData()
//淇敼璁㈠崟鐘舵��
- this.dataList.forEach(item=>{
- if(item.id==this.currentOrder.id){
- item.status =3
- }
- })
- this.doneOrder()
+ // this.dataList.forEach(item=>{
+ // if(item.id==this.currentOrder.id){
+ // item.status =3
+ // }
+ // })
+ // this.doneOrder()
+ this.showDone()
}else{
/* uni.showToast({
title:res.message||'纭畾鏀惰揣澶辫触锛�',
@@ -333,16 +346,21 @@
if(this.userType == 1 || this.currentOrder==null || this.currentOrder.id == null) {
return
}
+ if (this.loading) return;
+ this.loading = true
var that =this
let res = await that.$u.api.cancelOrder({ orderId: this.currentOrder.id });
- if (res.code === 200 ) {
+ this.loading = false
+ this.showCancel = false
+ if (res.code === 200 ) {
//淇敼璁㈠崟鐘舵��
this.dataList.forEach(item=>{
if(item.id==this.currentOrder.id){
item.status = 4
}
})
- this.cancelOrder()
+ // this.cancelOrder()
+ that.getFirstPageData()
}else{
/* uni.showToast({
title:res.message||'鍙栨秷璁㈠崟澶辫触锛�',
@@ -354,9 +372,13 @@
if(this.userType == 1 || this.currentOrder==null || this.currentOrder.id == null) {
return
}
+ if (this.loading) return;
+ this.loading = true
var that =this
let res = await that.$u.api.delOrder({ orderId: this.currentOrder.id });
- if (res.code === 200 ) {
+ this.loading = false
+ this.showDelete = false
+ if (res.code === 200 ) {
//淇敼璁㈠崟鐘舵��
/* var tindex = -1;
this.dataList.forEach((item,index)=>{
--
Gitblit v1.9.3