Browse Source

no message

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