2 Commits 042103b366 ... e6762e06bc

Author SHA1 Message Date
  seamwang e6762e06bc Merge branch 'master' of http://47.106.205.140:8089/pikapika/parentNew 2 years ago
  seamwang f007498f46 no message 2 years ago
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/pages/class/shoppingCart.vue

+ 5 - 0
src/pages/class/shoppingCart.vue

@@ -91,6 +91,7 @@ export default {
91
       shoppingList: [], // 购物车列表
91
       shoppingList: [], // 购物车列表
92
       sum: 0,
92
       sum: 0,
93
       all: [], // 全部
93
       all: [], // 全部
94
+      payable: false, //控制重复点击
94
       checkAll: false
95
       checkAll: false
95
     }
96
     }
96
   },
97
   },
@@ -144,10 +145,13 @@ export default {
144
       })
145
       })
145
     },
146
     },
146
     pay() {
147
     pay() {
148
+      if (this.payable) return false
149
+      this.payable = true
147
       if (!this.phone) {
150
       if (!this.phone) {
148
         return this.globalNavigateTo('bindPhone')
151
         return this.globalNavigateTo('bindPhone')
149
       }
152
       }
150
       if (this.checkedIds.length < 1) {
153
       if (this.checkedIds.length < 1) {
154
+        this.payable = false
151
         uni.showToast({ title: '请先选择课程', icon: 'none', duration: 1000 })
155
         uni.showToast({ title: '请先选择课程', icon: 'none', duration: 1000 })
152
         return false
156
         return false
153
       }
157
       }
@@ -167,6 +171,7 @@ export default {
167
             uni.hideLoading()
171
             uni.hideLoading()
168
             this.globalNavigateTo('order', { type: 1 })
172
             this.globalNavigateTo('order', { type: 1 })
169
           }
173
           }
174
+          this.payable = false
170
           this.$store.dispatch('setConnect', false)
175
           this.$store.dispatch('setConnect', false)
171
         }, 3000)
176
         }, 3000)
172
       })
177
       })