Browse Source

静态页面

1002884655 4 years ago
parent
commit
9c1e3a83aa
3 changed files with 24 additions and 3 deletions
  1. 11
    1
      src/pages/index/LanQiu/index.vue
  2. 12
    1
      src/pages/index/ZuQiu/index.vue
  3. 1
    1
      src/util/Api.js

+ 11
- 1
src/pages/index/LanQiu/index.vue View File

@@ -38,6 +38,8 @@
38 38
             <div>
39 39
               <div class="SelectArea">
40 40
 
41
+                <span style="color: #999;display: block;text-align: center;line-height: 0.4rem;">{{NoData === null ? '正在请求比赛数据...' : NoData ? '暂无比赛' : ''}}</span>
42
+
41 43
                 <!-- 过关-混合投注 -->
42 44
                 <div class="GuoGuanHunHeTouZhu" v-if="SelectType === 1">
43 45
                   <LanQiuGuoGuanHunHeTouZhu v-if="MixData.length" :Data="MixData" @Change="ResChange"></LanQiuGuoGuanHunHeTouZhu>
@@ -117,6 +119,7 @@ export default {
117 119
   name: '',
118 120
   data () {
119 121
     return {
122
+      NoData: null,
120 123
       MainTitle: '',
121 124
       SelectTypeData: {
122 125
         GuoGuan: {
@@ -178,8 +181,13 @@ export default {
178 181
     ]),
179 182
     Init () { // 初始化
180 183
       this.MainTitle = '混合投注(过关)'
181
-      this.GetMixData({ queryData: { lottery: 'basketball' } }).then((res) => {
184
+      this.ToGetPageList()
185
+    },
186
+    ToGetPageList (type = 'pass') {
187
+      this.NoData = null
188
+      this.GetMixData({ queryData: { lottery: 'basketball', passType: type } }).then((res) => {
182 189
         this.MixData = res.data.data || []
190
+        this.NoData = !this.MixData.length
183 191
       })
184 192
     },
185 193
     ToBetting () { // 去投注
@@ -220,6 +228,8 @@ export default {
220 228
       this.SelectType = item.Id
221 229
       this.MainTitle = `${item.Name}(${this.SelectType > 5 ? '单关' : '过关'})`
222 230
       this.EmptyAllData() // 清除数据
231
+      this.MixData = []
232
+      this.ToGetPageList(this.SelectType > 5 ? 'single' : 'pass')
223 233
       this.ShowSelectTypeNav = false
224 234
     },
225 235
     MainTitleClick () {

+ 12
- 1
src/pages/index/ZuQiu/index.vue View File

@@ -39,6 +39,8 @@
39 39
             <div>
40 40
               <div class="SelectArea">
41 41
 
42
+                <span style="color: #999;display: block;text-align: center;line-height: 0.4rem;">{{NoData === null ? '正在请求比赛数据...' : NoData ? '暂无比赛' : ''}}</span>
43
+
42 44
                 <!-- 过关-混合投注 -->
43 45
                 <div class="GuoGuanHunHeTouZhu" v-if="SelectType === 1">
44 46
                   <ZuQiuGuoGuanHunHeTouZhu v-if="MixData.length" :Data="MixData" @Change="ResChange"></ZuQiuGuoGuanHunHeTouZhu>
@@ -119,6 +121,7 @@ export default {
119 121
   name: '',
120 122
   data () {
121 123
     return {
124
+      NoData: null,
122 125
       PageTitle: '',
123 126
       SelectTypeData: {
124 127
         GuoGuan: {
@@ -184,8 +187,14 @@ export default {
184 187
       'EmptyZuQiuCart'
185 188
     ]),
186 189
     Init () { // 初始化
187
-      this.GetMixData({ queryData: { lottery: 'football' } }).then((res) => {
190
+      this.MainTitle = '混合投注(过关)'
191
+      this.ToGetPageList()
192
+    },
193
+    ToGetPageList (type = 'pass') {
194
+      this.NoData = null
195
+      this.GetMixData({ queryData: { lottery: 'football', passType: type } }).then((res) => {
188 196
         this.MixData = res.data.data || []
197
+        this.NoData = !this.MixData.length
189 198
       })
190 199
     },
191 200
     ToBetting () { // 去投注
@@ -226,6 +235,8 @@ export default {
226 235
       this.SelectType = item.Id
227 236
       this.PageTitle = `${item.Name}(${this.SelectType > 5 ? '单关' : '过关'})`
228 237
       this.EmptyAllData() // 清除数据
238
+      this.MixData = []
239
+      this.ToGetPageList(this.SelectType > 5 ? 'single' : 'pass')
229 240
       this.ShowSelectTypeNav = false
230 241
     },
231 242
     MainTitleClick () {

+ 1
- 1
src/util/Api.js View File

@@ -88,7 +88,7 @@ const $api = {
88 88
   },
89 89
   GetMixData: { // 获取混合比赛数据
90 90
     method: 'get',
91
-    url: `${prefix}/app/sport/mix-match`
91
+    url: `${prefix}/app/sport/current`
92 92
   },
93 93
   ImgUpload: { // 图片上传
94 94
     method: 'post',