Commit a29268a3 authored by youjie's avatar youjie

优化取消

parent 38c92598
...@@ -223,16 +223,20 @@ ...@@ -223,16 +223,20 @@
if(this.DataLists[this.i].loading){ if(this.DataLists[this.i].loading){
return return
} }
//未付款-调用后台取消
uni.showLoading({
title: "请稍等片刻...",
})
this.DataLists[this.i].loading = true
if ( if (
(item.paymentTime == null || item.paymentTime == "") && (item.paymentTime == null || item.paymentTime == "") &&
(item.orderState == 1||item.orderState == 2) (item.orderState == 1||item.orderState == 2)
) { ) {
this.apipost( wx.showModal({
title: '提示',
content: '确定取消订单?',
success: (tip) => {
if (tip.confirm) {
uni.showLoading({
title: "请稍等片刻...",
})
that.DataLists[that.i].loading = true
that.apipost(
"GetCancelOrder_post", "GetCancelOrder_post",
{ {
OrderNo: '', OrderNo: '',
...@@ -248,13 +252,20 @@ ...@@ -248,13 +252,20 @@
that.$emit('research',that.dataMsg.orderState) that.$emit('research',that.dataMsg.orderState)
} }
uni.hideLoading() uni.hideLoading()
this.DataLists[this.i].loading = false that.DataLists[that.i].loading = false
}, },
(err) => { (err) => {
uni.hideLoading() uni.hideLoading()
this.DataLists[this.i].loading = false that.DataLists[that.i].loading = false
} }
); );
}else {
this.DataLists[this.i].loading = false
uni.hideLoading()
}
}
})
} }
}, },
getDetail(orderId,s){ getDetail(orderId,s){
......
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