浏览代码

静态页面

1002884655 4 年前
父节点
当前提交
9c1e3a83aa
共有 3 个文件被更改,包括 24 次插入3 次删除
  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 查看文件

38
             <div>
38
             <div>
39
               <div class="SelectArea">
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
                 <div class="GuoGuanHunHeTouZhu" v-if="SelectType === 1">
44
                 <div class="GuoGuanHunHeTouZhu" v-if="SelectType === 1">
43
                   <LanQiuGuoGuanHunHeTouZhu v-if="MixData.length" :Data="MixData" @Change="ResChange"></LanQiuGuoGuanHunHeTouZhu>
45
                   <LanQiuGuoGuanHunHeTouZhu v-if="MixData.length" :Data="MixData" @Change="ResChange"></LanQiuGuoGuanHunHeTouZhu>
117
   name: '',
119
   name: '',
118
   data () {
120
   data () {
119
     return {
121
     return {
122
+      NoData: null,
120
       MainTitle: '',
123
       MainTitle: '',
121
       SelectTypeData: {
124
       SelectTypeData: {
122
         GuoGuan: {
125
         GuoGuan: {
178
     ]),
181
     ]),
179
     Init () { // 初始化
182
     Init () { // 初始化
180
       this.MainTitle = '混合投注(过关)'
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
         this.MixData = res.data.data || []
189
         this.MixData = res.data.data || []
190
+        this.NoData = !this.MixData.length
183
       })
191
       })
184
     },
192
     },
185
     ToBetting () { // 去投注
193
     ToBetting () { // 去投注
220
       this.SelectType = item.Id
228
       this.SelectType = item.Id
221
       this.MainTitle = `${item.Name}(${this.SelectType > 5 ? '单关' : '过关'})`
229
       this.MainTitle = `${item.Name}(${this.SelectType > 5 ? '单关' : '过关'})`
222
       this.EmptyAllData() // 清除数据
230
       this.EmptyAllData() // 清除数据
231
+      this.MixData = []
232
+      this.ToGetPageList(this.SelectType > 5 ? 'single' : 'pass')
223
       this.ShowSelectTypeNav = false
233
       this.ShowSelectTypeNav = false
224
     },
234
     },
225
     MainTitleClick () {
235
     MainTitleClick () {

+ 12
- 1
src/pages/index/ZuQiu/index.vue 查看文件

39
             <div>
39
             <div>
40
               <div class="SelectArea">
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
                 <div class="GuoGuanHunHeTouZhu" v-if="SelectType === 1">
45
                 <div class="GuoGuanHunHeTouZhu" v-if="SelectType === 1">
44
                   <ZuQiuGuoGuanHunHeTouZhu v-if="MixData.length" :Data="MixData" @Change="ResChange"></ZuQiuGuoGuanHunHeTouZhu>
46
                   <ZuQiuGuoGuanHunHeTouZhu v-if="MixData.length" :Data="MixData" @Change="ResChange"></ZuQiuGuoGuanHunHeTouZhu>
119
   name: '',
121
   name: '',
120
   data () {
122
   data () {
121
     return {
123
     return {
124
+      NoData: null,
122
       PageTitle: '',
125
       PageTitle: '',
123
       SelectTypeData: {
126
       SelectTypeData: {
124
         GuoGuan: {
127
         GuoGuan: {
184
       'EmptyZuQiuCart'
187
       'EmptyZuQiuCart'
185
     ]),
188
     ]),
186
     Init () { // 初始化
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
         this.MixData = res.data.data || []
196
         this.MixData = res.data.data || []
197
+        this.NoData = !this.MixData.length
189
       })
198
       })
190
     },
199
     },
191
     ToBetting () { // 去投注
200
     ToBetting () { // 去投注
226
       this.SelectType = item.Id
235
       this.SelectType = item.Id
227
       this.PageTitle = `${item.Name}(${this.SelectType > 5 ? '单关' : '过关'})`
236
       this.PageTitle = `${item.Name}(${this.SelectType > 5 ? '单关' : '过关'})`
228
       this.EmptyAllData() // 清除数据
237
       this.EmptyAllData() // 清除数据
238
+      this.MixData = []
239
+      this.ToGetPageList(this.SelectType > 5 ? 'single' : 'pass')
229
       this.ShowSelectTypeNav = false
240
       this.ShowSelectTypeNav = false
230
     },
241
     },
231
     MainTitleClick () {
242
     MainTitleClick () {

+ 1
- 1
src/util/Api.js 查看文件

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