|
@@ -74,7 +74,8 @@
|
74
|
74
|
<view>
|
75
|
75
|
<text class="text-price text-red">{{ item.sum_money }}</text>
|
76
|
76
|
</view>
|
77
|
|
- <view>
|
|
77
|
+ <!-- 限制已支付后台数据没及时刷新 -->
|
|
78
|
+ <view v-show="!payIds.includes(item.order_id)">
|
78
|
79
|
<button @tap="pay(item.order_id)" class="cu-btn round bg-student text-white margin-right-sm" v-if="item.status === 0">立即付款</button>
|
79
|
80
|
<button @tap="cancel(item.order_id)" class="cu-btn round bg-gray" v-if="item.status === 0 && !isPaying">取消</button>
|
80
|
81
|
</view>
|
|
@@ -163,7 +164,8 @@ export default {
|
163
|
164
|
params: {
|
164
|
165
|
type: 5,
|
165
|
166
|
page: 1
|
166
|
|
- }
|
|
167
|
+ },
|
|
168
|
+ payIds: [] //已支付订单ids
|
167
|
169
|
}
|
168
|
170
|
},
|
169
|
171
|
filters: {
|
|
@@ -300,11 +302,13 @@ export default {
|
300
|
302
|
return false
|
301
|
303
|
}
|
302
|
304
|
if (res.code === 200) {
|
|
305
|
+ _self.isPaying = false
|
303
|
306
|
uni.showToast({ title: res.msg, icon: 'success', duration: 2000 })
|
304
|
307
|
_self.changeTab(2)
|
305
|
308
|
return true
|
306
|
309
|
}
|
307
|
310
|
if (res.code === 301) {
|
|
311
|
+ _self.isPaying = false
|
308
|
312
|
_self.showForm = true
|
309
|
313
|
_self.payurl = res.data
|
310
|
314
|
return true
|
|
@@ -317,6 +321,7 @@ export default {
|
317
|
321
|
signType: res.data.signType,
|
318
|
322
|
paySign: res.data.paySign,
|
319
|
323
|
success: function (res) {
|
|
324
|
+ _self.payIds.push(id)
|
320
|
325
|
_self.isPaying = false
|
321
|
326
|
_self.changeTab(0)
|
322
|
327
|
},
|