Sfoglia il codice sorgente

Signed-off-by: 1004749546@qq.com <1004749546@qq.com>
bug修改

1004749546@qq.com 4 anni fa
parent
commit
16b6e9f297
1 ha cambiato i file con 8 aggiunte e 5 eliminazioni
  1. 8 5
      pages/getOrder/getOrder.vue

+ 8 - 5
pages/getOrder/getOrder.vue

@@ -215,7 +215,7 @@
 				})
 			},
 			// 获取服务列表
-			getServerList() {
+			getServerList(flag) {
 				this.status = 'loading'
 				let storeId = this.$store.state.vuex_storeId
 				getStoreItems({
@@ -224,9 +224,12 @@
 					this.status = 'loadmore'
 					if (res.status == 200) {
 						this.itemList = res.data
-						this.serverIndex = 0
-						// 获取用户可用优惠券
-						this.getCouponList()
+						// 支付失败 重查服务项时不切换服务及重查优惠券
+						if (!flag) {
+							this.serverIndex = 0
+							// 获取用户可用优惠券
+							this.getCouponList()
+						}
 					} else {
 						this.itemList = []
 					}
@@ -352,7 +355,7 @@
 						this.disabledPay = false
 						setTimeout(()=>{
 							// 刷新服务项
-							this.getServerList()
+							this.getServerList(true)
 						},2000)
 					}
 				})