浏览代码

静态页面

xcx 4 年前
父节点
当前提交
fc33948948

+ 3
- 5
src/pages/WoDe/ChongZhiZhuangTai/index.vue 查看文件

50
       if (this.$route.query.orderId !== undefined) {
50
       if (this.$route.query.orderId !== undefined) {
51
         this.GetAliPayStatus({ urlData: { id: this.$route.query.orderId } }).then((res) => {
51
         this.GetAliPayStatus({ urlData: { id: this.$route.query.orderId } }).then((res) => {
52
           this.OrderStatus = res.data.data === 1 ? 'Success' : 'Error'
52
           this.OrderStatus = res.data.data === 1 ? 'Success' : 'Error'
53
-          if (res.data.data === 1) {
54
-            this.GetCurrentUserInfo().then((res) => {
55
-              this.UpdateUserInfo(res.data.data)
56
-            })
57
-          }
53
+          this.GetCurrentUserInfo()
58
         })
54
         })
55
+      } else {
56
+        this.GetCurrentUserInfo()
59
       }
57
       }
60
     }
58
     }
61
   }
59
   }

+ 16
- 3
src/pages/index/DaLeTouDingDan/index.vue 查看文件

52
             <span><em>{{TotalCount}}</em>注</span>
52
             <span><em>{{TotalCount}}</em>注</span>
53
             <span>金额:<em>{{TotalPrize * Multiple}}</em>牛币</span>
53
             <span>金额:<em>{{TotalPrize * Multiple}}</em>牛币</span>
54
           </div>
54
           </div>
55
-          <a @click="ToPostBetting" :class="{'active': CurrentStoreId !== null && DaLeTouCart.length}">立即购买</a>
55
+          <a @click="ConfirmBetting" :class="{'active': CurrentStoreId !== null && DaLeTouCart.length}">立即购买</a>
56
         </div>
56
         </div>
57
 
57
 
58
         <div class="Layer" v-if="ShowStore">
58
         <div class="Layer" v-if="ShowStore">
130
   },
130
   },
131
   computed: {
131
   computed: {
132
     ...mapUserState({
132
     ...mapUserState({
133
+      UserInfo: x => x.UserInfo, // 用户信息
133
       DaLeTouCart: x => x.DaLeTouCart // 大乐透购物车
134
       DaLeTouCart: x => x.DaLeTouCart // 大乐透购物车
134
     })
135
     })
135
   },
136
   },
173
     ...mapUserActions([
174
     ...mapUserActions([
174
       'PostBetting',
175
       'PostBetting',
175
       'GetStoreList',
176
       'GetStoreList',
176
-      'CreateAliPayOrder'
177
+      'CreateAliPayOrder',
178
+      'GetCurrentUserInfo'
177
     ]),
179
     ]),
178
     SelectStore (item) { // 选择店铺
180
     SelectStore (item) { // 选择店铺
179
       if (this.DataLock) return
181
       if (this.DataLock) return
189
       })
191
       })
190
       return arr
192
       return arr
191
     },
193
     },
194
+    ConfirmBetting () {
195
+      if (this.DataLock || !this.DaLeTouCart.length || this.CurrentStoreId === null) return
196
+      this.Dialog.confirm({
197
+        title: '确认投注',
198
+        message: `您将花费${this.TotalPrize * this.Multiple}牛币进行投注,目前账户余额${this.UserInfo.account.amount}牛币`
199
+      }).then(() => {
200
+        this.ToPostBetting()
201
+      })
202
+    },
192
     ToPostBetting () { // 去下注
203
     ToPostBetting () { // 去下注
193
       if (this.DataLock || !this.DaLeTouCart.length || this.CurrentStoreId === null) return
204
       if (this.DataLock || !this.DaLeTouCart.length || this.CurrentStoreId === null) return
194
       this.DataLock = true
205
       this.DataLock = true
233
         this.TotalPrize = 0
244
         this.TotalPrize = 0
234
         this.Multiple = 1
245
         this.Multiple = 1
235
         this.DataLock = false
246
         this.DataLock = false
236
-        this.$router.push({ name: 'DingDanZhiFuZhuangTai', query: { orderId: res.data.data.orderId, bettingId: res.data.data.bettingId, routerName: 'DaLeTou' } })
247
+        this.GetCurrentUserInfo().then(() => {
248
+          this.$router.push({ name: 'DingDanZhiFuZhuangTai', query: { orderId: res.data.data.orderId, bettingId: res.data.data.bettingId, routerName: 'DaLeTou' } })
249
+        })
237
       }).catch((res) => {
250
       }).catch((res) => {
238
         this.Toast(res.data.message)
251
         this.Toast(res.data.message)
239
         this.DataLock = false
252
         this.DataLock = false

+ 15
- 3
src/pages/index/LanQiuDingDan/index.vue 查看文件

53
             <span>金额:<em>{{TotalPrice}}</em>牛币</span>
53
             <span>金额:<em>{{TotalPrice}}</em>牛币</span>
54
             <span>预计奖金:<em>{{(MinPrice * Multiple).toFixed(0)}} ~ {{(MaxPrice * Multiple).toFixed(0)}}</em>牛币</span>
54
             <span>预计奖金:<em>{{(MinPrice * Multiple).toFixed(0)}} ~ {{(MaxPrice * Multiple).toFixed(0)}}</em>牛币</span>
55
           </div>
55
           </div>
56
-          <a :class="{'active': CurrentStoreId !== null && LanQiuCart.length}" @click="ToPostBetting">立即购买</a>
56
+          <a :class="{'active': CurrentStoreId !== null && LanQiuCart.length}" @click="ConfirmBetting">立即购买</a>
57
         </div>
57
         </div>
58
 
58
 
59
         <div class="Layer" v-if="ShowPassWay">
59
         <div class="Layer" v-if="ShowPassWay">
183
     ]),
183
     ]),
184
     ...mapUserActions([
184
     ...mapUserActions([
185
       'PostBetting',
185
       'PostBetting',
186
-      'GetStoreList'
186
+      'GetStoreList',
187
+      'GetCurrentUserInfo'
187
     ]),
188
     ]),
188
     Init () { // 初始化
189
     Init () { // 初始化
189
       this.PageList = [...this.LanQiuCart] // 赋值页面数据
190
       this.PageList = [...this.LanQiuCart] // 赋值页面数据
193
         this.ToGetAllParts() // 枚举投注
194
         this.ToGetAllParts() // 枚举投注
194
       }
195
       }
195
     },
196
     },
197
+    ConfirmBetting () {
198
+      if (this.DataLock || !this.LanQiuCart.length || this.CurrentStoreId === null || this.CurrentPassCode === null) return
199
+      this.Dialog.confirm({
200
+        title: '确认投注',
201
+        message: `您将花费${this.TotalPrice}牛币进行投注,目前账户余额${this.UserInfo.account.amount}牛币`
202
+      }).then(() => {
203
+        this.ToPostBetting()
204
+      })
205
+    },
196
     ToPostBetting () { // 去下注
206
     ToPostBetting () { // 去下注
197
       if (this.DataLock || !this.LanQiuCart.length || this.CurrentStoreId === null || this.CurrentPassCode === null) return
207
       if (this.DataLock || !this.LanQiuCart.length || this.CurrentStoreId === null || this.CurrentPassCode === null) return
198
       this.DataLock = true
208
       this.DataLock = true
233
         this.TotalPrice = 0
243
         this.TotalPrice = 0
234
         this.Multiple = 1
244
         this.Multiple = 1
235
         this.DataLock = false
245
         this.DataLock = false
236
-        this.$router.push({ name: 'DingDanZhiFuZhuangTai', query: { orderId: res.data.data.orderId, bettingId: res.data.data.bettingId, routerName: 'LanQiu' } })
246
+        this.GetCurrentUserInfo().then(() => {
247
+          this.$router.push({ name: 'DingDanZhiFuZhuangTai', query: { orderId: res.data.data.orderId, bettingId: res.data.data.bettingId, routerName: 'LanQiu' } })
248
+        })
237
       }).catch((res) => {
249
       }).catch((res) => {
238
         this.Toast(res.data.message)
250
         this.Toast(res.data.message)
239
         this.DataLock = false
251
         this.DataLock = false

+ 15
- 3
src/pages/index/PaiLie3DingDan/index.vue 查看文件

97
           <div class="flex-h">
97
           <div class="flex-h">
98
             <a @click="$router.go(-1)">自选号码</a>
98
             <a @click="$router.go(-1)">自选号码</a>
99
             <a @click="CutRandomCount(1)">机选一注</a>
99
             <a @click="CutRandomCount(1)">机选一注</a>
100
-            <a class="flex-item" @click="ToPostBetting" :class="{'active': CurrentStoreId !== null && PaiLie3Cart.length}">确认投注</a>
100
+            <a class="flex-item" @click="ConfirmBetting" :class="{'active': CurrentStoreId !== null && PaiLie3Cart.length}">确认投注</a>
101
           </div>
101
           </div>
102
         </div>
102
         </div>
103
 
103
 
194
     ]),
194
     ]),
195
     ...mapUserActions([
195
     ...mapUserActions([
196
       'PostBetting',
196
       'PostBetting',
197
-      'GetStoreList'
197
+      'GetStoreList',
198
+      'GetCurrentUserInfo'
198
     ]),
199
     ]),
199
     Init () {
200
     Init () {
200
       this.PageList = [...this.PaiLie3Cart]
201
       this.PageList = [...this.PaiLie3Cart]
255
       this.CurrentStoreId = item.shopId === this.CurrentStoreId ? null : item.shopId
256
       this.CurrentStoreId = item.shopId === this.CurrentStoreId ? null : item.shopId
256
       this.DataLock = false
257
       this.DataLock = false
257
     },
258
     },
259
+    ConfirmBetting () {
260
+      if (this.DataLock || !this.PaiLie3Cart.length || this.CurrentStoreId === null) return
261
+      this.Dialog.confirm({
262
+        title: '确认投注',
263
+        message: `您将花费${this.TotalCount * 200 * this.Multiple}牛币进行投注,目前账户余额${this.UserInfo.account.amount}牛币`
264
+      }).then(() => {
265
+        this.ToPostBetting()
266
+      })
267
+    },
258
     ToPostBetting () { // 去下注
268
     ToPostBetting () { // 去下注
259
       if (this.DataLock || !this.PaiLie3Cart.length || this.CurrentStoreId === null) return
269
       if (this.DataLock || !this.PaiLie3Cart.length || this.CurrentStoreId === null) return
260
       this.DataLock = true
270
       this.DataLock = true
288
         this.TotalCount = 0
298
         this.TotalCount = 0
289
         this.Multiple = 1
299
         this.Multiple = 1
290
         this.DataLock = false
300
         this.DataLock = false
291
-        this.$router.push({ name: 'DingDanZhiFuZhuangTai', query: { orderId: res.data.data.orderId, bettingId: res.data.data.bettingId, routerName: 'PaiLie3' } })
301
+        this.GetCurrentUserInfo().then(() => {
302
+          this.$router.push({ name: 'DingDanZhiFuZhuangTai', query: { orderId: res.data.data.orderId, bettingId: res.data.data.bettingId, routerName: 'PaiLie3' } })
303
+        })
292
       }).catch((res) => {
304
       }).catch((res) => {
293
         this.Toast(res.data.message)
305
         this.Toast(res.data.message)
294
         this.DataLock = false
306
         this.DataLock = false

+ 15
- 3
src/pages/index/PaiLie5DingDan/index.vue 查看文件

88
           <div class="flex-h">
88
           <div class="flex-h">
89
             <a @click="$router.go(-1)">自选号码</a>
89
             <a @click="$router.go(-1)">自选号码</a>
90
             <a @click="CutRandomCount(1)">机选一注</a>
90
             <a @click="CutRandomCount(1)">机选一注</a>
91
-            <a class="flex-item" @click="ToPostBetting" :class="{'active': CurrentStoreId !== null && PaiLie5Cart.length}">确认投注</a>
91
+            <a class="flex-item" @click="ConfirmBetting" :class="{'active': CurrentStoreId !== null && PaiLie5Cart.length}">确认投注</a>
92
           </div>
92
           </div>
93
         </div>
93
         </div>
94
 
94
 
192
     ]),
192
     ]),
193
     ...mapUserActions([
193
     ...mapUserActions([
194
       'PostBetting',
194
       'PostBetting',
195
-      'GetStoreList'
195
+      'GetStoreList',
196
+      'GetCurrentUserInfo'
196
     ]),
197
     ]),
197
     Init () { // 初始化
198
     Init () { // 初始化
198
       this.PageList = [...this.PaiLie5Cart]
199
       this.PageList = [...this.PaiLie5Cart]
220
         }
221
         }
221
       })
222
       })
222
     },
223
     },
224
+    ConfirmBetting () {
225
+      if (this.DataLock || !this.PaiLie5Cart.length || this.CurrentStoreId === null) return
226
+      this.Dialog.confirm({
227
+        title: '确认投注',
228
+        message: `您将花费${this.TotalCount * 200 * this.Multiple}牛币进行投注,目前账户余额${this.UserInfo.account.amount}牛币`
229
+      }).then(() => {
230
+        this.ToPostBetting()
231
+      })
232
+    },
223
     ToPostBetting () { // 去下注
233
     ToPostBetting () { // 去下注
224
       if (this.DataLock || !this.PaiLie5Cart.length || this.CurrentStoreId === null) return
234
       if (this.DataLock || !this.PaiLie5Cart.length || this.CurrentStoreId === null) return
225
       this.DataLock = true
235
       this.DataLock = true
266
         this.TotalCount = 0
276
         this.TotalCount = 0
267
         this.Multiple = 1
277
         this.Multiple = 1
268
         this.DataLock = false
278
         this.DataLock = false
269
-        this.$router.push({ name: 'DingDanZhiFuZhuangTai', query: { orderId: res.data.data.orderId, bettingId: res.data.data.bettingId, routerName: 'PaiLie5' } })
279
+        this.GetCurrentUserInfo().then(() => {
280
+          this.$router.push({ name: 'DingDanZhiFuZhuangTai', query: { orderId: res.data.data.orderId, bettingId: res.data.data.bettingId, routerName: 'PaiLie5' } })
281
+        })
270
       }).catch((res) => {
282
       }).catch((res) => {
271
         this.Toast(res.data.message)
283
         this.Toast(res.data.message)
272
         this.DataLock = false
284
         this.DataLock = false

+ 15
- 3
src/pages/index/ShuangSeQiuDingDan/index.vue 查看文件

51
             <span><em>{{TotalCount}}</em>注</span>
51
             <span><em>{{TotalCount}}</em>注</span>
52
             <span>金额:<em>{{TotalPrize}}</em>牛币</span>
52
             <span>金额:<em>{{TotalPrize}}</em>牛币</span>
53
           </div>
53
           </div>
54
-          <a @click="ToPostBetting" :class="{'active': CurrentStoreId !== null && ShuangSeQiuCart.length}">立即购买</a>
54
+          <a @click="ConfirmBetting" :class="{'active': CurrentStoreId !== null && ShuangSeQiuCart.length}">立即购买</a>
55
         </div>
55
         </div>
56
 
56
 
57
         <div class="Layer" v-if="ShowStore">
57
         <div class="Layer" v-if="ShowStore">
171
     ]),
171
     ]),
172
     ...mapUserActions([
172
     ...mapUserActions([
173
       'PostBetting',
173
       'PostBetting',
174
-      'GetStoreList'
174
+      'GetStoreList',
175
+      'GetCurrentUserInfo'
175
     ]),
176
     ]),
176
     ResToString (target) {
177
     ResToString (target) {
177
       let arr = []
178
       let arr = []
180
       })
181
       })
181
       return arr
182
       return arr
182
     },
183
     },
184
+    ConfirmBetting () {
185
+      if (this.DataLock || !this.ShuangSeQiuCart.length || this.CurrentStoreId === null) return
186
+      this.Dialog.confirm({
187
+        title: '确认投注',
188
+        message: `您将花费${this.TotalPrize * this.Multiple}牛币进行投注,目前账户余额${this.UserInfo.account.amount}牛币`
189
+      }).then(() => {
190
+        this.ToPostBetting()
191
+      })
192
+    },
183
     ToPostBetting () { // 去下注
193
     ToPostBetting () { // 去下注
184
       if (this.DataLock || !this.ShuangSeQiuCart.length || this.CurrentStoreId === null) return
194
       if (this.DataLock || !this.ShuangSeQiuCart.length || this.CurrentStoreId === null) return
185
       this.DataLock = true
195
       this.DataLock = true
223
         this.TotalPrize = 0
233
         this.TotalPrize = 0
224
         this.Multiple = 1
234
         this.Multiple = 1
225
         this.DataLock = false
235
         this.DataLock = false
226
-        this.$router.push({ name: 'DingDanZhiFuZhuangTai', query: { orderId: res.data.data.orderId, bettingId: res.data.data.bettingId, routerName: 'ShuangSeQiu' } })
236
+        this.GetCurrentUserInfo().then(() => {
237
+          this.$router.push({ name: 'DingDanZhiFuZhuangTai', query: { orderId: res.data.data.orderId, bettingId: res.data.data.bettingId, routerName: 'ShuangSeQiu' } })
238
+        })
227
       }).catch((res) => {
239
       }).catch((res) => {
228
         this.Toast(res.data.message)
240
         this.Toast(res.data.message)
229
         this.DataLock = false
241
         this.DataLock = false

+ 15
- 3
src/pages/index/ZuQiuDingDan/index.vue 查看文件

53
             <span>金额:<em>{{TotalPrice}}</em>牛币</span>
53
             <span>金额:<em>{{TotalPrice}}</em>牛币</span>
54
             <span>预计奖金:<em>{{(MinPrice * Multiple).toFixed(0)}} ~ {{(MaxPrice * Multiple).toFixed(0)}}</em>牛币</span>
54
             <span>预计奖金:<em>{{(MinPrice * Multiple).toFixed(0)}} ~ {{(MaxPrice * Multiple).toFixed(0)}}</em>牛币</span>
55
           </div>
55
           </div>
56
-          <a :class="{'active': CurrentStoreId !== null && ZuQiuCart.length}" @click="ToPostBetting">立即购买</a>
56
+          <a :class="{'active': CurrentStoreId !== null && ZuQiuCart.length}" @click="ConfirmBetting">立即购买</a>
57
         </div>
57
         </div>
58
 
58
 
59
         <div class="Layer" v-if="ShowPassWay">
59
         <div class="Layer" v-if="ShowPassWay">
183
     ]),
183
     ]),
184
     ...mapUserActions([
184
     ...mapUserActions([
185
       'PostBetting',
185
       'PostBetting',
186
-      'GetStoreList'
186
+      'GetStoreList',
187
+      'GetCurrentUserInfo'
187
     ]),
188
     ]),
188
     Init () { // 初始化
189
     Init () { // 初始化
189
       this.PageList = [...this.ZuQiuCart] // 赋值页面数据
190
       this.PageList = [...this.ZuQiuCart] // 赋值页面数据
194
         this.ToGetAllParts() // 枚举投注
195
         this.ToGetAllParts() // 枚举投注
195
       }
196
       }
196
     },
197
     },
198
+    ConfirmBetting () {
199
+      if (this.DataLock || !this.ZuQiuCart.length || this.CurrentStoreId === null || this.CurrentPassCode === null) return
200
+      this.Dialog.confirm({
201
+        title: '确认投注',
202
+        message: `您将花费${this.TotalPrice}牛币进行投注,目前账户余额${this.UserInfo.account.amount}牛币`
203
+      }).then(() => {
204
+        this.ToPostBetting()
205
+      })
206
+    },
197
     ToPostBetting () { // 去下注
207
     ToPostBetting () { // 去下注
198
       if (this.DataLock || !this.ZuQiuCart.length || this.CurrentStoreId === null || this.CurrentPassCode === null) return
208
       if (this.DataLock || !this.ZuQiuCart.length || this.CurrentStoreId === null || this.CurrentPassCode === null) return
199
       this.DataLock = true
209
       this.DataLock = true
234
         this.TotalPrice = 0
244
         this.TotalPrice = 0
235
         this.Multiple = 1
245
         this.Multiple = 1
236
         this.DataLock = false
246
         this.DataLock = false
237
-        this.$router.push({ name: 'DingDanZhiFuZhuangTai', query: { orderId: res.data.data.orderId, bettingId: res.data.data.bettingId, routerName: 'ZuQiu' } })
247
+        this.GetCurrentUserInfo().then(() => {
248
+          this.$router.push({ name: 'DingDanZhiFuZhuangTai', query: { orderId: res.data.data.orderId, bettingId: res.data.data.bettingId, routerName: 'ZuQiu' } })
249
+        })
238
       }).catch((res) => {
250
       }).catch((res) => {
239
         this.Toast(res.data.message)
251
         this.Toast(res.data.message)
240
         this.DataLock = false
252
         this.DataLock = false

+ 1
- 1
src/store/user/index.js 查看文件

123
   actions: {
123
   actions: {
124
     GetCurrentUserInfo (context, payload) { // 获取当前用户信息
124
     GetCurrentUserInfo (context, payload) { // 获取当前用户信息
125
       return new Promise((resolve, reject) => {
125
       return new Promise((resolve, reject) => {
126
-        ToolClass.Axios(resolve, reject, Api.GetCurrentUserInfo, context, payload, 1000)
126
+        ToolClass.Axios(resolve, reject, Api.GetCurrentUserInfo, context, payload, 1000, 'UpdateUserInfo')
127
       })
127
       })
128
     },
128
     },
129
     BindAliAccount (context, payload) { // 绑定支付宝
129
     BindAliAccount (context, payload) { // 绑定支付宝