浏览代码

user-serve

lhl 1 年之前
父节点
当前提交
70be92e582
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 10 1
      pages/goods/order_confirm/yuyue.vue

+ 10 - 1
pages/goods/order_confirm/yuyue.vue

@@ -218,6 +218,7 @@
 		mixins: [colors],
 		data() {
 			return {
+				paying: false,
 				time_init: newTime.getTime() + 60 * 30,
 				start_year: newTime.getFullYear(),
 				addressInfoArea: [],
@@ -761,7 +762,10 @@
 					console.log(this.payType)
 					this.pay_close = false
 				} else {
-
+					if(that.paying) {
+						return
+					}
+					that.paying = true
 					SubscribeCreate({
 						uid: this.userInfo.uid,
 						work_member_id: this.choose_yg.id,
@@ -774,6 +778,9 @@
 						from: "routine"
 						// #endif
 					}).then(res => {
+						setTimeout(()=> {
+							that.paying = false
+						},2500)
 						let status = res.data.status,
 							orderId = res.data.result.order_id,
 							jsConfig = res.data.result.jsConfig,
@@ -1019,6 +1026,8 @@
 								// #endif
 								break;
 						}
+					}).catch(err=> {
+						that.paying = false
 					})
 				}