xcx 4 år sedan
förälder
incheckning
9817fd2cdc

+ 11
- 4
src/pages/index/DaLeTouDingDan/index.vue Visa fil

@@ -213,12 +213,18 @@ export default {
213 213
       if (this.DataLock || !this.DaLeTouCart.length || this.CurrentStoreId === null) return
214 214
       this.Dialog.confirm({
215 215
         title: '确认投注',
216
-        message: `您将花费${this.TotalPrize * this.Multiple}牛币进行投注,目前账户余额${this.UserInfo.account.amount}牛币`
217
-      }).then(() => {
218
-        this.ToPostBetting()
216
+        message: `您将花费${this.TotalPrize * this.Multiple}牛币进行投注,目前账户余额${this.UserInfo.account.amount}牛币`,
217
+        beforeClose: this.BettingBeforeClose
219 218
       })
220 219
     },
221
-    ToPostBetting () { // 去下注
220
+    BettingBeforeClose (action, done) {
221
+      if (action === 'confirm') {
222
+        this.ToPostBetting(done)
223
+      } else {
224
+        done()
225
+      }
226
+    },
227
+    ToPostBetting (done = () => {}) { // 去下注
222 228
       if (this.DataLock || !this.DaLeTouCart.length || this.CurrentStoreId === null) return
223 229
       this.DataLock = true
224 230
       let ListData = []
@@ -255,6 +261,7 @@ export default {
255 261
         urlData: { id: 'lottery' },
256 262
         data: { ...Data }
257 263
       }).then((res) => {
264
+        done()
258 265
         this.Toast('投注成功!')
259 266
         this.EmptyDaLeTouCart()
260 267
         this.PageList = []

+ 9
- 3
src/pages/index/LanQiuDingDan/index.vue Visa fil

@@ -220,11 +220,17 @@ export default {
220 220
       if (this.DataLock || !this.LanQiuCart.length || this.CurrentStoreId === null || this.CurrentPassCode === null) return
221 221
       this.Dialog.confirm({
222 222
         title: '确认投注',
223
-        message: `您将花费${this.TotalPrice}牛币进行投注,目前账户余额${this.UserInfo.account.amount}牛币`
224
-      }).then(() => {
225
-        this.ToPostBetting()
223
+        message: `您将花费${this.TotalPrice}牛币进行投注,目前账户余额${this.UserInfo.account.amount}牛币`,
224
+        beforeClose: this.BettingBeforeClose
226 225
       })
227 226
     },
227
+    BettingBeforeClose (action, done) {
228
+      if (action === 'confirm') {
229
+        this.ToPostBetting(done)
230
+      } else {
231
+        done()
232
+      }
233
+    },
228 234
     ToPostBetting () { // 去下注
229 235
       if (this.DataLock || !this.LanQiuCart.length || this.CurrentStoreId === null || this.CurrentPassCode === null) return
230 236
       this.DataLock = true

+ 9
- 3
src/pages/index/PaiLie3DingDan/index.vue Visa fil

@@ -278,11 +278,17 @@ export default {
278 278
       if (this.DataLock || !this.PaiLie3Cart.length || this.CurrentStoreId === null) return
279 279
       this.Dialog.confirm({
280 280
         title: '确认投注',
281
-        message: `您将花费${this.TotalCount * 200 * this.Multiple}牛币进行投注,目前账户余额${this.UserInfo.account.amount}牛币`
282
-      }).then(() => {
283
-        this.ToPostBetting()
281
+        message: `您将花费${this.TotalCount * 200 * this.Multiple}牛币进行投注,目前账户余额${this.UserInfo.account.amount}牛币`,
282
+        beforeClose: this.BettingBeforeClose
284 283
       })
285 284
     },
285
+    BettingBeforeClose (action, done) {
286
+      if (action === 'confirm') {
287
+        this.ToPostBetting(done)
288
+      } else {
289
+        done()
290
+      }
291
+    },
286 292
     ToPostBetting () { // 去下注
287 293
       if (this.DataLock || !this.PaiLie3Cart.length || this.CurrentStoreId === null) return
288 294
       this.DataLock = true

+ 9
- 3
src/pages/index/PaiLie5DingDan/index.vue Visa fil

@@ -242,11 +242,17 @@ export default {
242 242
       if (this.DataLock || !this.PaiLie5Cart.length || this.CurrentStoreId === null) return
243 243
       this.Dialog.confirm({
244 244
         title: '确认投注',
245
-        message: `您将花费${this.TotalCount * 200 * this.Multiple}牛币进行投注,目前账户余额${this.UserInfo.account.amount}牛币`
246
-      }).then(() => {
247
-        this.ToPostBetting()
245
+        message: `您将花费${this.TotalCount * 200 * this.Multiple}牛币进行投注,目前账户余额${this.UserInfo.account.amount}牛币`,
246
+        beforeClose: this.BettingBeforeClose
248 247
       })
249 248
     },
249
+    BettingBeforeClose (action, done) {
250
+      if (action === 'confirm') {
251
+        this.ToPostBetting(done)
252
+      } else {
253
+        done()
254
+      }
255
+    },
250 256
     ToPostBetting () { // 去下注
251 257
       if (this.DataLock || !this.PaiLie5Cart.length || this.CurrentStoreId === null) return
252 258
       this.DataLock = true

+ 9
- 3
src/pages/index/ShuangSeQiuDingDan/index.vue Visa fil

@@ -203,11 +203,17 @@ export default {
203 203
       if (this.DataLock || !this.ShuangSeQiuCart.length || this.CurrentStoreId === null) return
204 204
       this.Dialog.confirm({
205 205
         title: '确认投注',
206
-        message: `您将花费${this.TotalPrize * this.Multiple}牛币进行投注,目前账户余额${this.UserInfo.account.amount}牛币`
207
-      }).then(() => {
208
-        this.ToPostBetting()
206
+        message: `您将花费${this.TotalPrize * this.Multiple}牛币进行投注,目前账户余额${this.UserInfo.account.amount}牛币`,
207
+        beforeClose: this.BettingBeforeClose
209 208
       })
210 209
     },
210
+    BettingBeforeClose (action, done) {
211
+      if (action === 'confirm') {
212
+        this.ToPostBetting(done)
213
+      } else {
214
+        done()
215
+      }
216
+    },
211 217
     ToPostBetting () { // 去下注
212 218
       if (this.DataLock || !this.ShuangSeQiuCart.length || this.CurrentStoreId === null) return
213 219
       this.DataLock = true

+ 9
- 3
src/pages/index/ZuQiuDingDan/index.vue Visa fil

@@ -220,11 +220,17 @@ export default {
220 220
       if (this.DataLock || !this.ZuQiuCart.length || this.CurrentStoreId === null || this.CurrentPassCode === null) return
221 221
       this.Dialog.confirm({
222 222
         title: '确认投注',
223
-        message: `您将花费${this.TotalPrice}牛币进行投注,目前账户余额${this.UserInfo.account.amount}牛币`
224
-      }).then(() => {
225
-        this.ToPostBetting()
223
+        message: `您将花费${this.TotalPrice}牛币进行投注,目前账户余额${this.UserInfo.account.amount}牛币`,
224
+        beforeClose: this.BettingBeforeClose
226 225
       })
227 226
     },
227
+    BettingBeforeClose (action, done) {
228
+      if (action === 'confirm') {
229
+        this.ToPostBetting(done)
230
+      } else {
231
+        done()
232
+      }
233
+    },
228 234
     ToPostBetting () { // 去下注
229 235
       if (this.DataLock || !this.ZuQiuCart.length || this.CurrentStoreId === null || this.CurrentPassCode === null) return
230 236
       this.DataLock = true