shish 2 лет назад
Родитель
Сommit
4190841748

+ 13 - 1
hdApp/src/pagesPurchase/gatherPay.vue

@@ -50,7 +50,8 @@ export default {
       psdKey: '',
       orderSn: '',
       actPrice: '',
-      getPayType:1
+      getPayType:1,
+      hasRequestApi:false
     };
   },
   onLoad (options) {
@@ -78,6 +79,17 @@ export default {
     },
     wxPayFn(type){
       let that = this
+
+      //解决重复提交问题
+      if(this.hasRequestApi == true){
+        this.$msg('正在请求,请5秒后重试')
+        return false
+      }
+      that.hasRequestApi = true
+      setTimeout(() => {
+        that.hasRequestApi = false
+      },7000)
+
       // #ifdef APP-PLUS
       this.$msg('请用小程序打开,再支付')
       return false

+ 13 - 1
hdApp/src/pagesPurchase/wechatPay.vue

@@ -82,7 +82,8 @@ export default {
       hasDebtPay:0,
       balance:0,
       getPayType:1,
-      info:[]
+      info:[],
+      hasRequestApi:false
     };
   },
   onLoad (options) {
@@ -138,6 +139,17 @@ export default {
     },
     wxPayFn () {
       let that = this
+
+      //解决重复提交问题
+      if(this.hasRequestApi == true){
+        this.$msg('正在请求,请5秒后重试')
+        return false
+      }
+      that.hasRequestApi = true
+      setTimeout(() => {
+        that.hasRequestApi = false
+      },7000)
+
       uni.showLoading({title: '加载中',mask:true})
       uni.login({
         provider: 'weixin',

+ 7 - 7
mallApp/src/pages/callback/index.vue

@@ -98,7 +98,7 @@ export default {
       totalPrice:0,
       orderSn:'',
       getPayType:1,
-      hasRequest:false
+      hasRequestApi:false
     };
   },
   computed: {
@@ -144,14 +144,14 @@ export default {
       let that = this
 
       //解决重复提交问题
-      if(this.hasRequest == true){
-        this.$msg('正在请求,请5秒后试')
+      if(this.hasRequestApi == true){
+        this.$msg('正在请求,请5秒后试')
         return false
       }
-      that.hasRequest = true
-		setTimeout(() => {
-			that.hasRequest = false
-		},7000)
+      that.hasRequestApi = true
+      setTimeout(() => {
+        that.hasRequestApi = false
+      },7000)
 
       uni.showLoading({title: '加载中',mask:true})
       uni.login({