|
@@ -50,6 +50,7 @@ Page({
|
|
|
showCanvas: false, // 是否显示二维码
|
|
|
canvasImg: "" as string,
|
|
|
refoundStatus: false,
|
|
|
+ cancelRefoundStatus: false,
|
|
|
},
|
|
|
|
|
|
/**
|
|
@@ -220,21 +221,25 @@ Page({
|
|
|
},
|
|
|
/** 申请退款 */
|
|
|
async cancelRefound() {
|
|
|
- try {
|
|
|
- const {data} = await api_userPaymentCancelRefund(this.data.goodsInfo.refundOrderId)
|
|
|
- // console.log(data, 'data')
|
|
|
- if(data.code == 200) {
|
|
|
- wx.showToast({ title: '取消退款成功', icon: 'none' })
|
|
|
- // setTimeout(() => {
|
|
|
- // wx.navigateBack({
|
|
|
- // delta: 1
|
|
|
- // })
|
|
|
- // }, 1000);
|
|
|
- this.getDetail()
|
|
|
- } else {
|
|
|
- wx.showToast({ title: data.message, icon: 'none' })
|
|
|
- }
|
|
|
- } catch {}
|
|
|
+ this.setData({
|
|
|
+ cancelRefoundStatus: true
|
|
|
+ }, async () => {
|
|
|
+ try {
|
|
|
+ const {data} = await api_userPaymentCancelRefund(this.data.goodsInfo.refundOrderId)
|
|
|
+ // console.log(data, 'data')
|
|
|
+ if(data.code == 200) {
|
|
|
+ wx.showToast({ title: '取消退款成功', icon: 'none' })
|
|
|
+ this.getDetail()
|
|
|
+ } else {
|
|
|
+ wx.showToast({ title: data.message, icon: 'none' })
|
|
|
+ }
|
|
|
+ setTimeout(() => {
|
|
|
+ this.setData({
|
|
|
+ cancelRefoundStatus: false
|
|
|
+ })
|
|
|
+ }, 500);
|
|
|
+ } catch {}
|
|
|
+ })
|
|
|
},
|
|
|
/** 申请退款 */
|
|
|
useRefound() {
|