瀏覽代碼

静态页面

1002884655 4 年之前
父節點
當前提交
a77e07c455
共有 38 個文件被更改,包括 717 次插入233 次删除
  1. 1
    1
      config/index.js
  2. 1
    1
      src/components/index/LanQiuDanGuanDaXiaoFen/index.vue
  3. 1
    1
      src/components/index/LanQiuDanGuanRangFenShengFu/index.vue
  4. 1
    1
      src/components/index/LanQiuDanGuanShengFu/index.vue
  5. 1
    1
      src/components/index/LanQiuGuoGuanDaXiaoFen/index.vue
  6. 1
    1
      src/components/index/LanQiuGuoGuanHunHeTouZhu/index.vue
  7. 1
    1
      src/components/index/LanQiuGuoGuanRangFenShengFu/index.vue
  8. 1
    1
      src/components/index/LanQiuGuoGuanShengFu/index.vue
  9. 4
    1
      src/components/index/LqgghhtzDaXiaoFen/index.vue
  10. 5
    2
      src/components/index/LqgghhtzDaXiaoFenItem/index.vue
  11. 4
    1
      src/components/index/LqgghhtzRangFenShengFu/index.vue
  12. 3
    0
      src/components/index/LqgghhtzShengFenCha/index.vue
  13. 4
    1
      src/components/index/LqgghhtzShengFu/index.vue
  14. 4
    1
      src/components/index/LqgghhtzShengFuItem/index.vue
  15. 4
    1
      src/components/index/ZqdghhtzShengPingFu/index.vue
  16. 3
    0
      src/components/index/ZqgghhtzBanQuanChang/index.vue
  17. 4
    1
      src/components/index/ZqgghhtzBanQuanChangItem/index.vue
  18. 3
    0
      src/components/index/ZqgghhtzBiFen/index.vue
  19. 3
    0
      src/components/index/ZqgghhtzJinQiuShu/index.vue
  20. 4
    1
      src/components/index/ZqgghhtzJinQiuShuItem/index.vue
  21. 4
    1
      src/components/index/ZqgghhtzShengPingFu/index.vue
  22. 4
    1
      src/components/index/ZqgghhtzShengPingFuItem/index.vue
  23. 1
    1
      src/components/index/ZuQiuDanGuanBanQuanChang/index.vue
  24. 1
    1
      src/components/index/ZuQiuDanGuanJinQiuShu/index.vue
  25. 1
    1
      src/components/index/ZuQiuDanGuanShengPingFu/index.vue
  26. 1
    1
      src/components/index/ZuQiuGuoGuanBanQuanChang/index.vue
  27. 1
    1
      src/components/index/ZuQiuGuoGuanHunHeTouZhu/index.vue
  28. 1
    1
      src/components/index/ZuQiuGuoGuanJinQiuShu/index.vue
  29. 1
    1
      src/components/index/ZuQiuGuoGuanShengPingFu/index.vue
  30. 23
    13
      src/pages/KaiJiangZhanShi/DaLeTouXiangQing/index.vue
  31. 52
    25
      src/pages/KaiJiangZhanShi/ShuangSeQiu/index.vue
  32. 23
    12
      src/pages/KaiJiangZhanShi/ShuangSeQiuXiangQing/index.vue
  33. 76
    10
      src/pages/index/LanQiuDingDan/index.vue
  34. 24
    1
      src/pages/index/ZuQiu/index.vue
  35. 123
    144
      src/pages/index/ZuQiuDingDan/index.vue
  36. 324
    0
      src/pages/index/ZuQiuDingDan/page.scss
  37. 4
    0
      src/router/index.js
  38. 0
    2
      src/util/Basketball.js

+ 1
- 1
config/index.js 查看文件

12
     assetsPublicPath: '/',
12
     assetsPublicPath: '/',
13
     proxyTable: {
13
     proxyTable: {
14
       '/api': {
14
       '/api': {
15
-        target: 'http://127.0.0.1:8080',
15
+        target: 'http://123.57.65.31:9004',
16
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
16
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
17
         pathRewrite: { '^/api': '/api' }
17
         pathRewrite: { '^/api': '/api' }
18
       }
18
       }

+ 1
- 1
src/components/index/LanQiuDanGuanDaXiaoFen/index.vue 查看文件

12
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
12
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
13
         </div>
13
         </div>
14
         <div class="Detail">
14
         <div class="Detail">
15
-          <LqgghhtzDaXiaoFenItem :Id="item.matchId" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :ScoreData="item.playOdds['bst-score']" @SelectItem="SelectItem"></LqgghhtzDaXiaoFenItem>
15
+          <LqgghhtzDaXiaoFenItem :Id="item.matchId" :ListId="item.matchWeek" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :ScoreData="item.playOdds['bst-score']" @SelectItem="SelectItem"></LqgghhtzDaXiaoFenItem>
16
         </div>
16
         </div>
17
       </li>
17
       </li>
18
     </ul>
18
     </ul>

+ 1
- 1
src/components/index/LanQiuDanGuanRangFenShengFu/index.vue 查看文件

12
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
12
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
13
         </div>
13
         </div>
14
         <div class="Detail">
14
         <div class="Detail">
15
-          <LqgghhtzRangFenShengFu :Id="item.matchId" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :WlsData="item.playOdds['bst-wls']" @SelectItem="SelectItem"></LqgghhtzRangFenShengFu>
15
+          <LqgghhtzRangFenShengFu :Id="item.matchId" :ListId="item.matchWeek" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :WlsData="item.playOdds['bst-wls']" @SelectItem="SelectItem"></LqgghhtzRangFenShengFu>
16
         </div>
16
         </div>
17
       </li>
17
       </li>
18
     </ul>
18
     </ul>

+ 1
- 1
src/components/index/LanQiuDanGuanShengFu/index.vue 查看文件

12
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
12
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
13
         </div>
13
         </div>
14
         <div class="Detail">
14
         <div class="Detail">
15
-          <LqgghhtzShengFuItem :Id="item.matchId" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :WlData="item.playOdds['bst-wl']" @SelectItem="SelectItem"></LqgghhtzShengFuItem>
15
+          <LqgghhtzShengFuItem :Id="item.matchId" :ListId="item.matchWeek" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :WlData="item.playOdds['bst-wl']" @SelectItem="SelectItem"></LqgghhtzShengFuItem>
16
         </div>
16
         </div>
17
       </li>
17
       </li>
18
     </ul>
18
     </ul>

+ 1
- 1
src/components/index/LanQiuGuoGuanDaXiaoFen/index.vue 查看文件

12
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
12
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
13
         </div>
13
         </div>
14
         <div class="Detail">
14
         <div class="Detail">
15
-          <LqgghhtzDaXiaoFenItem :Id="item.matchId" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :ScoreData="item.playOdds['bst-score']" @SelectItem="SelectItem"></LqgghhtzDaXiaoFenItem>
15
+          <LqgghhtzDaXiaoFenItem :Id="item.matchId" :ListId="item.matchWeek" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :ScoreData="item.playOdds['bst-score']" @SelectItem="SelectItem"></LqgghhtzDaXiaoFenItem>
16
         </div>
16
         </div>
17
       </li>
17
       </li>
18
     </ul>
18
     </ul>

+ 1
- 1
src/components/index/LanQiuGuoGuanHunHeTouZhu/index.vue 查看文件

11
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
11
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
12
         </div>
12
         </div>
13
         <div class="Detail">
13
         <div class="Detail">
14
-          <LqgghhtzShengFu :MoreSelect="item.MoreSelect" :Id="item.matchId" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :WlData="item.playOdds['bst-wl']" :WlsData="item.playOdds['bst-wls']" @SelectItem="SelectItem" @ShowMore="ToShowMore"></LqgghhtzShengFu>
14
+          <LqgghhtzShengFu :MoreSelect="item.MoreSelect" :Id="item.matchId" :ListId="item.matchWeek" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :WlData="item.playOdds['bst-wl']" :WlsData="item.playOdds['bst-wls']" @SelectItem="SelectItem" @ShowMore="ToShowMore"></LqgghhtzShengFu>
15
         </div>
15
         </div>
16
       </li>
16
       </li>
17
     </ul>
17
     </ul>

+ 1
- 1
src/components/index/LanQiuGuoGuanRangFenShengFu/index.vue 查看文件

12
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
12
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
13
         </div>
13
         </div>
14
         <div class="Detail">
14
         <div class="Detail">
15
-          <LqgghhtzRangFenShengFu :Id="item.matchId" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :WlsData="item.playOdds['bst-wls']" @SelectItem="SelectItem"></LqgghhtzRangFenShengFu>
15
+          <LqgghhtzRangFenShengFu :Id="item.matchId" :ListId="item.matchWeek" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :WlsData="item.playOdds['bst-wls']" @SelectItem="SelectItem"></LqgghhtzRangFenShengFu>
16
         </div>
16
         </div>
17
       </li>
17
       </li>
18
     </ul>
18
     </ul>

+ 1
- 1
src/components/index/LanQiuGuoGuanShengFu/index.vue 查看文件

12
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
12
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
13
         </div>
13
         </div>
14
         <div class="Detail">
14
         <div class="Detail">
15
-          <LqgghhtzShengFuItem :Id="item.matchId" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :WlData="item.playOdds['bst-wl']" @SelectItem="SelectItem"></LqgghhtzShengFuItem>
15
+          <LqgghhtzShengFuItem :Id="item.matchId" :ListId="item.matchWeek" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :WlData="item.playOdds['bst-wl']" @SelectItem="SelectItem"></LqgghhtzShengFuItem>
16
         </div>
16
         </div>
17
       </li>
17
       </li>
18
     </ul>
18
     </ul>

+ 4
- 1
src/components/index/LqgghhtzDaXiaoFen/index.vue 查看文件

25
     PresetPoints: {
25
     PresetPoints: {
26
       default: 0
26
       default: 0
27
     },
27
     },
28
+    ListId: {
29
+      default: null
30
+    },
28
     Id: {
31
     Id: {
29
       default: null
32
       default: null
30
     },
33
     },
74
     SelectItem (item, index, key) { // 选择投注
77
     SelectItem (item, index, key) { // 选择投注
75
       if (item.Active !== null) {
78
       if (item.Active !== null) {
76
         item.Active = !item.Active
79
         item.Active = !item.Active
77
-        this.$emit('SelectItem', { pIndex: this.Index, value: item.Active, key, cIndex: index, id: this.Id, target: item, homeTeamName: this.HomeTeamName, awayTeamName: this.AwayTeamName, homeTeamId: this.HomeTeamId, awayTeamId: this.AwayTeamId })
80
+        this.$emit('SelectItem', { pIndex: this.Index, value: item.Active, key, cIndex: index === 2 ? 1 : index, id: this.Id, target: item, homeTeamName: this.HomeTeamName, awayTeamName: this.AwayTeamName, homeTeamId: this.HomeTeamId, awayTeamId: this.AwayTeamId })
78
       }
81
       }
79
     }
82
     }
80
   }
83
   }

+ 5
- 2
src/components/index/LqgghhtzDaXiaoFenItem/index.vue 查看文件

1
 <template>
1
 <template>
2
   <div class="components LqgghhtzDaXiaoFenItem flex-h">
2
   <div class="components LqgghhtzDaXiaoFenItem flex-h">
3
-    <span>{{Id}}</span>
3
+    <span>{{ListId}}</span>
4
     <div class="flex-item flex-h">
4
     <div class="flex-item flex-h">
5
       <div class="flex-item flex-h">
5
       <div class="flex-item flex-h">
6
         <a class="flex-item" v-for="(item, index) in PageScoreData" :key="index" :class="{'active': item.Active}" @click="SelectItem(item, index, 'bst-score')">
6
         <a class="flex-item" v-for="(item, index) in PageScoreData" :key="index" :class="{'active': item.Active}" @click="SelectItem(item, index, 'bst-score')">
22
     PresetPoints: {
22
     PresetPoints: {
23
       default: 0
23
       default: 0
24
     },
24
     },
25
+    ListId: {
26
+      default: null
27
+    },
25
     Id: {
28
     Id: {
26
       default: null
29
       default: null
27
     },
30
     },
71
     SelectItem (item, index, key) { // 选择投注
74
     SelectItem (item, index, key) { // 选择投注
72
       if (item.Active !== null) {
75
       if (item.Active !== null) {
73
         item.Active = !item.Active
76
         item.Active = !item.Active
74
-        this.$emit('SelectItem', { pIndex: this.Index, value: item.Active, key, cIndex: index, id: this.Id, target: item, homeTeamName: this.HomeTeamName, awayTeamName: this.AwayTeamName, homeTeamId: this.HomeTeamId, awayTeamId: this.AwayTeamId })
77
+        this.$emit('SelectItem', { pIndex: this.Index, value: item.Active, key, cIndex: index === 2 ? 1 : index, id: this.Id, target: item, homeTeamName: this.HomeTeamName, awayTeamName: this.AwayTeamName, homeTeamId: this.HomeTeamId, awayTeamId: this.AwayTeamId })
75
       }
78
       }
76
     }
79
     }
77
   }
80
   }

+ 4
- 1
src/components/index/LqgghhtzRangFenShengFu/index.vue 查看文件

1
 <template>
1
 <template>
2
   <div class="components LqgghhtzRangFenShengFu flex-h">
2
   <div class="components LqgghhtzRangFenShengFu flex-h">
3
-    <span>{{Id}}</span>
3
+    <span>{{ListId}}</span>
4
     <div class="flex-item flex-h">
4
     <div class="flex-item flex-h">
5
       <div class="flex-item flex-h">
5
       <div class="flex-item flex-h">
6
         <a class="flex-item" v-for="(item, index) in PageWlsData" :key="index" :class="{'active': item.Active}" @click="SelectItem(item, index, 'bst-wls')">
6
         <a class="flex-item" v-for="(item, index) in PageWlsData" :key="index" :class="{'active': item.Active}" @click="SelectItem(item, index, 'bst-wls')">
19
 export default {
19
 export default {
20
   name: 'LqgghhtzRangFenShengFu',
20
   name: 'LqgghhtzRangFenShengFu',
21
   props: {
21
   props: {
22
+    ListId: {
23
+      default: null
24
+    },
22
     Id: {
25
     Id: {
23
       default: null
26
       default: null
24
     },
27
     },

+ 3
- 0
src/components/index/LqgghhtzShengFenCha/index.vue 查看文件

43
 export default {
43
 export default {
44
   name: 'LqgghhtzShengFenCha',
44
   name: 'LqgghhtzShengFenCha',
45
   props: {
45
   props: {
46
+    ListId: {
47
+      default: null
48
+    },
46
     Id: {
49
     Id: {
47
       default: null
50
       default: null
48
     },
51
     },

+ 4
- 1
src/components/index/LqgghhtzShengFu/index.vue 查看文件

1
 <template>
1
 <template>
2
   <div class="components LqgghhtzShengFu flex-h">
2
   <div class="components LqgghhtzShengFu flex-h">
3
-    <span>{{Id}}</span>
3
+    <span>{{ListId}}</span>
4
     <div class="flex-item flex-h">
4
     <div class="flex-item flex-h">
5
       <div class="flex-item">
5
       <div class="flex-item">
6
         <div class="flex-h">
6
         <div class="flex-h">
25
     MoreSelect: {
25
     MoreSelect: {
26
       default: false
26
       default: false
27
     },
27
     },
28
+    ListId: {
29
+      default: null
30
+    },
28
     Id: {
31
     Id: {
29
       default: null
32
       default: null
30
     },
33
     },

+ 4
- 1
src/components/index/LqgghhtzShengFuItem/index.vue 查看文件

1
 <template>
1
 <template>
2
   <div class="components LqgghhtzShengFuItem flex-h">
2
   <div class="components LqgghhtzShengFuItem flex-h">
3
-    <span>{{Id}}</span>
3
+    <span>{{ListId}}</span>
4
     <div class="flex-item flex-h">
4
     <div class="flex-item flex-h">
5
       <div class="flex-item flex-h">
5
       <div class="flex-item flex-h">
6
         <a class="flex-item" v-for="(item, index) in PageWlData" :key="index" :class="{'active': item.Active}" @click="SelectItem(item, index, 'bst-wl')">
6
         <a class="flex-item" v-for="(item, index) in PageWlData" :key="index" :class="{'active': item.Active}" @click="SelectItem(item, index, 'bst-wl')">
19
 export default {
19
 export default {
20
   name: 'LqgghhtzShengFuItem',
20
   name: 'LqgghhtzShengFuItem',
21
   props: {
21
   props: {
22
+    ListId: {
23
+      default: null
24
+    },
22
     Id: {
25
     Id: {
23
       default: null
26
       default: null
24
     },
27
     },

+ 4
- 1
src/components/index/ZqdghhtzShengPingFu/index.vue 查看文件

1
 <template>
1
 <template>
2
   <div class="components ZqdghhtzShengPingFu flex-h">
2
   <div class="components ZqdghhtzShengPingFu flex-h">
3
-    <span>{{Id}}</span>
3
+    <span>{{ListId}}</span>
4
     <div class="flex-item flex-h">
4
     <div class="flex-item flex-h">
5
       <div class="flex-item">
5
       <div class="flex-item">
6
         <div class="flex-h">
6
         <div class="flex-h">
24
     SpreadPoints: {
24
     SpreadPoints: {
25
       default: null
25
       default: null
26
     },
26
     },
27
+    ListId: {
28
+      default: null
29
+    },
27
     Id: {
30
     Id: {
28
       default: null
31
       default: null
29
     },
32
     },

+ 3
- 0
src/components/index/ZqgghhtzBanQuanChang/index.vue 查看文件

34
 export default {
34
 export default {
35
   name: 'ZqgghhtzBanQuanChang',
35
   name: 'ZqgghhtzBanQuanChang',
36
   props: {
36
   props: {
37
+    ListId: {
38
+      default: null
39
+    },
37
     Id: {
40
     Id: {
38
       default: null
41
       default: null
39
     },
42
     },

+ 4
- 1
src/components/index/ZqgghhtzBanQuanChangItem/index.vue 查看文件

1
 <template>
1
 <template>
2
   <div class="components ZqgghhtzBanQuanChangItem flex-h">
2
   <div class="components ZqgghhtzBanQuanChangItem flex-h">
3
-    <span>{{Id}}</span>
3
+    <span>{{ListId}}</span>
4
     <div class="flex-item flex-h">
4
     <div class="flex-item flex-h">
5
       <div class="flex-item">
5
       <div class="flex-item">
6
         <div class="flex-h">
6
         <div class="flex-h">
33
 export default {
33
 export default {
34
   name: 'ZqgghhtzBanQuanChangItem',
34
   name: 'ZqgghhtzBanQuanChangItem',
35
   props: {
35
   props: {
36
+    ListId: {
37
+      default: null
38
+    },
36
     Id: {
39
     Id: {
37
       default: null
40
       default: null
38
     },
41
     },

+ 3
- 0
src/components/index/ZqgghhtzBiFen/index.vue 查看文件

64
 export default {
64
 export default {
65
   name: 'ZqgghhtzBiFen',
65
   name: 'ZqgghhtzBiFen',
66
   props: {
66
   props: {
67
+    ListId: {
68
+      default: null
69
+    },
67
     Id: {
70
     Id: {
68
       default: null
71
       default: null
69
     },
72
     },

+ 3
- 0
src/components/index/ZqgghhtzJinQiuShu/index.vue 查看文件

28
 export default {
28
 export default {
29
   name: 'ZqgghhtzJinQiuShu',
29
   name: 'ZqgghhtzJinQiuShu',
30
   props: {
30
   props: {
31
+    ListId: {
32
+      default: null
33
+    },
31
     Id: {
34
     Id: {
32
       default: null
35
       default: null
33
     },
36
     },

+ 4
- 1
src/components/index/ZqgghhtzJinQiuShuItem/index.vue 查看文件

1
 <template>
1
 <template>
2
   <div class="components ZqgghhtzJinQiuShuItem flex-h">
2
   <div class="components ZqgghhtzJinQiuShuItem flex-h">
3
-    <span>{{Id}}</span>
3
+    <span>{{ListId}}</span>
4
     <div class="flex-item flex-h">
4
     <div class="flex-item flex-h">
5
       <div class="flex-item">
5
       <div class="flex-item">
6
         <div class="flex-h">
6
         <div class="flex-h">
27
 export default {
27
 export default {
28
   name: 'ZqgghhtzJinQiuShuItem',
28
   name: 'ZqgghhtzJinQiuShuItem',
29
   props: {
29
   props: {
30
+    ListId: {
31
+      default: null
32
+    },
30
     Id: {
33
     Id: {
31
       default: null
34
       default: null
32
     },
35
     },

+ 4
- 1
src/components/index/ZqgghhtzShengPingFu/index.vue 查看文件

1
 <template>
1
 <template>
2
   <div class="components ZqgghhtzShengPingFu flex-h">
2
   <div class="components ZqgghhtzShengPingFu flex-h">
3
-    <span>{{Id}}</span>
3
+    <span>{{ListId}}</span>
4
     <div class="flex-item flex-h">
4
     <div class="flex-item flex-h">
5
       <div class="flex-item">
5
       <div class="flex-item">
6
         <div class="flex-h">
6
         <div class="flex-h">
30
     SpreadPoints: {
30
     SpreadPoints: {
31
       default: null
31
       default: null
32
     },
32
     },
33
+    ListId: {
34
+      default: null
35
+    },
33
     Id: {
36
     Id: {
34
       default: null
37
       default: null
35
     },
38
     },

+ 4
- 1
src/components/index/ZqgghhtzShengPingFuItem/index.vue 查看文件

1
 <template>
1
 <template>
2
   <div class="components ZqgghhtzShengPingFuItem flex-h">
2
   <div class="components ZqgghhtzShengPingFuItem flex-h">
3
-    <span>{{Id}}</span>
3
+    <span>{{ListId}}</span>
4
     <div class="flex-item flex-h">
4
     <div class="flex-item flex-h">
5
       <div class="flex-item">
5
       <div class="flex-item">
6
         <div class="flex-h">
6
         <div class="flex-h">
21
 export default {
21
 export default {
22
   name: 'ZqgghhtzShengPingFuItem',
22
   name: 'ZqgghhtzShengPingFuItem',
23
   props: {
23
   props: {
24
+    ListId: {
25
+      default: null
26
+    },
24
     Id: {
27
     Id: {
25
       default: null
28
       default: null
26
     },
29
     },

+ 1
- 1
src/components/index/ZuQiuDanGuanBanQuanChang/index.vue 查看文件

11
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
11
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
12
         </div>
12
         </div>
13
         <div class="Detail">
13
         <div class="Detail">
14
-          <ZqgghhtzBanQuanChangItem :Id="item.matchId" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :DoubleData="item.playOdds['ft-double']" @SelectItem="SelectItem"></ZqgghhtzBanQuanChangItem>
14
+          <ZqgghhtzBanQuanChangItem :Id="item.matchId" :ListId="item.matchWeek" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :DoubleData="item.playOdds['ft-double']" @SelectItem="SelectItem"></ZqgghhtzBanQuanChangItem>
15
         </div>
15
         </div>
16
       </li>
16
       </li>
17
     </ul>
17
     </ul>

+ 1
- 1
src/components/index/ZuQiuDanGuanJinQiuShu/index.vue 查看文件

11
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
11
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
12
         </div>
12
         </div>
13
         <div class="Detail">
13
         <div class="Detail">
14
-          <ZqgghhtzJinQiuShuItem :Id="item.matchId" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :PointsData="item.playOdds['ft-points']" @SelectItem="SelectItem"></ZqgghhtzJinQiuShuItem>
14
+          <ZqgghhtzJinQiuShuItem :Id="item.matchId" :ListId="item.matchWeek" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :PointsData="item.playOdds['ft-points']" @SelectItem="SelectItem"></ZqgghhtzJinQiuShuItem>
15
         </div>
15
         </div>
16
       </li>
16
       </li>
17
     </ul>
17
     </ul>

+ 1
- 1
src/components/index/ZuQiuDanGuanShengPingFu/index.vue 查看文件

11
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
11
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
12
         </div>
12
         </div>
13
         <div class="Detail">
13
         <div class="Detail">
14
-          <ZqdghhtzShengPingFu :Id="item.matchId" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :WdlData="item.playOdds['ft-wdl']" @SelectItem="SelectItem"></ZqdghhtzShengPingFu>
14
+          <ZqdghhtzShengPingFu :Id="item.matchId" :ListId="item.matchWeek" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :WdlData="item.playOdds['ft-wdl']" @SelectItem="SelectItem"></ZqdghhtzShengPingFu>
15
         </div>
15
         </div>
16
       </li>
16
       </li>
17
     </ul>
17
     </ul>

+ 1
- 1
src/components/index/ZuQiuGuoGuanBanQuanChang/index.vue 查看文件

11
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
11
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
12
         </div>
12
         </div>
13
         <div class="Detail">
13
         <div class="Detail">
14
-          <ZqgghhtzBanQuanChangItem :Id="item.matchId" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :DoubleData="item.playOdds['ft-double']" @SelectItem="SelectItem"></ZqgghhtzBanQuanChangItem>
14
+          <ZqgghhtzBanQuanChangItem :Id="item.matchId" :ListId="item.matchWeek" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :DoubleData="item.playOdds['ft-double']" @SelectItem="SelectItem"></ZqgghhtzBanQuanChangItem>
15
         </div>
15
         </div>
16
       </li>
16
       </li>
17
     </ul>
17
     </ul>

+ 1
- 1
src/components/index/ZuQiuGuoGuanHunHeTouZhu/index.vue 查看文件

11
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
11
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
12
         </div>
12
         </div>
13
         <div class="Detail">
13
         <div class="Detail">
14
-          <ZqgghhtzShengPingFu :MoreSelect="item.MoreSelect" :Id="item.matchId" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :SpreadPoints="item.spreadPoints" :WdlData="item.playOdds['ft-wdl']" :WdlsData="item.playOdds['ft-wdls']" @SelectItem="SelectItem" @ShowMore="ToShowMore"></ZqgghhtzShengPingFu>
14
+          <ZqgghhtzShengPingFu :MoreSelect="item.MoreSelect" :Id="item.matchId" :ListId="item.matchWeek" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :SpreadPoints="item.spreadPoints" :WdlData="item.playOdds['ft-wdl']" :WdlsData="item.playOdds['ft-wdls']" @SelectItem="SelectItem" @ShowMore="ToShowMore"></ZqgghhtzShengPingFu>
15
         </div>
15
         </div>
16
       </li>
16
       </li>
17
     </ul>
17
     </ul>

+ 1
- 1
src/components/index/ZuQiuGuoGuanJinQiuShu/index.vue 查看文件

11
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
11
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
12
         </div>
12
         </div>
13
         <div class="Detail">
13
         <div class="Detail">
14
-          <ZqgghhtzJinQiuShuItem :Id="item.matchId" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :PointsData="item.playOdds['ft-points']" @SelectItem="SelectItem"></ZqgghhtzJinQiuShuItem>
14
+          <ZqgghhtzJinQiuShuItem :Id="item.matchId" :ListId="item.matchWeek" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :PointsData="item.playOdds['ft-points']" @SelectItem="SelectItem"></ZqgghhtzJinQiuShuItem>
15
         </div>
15
         </div>
16
       </li>
16
       </li>
17
     </ul>
17
     </ul>

+ 1
- 1
src/components/index/ZuQiuGuoGuanShengPingFu/index.vue 查看文件

11
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
11
           <span>{{item.leagueName}}<em>{{item.matchTime}}(截)</em></span>
12
         </div>
12
         </div>
13
         <div class="Detail">
13
         <div class="Detail">
14
-          <ZqgghhtzShengPingFuItem :Id="item.matchId" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :WdlData="item.playOdds['ft-wdl']" :WdlsData="item.playOdds['ft-wdls']" @SelectItem="SelectItem"></ZqgghhtzShengPingFuItem>
14
+          <ZqgghhtzShengPingFuItem :Id="item.matchId" :ListId="item.matchWeek" :HomeTeamName="item.homeTeamName" :AwayTeamName="item.awayTeamName" :HomeTeamId="item.homeTeamId" :AwayTeamId="item.awayTeamId" :Index="index" :WdlData="item.playOdds['ft-wdl']" :WdlsData="item.playOdds['ft-wdls']" @SelectItem="SelectItem"></ZqgghhtzShengPingFuItem>
15
         </div>
15
         </div>
16
       </li>
16
       </li>
17
     </ul>
17
     </ul>

+ 23
- 13
src/pages/KaiJiangZhanShi/DaLeTouXiangQing/index.vue 查看文件

1
 <template>
1
 <template>
2
   <div class="Page">
2
   <div class="Page">
3
     <!-- 开奖信息 -->
3
     <!-- 开奖信息 -->
4
-    <div class="PrizeInfo">
4
+    <div class="PrizeInfo" v-if="PageData !== null">
5
       <div class="flex-h">
5
       <div class="flex-h">
6
         <div class="Icon">
6
         <div class="Icon">
7
           <img src="../../../assets/img/icon4.png" class="centerLabel cover" alt="">
7
           <img src="../../../assets/img/icon4.png" class="centerLabel cover" alt="">
9
         <span>大乐透</span>
9
         <span>大乐透</span>
10
         <div class="flex-item">
10
         <div class="flex-item">
11
           <div class="Time">
11
           <div class="Time">
12
-            <span>开奖日期:2020-08-14</span>
13
-            <span>第202076期</span>
12
+            <span>开奖日期:{{PageData.openingDate}}</span>
13
+            <span>第{{PageData.issueNo}}期</span>
14
           </div>
14
           </div>
15
           <ul class="Num">
15
           <ul class="Num">
16
-            <li>02</li>
17
-            <li>04</li>
18
-            <li>52</li>
19
-            <li>44</li>
20
-            <li>57</li>
21
-            <li class="active">54</li>
22
-            <li class="active">12</li>
16
+            <li v-for="(item, index) in PageData.firstResult.split(',')" :key="`First-${index}`">{{item}}</li>
17
+            <li v-for="(item, index) in PageData.secondResult.split(',')" :key="`Second-${index}`" class="active">{{item}}</li>
23
           </ul>
18
           </ul>
24
         </div>
19
         </div>
25
       </div>
20
       </div>
68
         </li>
63
         </li>
69
       </ul>
64
       </ul>
70
       <div class="Btn">
65
       <div class="Btn">
71
-        <a>大乐透投注</a>
66
+        <router-link :to="{ name: 'DaLeTou' }">大乐透投注</router-link>
72
       </div>
67
       </div>
73
     </div>
68
     </div>
74
   </div>
69
   </div>
75
 </template>
70
 </template>
76
 
71
 
77
 <script>
72
 <script>
78
-import { mapMutations } from 'vuex'
73
+import { mapMutations, createNamespacedHelpers } from 'vuex'
74
+const { mapState: mapIndexState } = createNamespacedHelpers('index')
79
 export default {
75
 export default {
80
   name: '',
76
   name: '',
81
   data () {
77
   data () {
82
     return {
78
     return {
79
+      PageData: null
83
     }
80
     }
84
   },
81
   },
85
   computed: {
82
   computed: {
83
+    ...mapIndexState({
84
+      LotteryRes: x => x.LotteryRes // 数字彩开奖结果列表
85
+    })
86
   },
86
   },
87
   components: {
87
   components: {
88
   },
88
   },
92
       { name: 'MainHeaderTitle', value: '开奖历史' },
92
       { name: 'MainHeaderTitle', value: '开奖历史' },
93
       { name: 'ShowMainHeaderBack', value: true }
93
       { name: 'ShowMainHeaderBack', value: true }
94
     ])
94
     ])
95
+    this.Init()
95
   },
96
   },
96
   mounted () {
97
   mounted () {
97
     this.$nextTick(() => {
98
     this.$nextTick(() => {
100
   methods: {
101
   methods: {
101
     ...mapMutations([
102
     ...mapMutations([
102
       'EditMainData' // 配置页面框架数据
103
       'EditMainData' // 配置页面框架数据
103
-    ])
104
+    ]),
105
+    Init () { // 初始化
106
+      let SerialNo = this.$route.query.serialNo
107
+      let IssueNo = this.$route.query.issueNo
108
+      this.LotteryRes.map((item) => {
109
+        if (item.serialNo === SerialNo && item.issueNo === IssueNo) {
110
+          this.PageData = { ...item }
111
+        }
112
+      })
113
+    }
104
   }
114
   }
105
 }
115
 }
106
 </script>
116
 </script>

+ 52
- 25
src/pages/KaiJiangZhanShi/ShuangSeQiu/index.vue 查看文件

8
       <div slot="SwiperItem-1" class="Item">
8
       <div slot="SwiperItem-1" class="Item">
9
 
9
 
10
         <!-- 开奖信息 -->
10
         <!-- 开奖信息 -->
11
-        <div class="PrizeInfo">
11
+        <div class="PrizeInfo" v-if="LotteryRes.length">
12
           <div class="flex-h">
12
           <div class="flex-h">
13
             <div class="Icon">
13
             <div class="Icon">
14
               <img src="../../../assets/img/icon5.png" class="centerLabel cover" alt="">
14
               <img src="../../../assets/img/icon5.png" class="centerLabel cover" alt="">
16
             <span>双色球</span>
16
             <span>双色球</span>
17
             <div class="flex-item">
17
             <div class="flex-item">
18
               <div class="Time">
18
               <div class="Time">
19
-                <span>开奖日期:2020-08-14</span>
20
-                <span>第202076期</span>
19
+                <span>开奖日期:{{LotteryRes[0].openingDate}}</span>
20
+                <span>第{{LotteryRes[0].issueNo}}期</span>
21
               </div>
21
               </div>
22
               <ul class="Num">
22
               <ul class="Num">
23
-                <li>02</li>
24
-                <li>04</li>
25
-                <li>52</li>
26
-                <li>44</li>
27
-                <li>57</li>
28
-                <li class="active">54</li>
23
+                <li v-for="(item, index) in LotteryRes[0].firstResult.split(',')" :key="`First-${index}`">{{item}}</li>
24
+                <li v-for="(item, index) in LotteryRes[0].secondResult.split(',')" :key="`Second-${index}`" class="active">{{item}}</li>
29
               </ul>
25
               </ul>
30
             </div>
26
             </div>
31
           </div>
27
           </div>
74
             </li>
70
             </li>
75
           </ul>
71
           </ul>
76
           <div class="Btn">
72
           <div class="Btn">
77
-            <a>双色球投注</a>
73
+            <router-link :to="{ name: 'ShuangSeQiu' }">双色球投注</router-link>
78
           </div>
74
           </div>
79
         </div>
75
         </div>
80
 
76
 
86
       <!-- 开奖历史 -->
82
       <!-- 开奖历史 -->
87
       <div slot="SwiperItem-3" class="Item">
83
       <div slot="SwiperItem-3" class="Item">
88
         <ul class="HistoryList">
84
         <ul class="HistoryList">
89
-          <router-link tag="li" v-for="(item, index) in 10" :key="index" :to="{ name: 'ShuangSeQiuXiangQing' }" class="flex-h">
85
+          <router-link tag="li" v-for="(item, index) in LotteryRes" :key="index" :to="{ name: 'ShuangSeQiuXiangQing', query: { serialNo: item.serialNo, lotteryId: 'lottery', issueNo: item.issueNo } }" class="flex-h">
90
             <div class="Icon">
86
             <div class="Icon">
91
               <img src="../../../assets/img/icon5.png" class="centerLabel cover" alt="">
87
               <img src="../../../assets/img/icon5.png" class="centerLabel cover" alt="">
92
             </div>
88
             </div>
93
             <span>双色球</span>
89
             <span>双色球</span>
94
             <div class="flex-item">
90
             <div class="flex-item">
95
               <div class="Time">
91
               <div class="Time">
96
-                <span>开奖日期:2020-08-14</span>
97
-                <span>第202076期</span>
92
+                <span>开奖日期:{{item.openingDate}}</span>
93
+                <span>第{{item.issueNo}}期</span>
98
               </div>
94
               </div>
99
               <ul class="Num">
95
               <ul class="Num">
100
-                <li>02</li>
101
-                <li>04</li>
102
-                <li>52</li>
103
-                <li>44</li>
104
-                <li>57</li>
105
-                <li class="active">54</li>
96
+                <li v-for="(subItem, subIndex) in item.firstResult.split(',')" :key="`First-${subIndex}`">{{subItem}}</li>
97
+                <li v-for="(subItem, subIndex) in item.secondResult.split(',')" :key="`Second-${subIndex}`" class="active">{{subItem}}</li>
106
               </ul>
98
               </ul>
107
             </div>
99
             </div>
108
           </router-link>
100
           </router-link>
114
 </template>
106
 </template>
115
 
107
 
116
 <script>
108
 <script>
117
-import { mapMutations } from 'vuex'
109
+import { mapMutations, createNamespacedHelpers } from 'vuex'
118
 import TabSwiper from '../../../components/common/TabSwiper'
110
 import TabSwiper from '../../../components/common/TabSwiper'
111
+const { mapState: mapIndexState, mapActions: mapIndexActions, mapMutations: mapIndexMutations } = createNamespacedHelpers('index')
119
 export default {
112
 export default {
120
   name: '',
113
   name: '',
121
   data () {
114
   data () {
123
       NavActiveId: 1, // 选中nav id
116
       NavActiveId: 1, // 选中nav id
124
       NavList: [ // nav数据
117
       NavList: [ // nav数据
125
         { name: '最新开奖', id: 1 },
118
         { name: '最新开奖', id: 1 },
126
-        { name: '走势图', id: 2 },
119
+        // { name: '走势图', id: 2 },
127
         { name: '开奖历史', id: 3 }
120
         { name: '开奖历史', id: 3 }
128
-      ]
121
+      ],
122
+      PageData: {
123
+        pageNum: 1,
124
+        pageSize: 100
125
+      },
126
+      Total: 1,
127
+      DataLock: false
129
     }
128
     }
130
   },
129
   },
131
   computed: {
130
   computed: {
131
+    ...mapIndexState({
132
+      LotteryRes: x => x.LotteryRes // 数字彩开奖结果列表
133
+    })
132
   },
134
   },
133
   components: {
135
   components: {
134
     TabSwiper
136
     TabSwiper
139
       { name: 'MainHeaderTitle', value: '双色球开奖' },
141
       { name: 'MainHeaderTitle', value: '双色球开奖' },
140
       { name: 'ShowMainHeaderBack', value: true }
142
       { name: 'ShowMainHeaderBack', value: true }
141
     ])
143
     ])
144
+    this.Init()
142
   },
145
   },
143
   mounted () {
146
   mounted () {
144
     this.$nextTick(() => {
147
     this.$nextTick(() => {
148
     ...mapMutations([
151
     ...mapMutations([
149
       'EditMainData' // 配置页面框架数据
152
       'EditMainData' // 配置页面框架数据
150
     ]),
153
     ]),
154
+    ...mapIndexActions([
155
+      'GetLotteryRes'
156
+    ]),
157
+    ...mapIndexMutations([
158
+      'EmptyLotteryRes'
159
+    ]),
160
+    Init () {
161
+      this.EmptyLotteryRes()
162
+      this.ToGetLotteryRes()
163
+    },
151
     TabChange (e) { // nav切换
164
     TabChange (e) { // nav切换
152
 
165
 
166
+    },
167
+    ToGetLotteryRes (done = () => { }) { // 获取开奖列表
168
+      if (this.DataLock || this.LotteryRes.length >= this.Total) {
169
+        done()
170
+      } else {
171
+        this.DataLock = true
172
+        this.GetLotteryRes({ queryData: { ...this.PageData, lotteryId: 'double-color' } }).then((res) => {
173
+          this.Total = res.data.data.total > 1 ? res.data.data.total : this.LotteryRes.length
174
+          this.DataLock = false
175
+          done()
176
+        }).catch((res) => {
177
+          this.Toast(res.data.message)
178
+          this.DataLock = false
179
+          done()
180
+        })
181
+      }
153
     },
182
     },
154
     Refresh (e) { // 页面下拉刷新
183
     Refresh (e) { // 页面下拉刷新
155
-      window.setTimeout(() => {
156
-        e.done()
157
-      }, 1000)
184
+      this.ToGetLotteryRes(e.done())
158
     }
185
     }
159
   }
186
   }
160
 }
187
 }

+ 23
- 12
src/pages/KaiJiangZhanShi/ShuangSeQiuXiangQing/index.vue 查看文件

1
 <template>
1
 <template>
2
   <div class="Page">
2
   <div class="Page">
3
     <!-- 开奖信息 -->
3
     <!-- 开奖信息 -->
4
-    <div class="PrizeInfo">
4
+    <div class="PrizeInfo" v-if="PageData !== null">
5
       <div class="flex-h">
5
       <div class="flex-h">
6
         <div class="Icon">
6
         <div class="Icon">
7
           <img src="../../../assets/img/icon5.png" class="centerLabel cover" alt="">
7
           <img src="../../../assets/img/icon5.png" class="centerLabel cover" alt="">
9
         <span>双色球</span>
9
         <span>双色球</span>
10
         <div class="flex-item">
10
         <div class="flex-item">
11
           <div class="Time">
11
           <div class="Time">
12
-            <span>开奖日期:2020-08-14</span>
13
-            <span>第202076期</span>
12
+            <span>开奖日期:{{PageData.openingDate}}</span>
13
+            <span>第{{PageData.issueNo}}期</span>
14
           </div>
14
           </div>
15
           <ul class="Num">
15
           <ul class="Num">
16
-            <li>02</li>
17
-            <li>04</li>
18
-            <li>52</li>
19
-            <li>44</li>
20
-            <li>57</li>
21
-            <li class="active">54</li>
16
+            <li v-for="(item, index) in PageData.firstResult.split(',')" :key="`First-${index}`">{{item}}</li>
17
+            <li v-for="(item, index) in PageData.secondResult.split(',')" :key="`Second-${index}`" class="active">{{item}}</li>
22
           </ul>
18
           </ul>
23
         </div>
19
         </div>
24
       </div>
20
       </div>
67
         </li>
63
         </li>
68
       </ul>
64
       </ul>
69
       <div class="Btn">
65
       <div class="Btn">
70
-        <a>大乐透投注</a>
66
+        <router-link :to="{ name: 'ShuangSeQiu' }">双色球投注</router-link>
71
       </div>
67
       </div>
72
     </div>
68
     </div>
73
   </div>
69
   </div>
74
 </template>
70
 </template>
75
 
71
 
76
 <script>
72
 <script>
77
-import { mapMutations } from 'vuex'
73
+import { mapMutations, createNamespacedHelpers } from 'vuex'
74
+const { mapState: mapIndexState } = createNamespacedHelpers('index')
78
 export default {
75
 export default {
79
   name: '',
76
   name: '',
80
   data () {
77
   data () {
81
     return {
78
     return {
79
+      PageData: null
82
     }
80
     }
83
   },
81
   },
84
   computed: {
82
   computed: {
83
+    ...mapIndexState({
84
+      LotteryRes: x => x.LotteryRes // 数字彩开奖结果列表
85
+    })
85
   },
86
   },
86
   components: {
87
   components: {
87
   },
88
   },
91
       { name: 'MainHeaderTitle', value: '开奖历史' },
92
       { name: 'MainHeaderTitle', value: '开奖历史' },
92
       { name: 'ShowMainHeaderBack', value: true }
93
       { name: 'ShowMainHeaderBack', value: true }
93
     ])
94
     ])
95
+    this.Init()
94
   },
96
   },
95
   mounted () {
97
   mounted () {
96
     this.$nextTick(() => {
98
     this.$nextTick(() => {
99
   methods: {
101
   methods: {
100
     ...mapMutations([
102
     ...mapMutations([
101
       'EditMainData' // 配置页面框架数据
103
       'EditMainData' // 配置页面框架数据
102
-    ])
104
+    ]),
105
+    Init () { // 初始化
106
+      let SerialNo = this.$route.query.serialNo
107
+      let IssueNo = this.$route.query.issueNo
108
+      this.LotteryRes.map((item) => {
109
+        if (item.serialNo === SerialNo && item.issueNo === IssueNo) {
110
+          this.PageData = { ...item }
111
+        }
112
+      })
113
+    }
103
   }
114
   }
104
 }
115
 }
105
 </script>
116
 </script>

+ 76
- 10
src/pages/index/LanQiuDingDan/index.vue 查看文件

25
             <div class="flex-h">
25
             <div class="flex-h">
26
               <span class="flex-item">加倍</span>
26
               <span class="flex-item">加倍</span>
27
               <span>
27
               <span>
28
-                <a class="iconfont iconjianhao" @click="Multiple = Multiple > 1 ? Multiple - 1 : 1"></a>
28
+                <a class="iconfont iconjianhao" @click="Multiple = Multiple > 1 ? Multiple - 1 : 1; TotalPrice = TotalCount * 2 * Multiple"></a>
29
                 <input type="number" disabled="disabled" v-model="Multiple">
29
                 <input type="number" disabled="disabled" v-model="Multiple">
30
                 <span>倍</span>
30
                 <span>倍</span>
31
-                <a class="iconfont iconjiahao" @click="Multiple += 1"></a>
31
+                <a class="iconfont iconjiahao" @click="Multiple += 1; TotalPrice = TotalCount * 2 * Multiple"></a>
32
               </span>
32
               </span>
33
             </div>
33
             </div>
34
           </div>
34
           </div>
48
         <span>
48
         <span>
49
           <em>{{TotalCount}}</em>注
49
           <em>{{TotalCount}}</em>注
50
         </span>
50
         </span>
51
-        <span>金额:<em>{{TotalPrize * Multiple}}</em>元</span>
52
-        <span>预计奖金:<em>0 ~ 0</em>元</span>
51
+        <span>金额:<em>{{TotalPrice}}</em>元</span>
52
+        <span>预计奖金:<em>{{(PriceArr[0] * Multiple).toFixed(2)}} ~ {{(PriceArr[1] * Multiple).toFixed(2)}}</em>元</span>
53
       </div>
53
       </div>
54
-      <a :class="{'active': CurrentStoreId !== null && LanQiuCart.length}">立即购买</a>
54
+      <a :class="{'active': CurrentStoreId !== null && LanQiuCart.length}" @click="ToPostBetting">立即购买</a>
55
     </div>
55
     </div>
56
 
56
 
57
     <div class="Layer" v-if="ShowPassWay">
57
     <div class="Layer" v-if="ShowPassWay">
65
           <a v-for="(item, index) in FootballKeys.passes" :key="index" v-if="item.unitNum <= PageList.length && item.unitNum > 2 && item.amount !== 1" :class="{'active': item.passCode === CurrentPassCode}" @click="CutPassCode(item)">{{item.name}}</a>
65
           <a v-for="(item, index) in FootballKeys.passes" :key="index" v-if="item.unitNum <= PageList.length && item.unitNum > 2 && item.amount !== 1" :class="{'active': item.passCode === CurrentPassCode}" @click="CutPassCode(item)">{{item.name}}</a>
66
         </nav>
66
         </nav>
67
         <div class="Bottom flex-h">
67
         <div class="Bottom flex-h">
68
-          <a class="flex-item" @click="CurrentPassCode = null; ShowPassWay = false">取消</a>
69
-          <a class="flex-item active" @click="ToGetAllParts(); ShowPassWay = false">确定</a>
68
+          <a class="flex-item" @click="ShowPassWay = false">取消</a>
69
+          <a class="flex-item active" @click="ShowPassWay = false">确定</a>
70
         </div>
70
         </div>
71
       </div>
71
       </div>
72
     </div>
72
     </div>
117
   name: '',
117
   name: '',
118
   data () {
118
   data () {
119
     return {
119
     return {
120
+      PriceArr: [0, 0], // 奖金区间
120
       AllParts: [], // 投注生成结果
121
       AllParts: [], // 投注生成结果
121
       CurrentPassUnitNum: 0,
122
       CurrentPassUnitNum: 0,
122
       CurrentPassAmount: 0,
123
       CurrentPassAmount: 0,
130
       Multiple: 1, // 倍数
131
       Multiple: 1, // 倍数
131
       ShowStore: false, // 是否显示店铺选择弹窗
132
       ShowStore: false, // 是否显示店铺选择弹窗
132
       TotalCount: 0, // 总注数
133
       TotalCount: 0, // 总注数
133
-      TotalPrize: 0, // 总金额
134
+      TotalPrice: 0, // 总金额
134
       PageList: [],
135
       PageList: [],
135
       DataLock: false
136
       DataLock: false
136
     }
137
     }
140
       FootballKeys: x => x.FootballKeys // 竞彩字典
141
       FootballKeys: x => x.FootballKeys // 竞彩字典
141
     }),
142
     }),
142
     ...mapUserState({
143
     ...mapUserState({
144
+      UserInfo: x => x.UserInfo, // 用户信息
143
       LanQiuCart: x => x.LanQiuCart // 篮球购物车
145
       LanQiuCart: x => x.LanQiuCart // 篮球购物车
144
     })
146
     })
145
   },
147
   },
179
         this.ToGetAllParts() // 枚举投注
181
         this.ToGetAllParts() // 枚举投注
180
       }
182
       }
181
     },
183
     },
184
+    ToPostBetting () { // 去下注
185
+      if (this.DataLock || !this.LanQiuCart.length || this.CurrentStoreId === null || this.CurrentPassCode === null) return
186
+      this.DataLock = true
187
+      let Data = null
188
+      let ListData = []
189
+      this.LanQiuCart.map((item) => {
190
+        ListData.push({
191
+          matchId: item.id,
192
+          awayTeamId: item.awayTeamId, // 客队id
193
+          awayTeamName: item.awayTeamName, // 客队名称
194
+          homeTeamId: item.homeTeamId, // 主队id
195
+          homeTeamName: item.homeTeamName, // 主队名称
196
+          detailList: this.ReturnDeatilList(item.list, item.id)
197
+        })
198
+      })
199
+      Data = {
200
+        expectedEarning: `${this.PriceArr[0].toFixed(2)}~${this.PriceArr[1].toFixed(2)}元`, // 预期奖金
201
+        customerId: this.UserInfo.customerId, // 用户id
202
+        isDigit: false, // 是否数字彩
203
+        isSport: true, // 是否体彩
204
+        itemList: [...ListData], // 购彩方案
205
+        lotteryId: 'basketball', // 彩种ID
206
+        notesNum: this.TotalCount, // 总注数
207
+        passCode: this.CurrentPassCode, // 过关方式
208
+        shopId: this.CurrentStoreId, // 店铺ID
209
+        times: this.Multiple, // 倍数
210
+        totalPrice: this.TotalPrice * 100 // 总金额
211
+      }
212
+      this.PostBetting({
213
+        urlData: { id: 'basketball' },
214
+        data: { ...Data }
215
+      }).then((res) => {
216
+        this.Toast('投注成功!')
217
+        this.EmptyLanQiuCart()
218
+        this.PageList = []
219
+        this.PriceArr = [0, 0]
220
+        this.TotalCount = 0
221
+        this.TotalPrice = 0
222
+        this.Multiple = 1
223
+        this.DataLock = false
224
+      }).catch((res) => {
225
+        this.Toast(res.data.message)
226
+        this.DataLock = false
227
+      })
228
+    },
182
     ToGetStoreList () { // 获取店铺列表
229
     ToGetStoreList () { // 获取店铺列表
183
       this.GetStoreList({
230
       this.GetStoreList({
184
         queryData: {
231
         queryData: {
224
       })
271
       })
225
       this.AllParts = GetAllParts([...ListData], PassTarget).allParts
272
       this.AllParts = GetAllParts([...ListData], PassTarget).allParts
226
       this.TotalCount = GetAllParts([...ListData], PassTarget).sum
273
       this.TotalCount = GetAllParts([...ListData], PassTarget).sum
227
-      console.log(GetPrice(this.AllParts))
274
+      this.TotalPrice = this.TotalCount * 2 * this.Multiple
275
+      this.PriceArr = GetPrice(this.AllParts)
276
+      console.log(JSON.stringify(this.AllParts))
228
     },
277
     },
229
     ReturnDeatilList (list, pid) {
278
     ReturnDeatilList (list, pid) {
230
       let Arr = []
279
       let Arr = []
239
       return Arr || []
288
       return Arr || []
240
     },
289
     },
241
     CutPassCode (item) { // 切换串法
290
     CutPassCode (item) { // 切换串法
291
+      if (this.DataLock) return
292
+      this.DataLock = true
242
       if (this.CurrentPassCode === item.passCode) {
293
       if (this.CurrentPassCode === item.passCode) {
243
         this.CurrentPassCode = null
294
         this.CurrentPassCode = null
244
         this.CurrentPassName = null
295
         this.CurrentPassName = null
245
         this.CurrentPassUnitNum = 0
296
         this.CurrentPassUnitNum = 0
246
         this.CurrentPassAmount = 0
297
         this.CurrentPassAmount = 0
298
+        this.TotalCount = 0
299
+        this.TotalPrice = 0
300
+        this.PriceArr = [0, 0]
247
       } else {
301
       } else {
248
         this.CurrentPassCode = item.passCode
302
         this.CurrentPassCode = item.passCode
249
         this.CurrentPassName = item.name
303
         this.CurrentPassName = item.name
250
         this.CurrentPassUnitNum = item.unitNum
304
         this.CurrentPassUnitNum = item.unitNum
251
         this.CurrentPassAmount = item.amount
305
         this.CurrentPassAmount = item.amount
306
+        this.ToGetAllParts()
252
       }
307
       }
308
+      this.DataLock = false
253
     },
309
     },
254
     SelectStore (item) { // 选择店铺
310
     SelectStore (item) { // 选择店铺
255
       if (this.DataLock) return
311
       if (this.DataLock) return
259
       this.DataLock = false
315
       this.DataLock = false
260
     },
316
     },
261
     DeleteItem (index) { // 删除投注
317
     DeleteItem (index) { // 删除投注
318
+      if (this.DataLock) return
319
+      this.DataLock = true
262
       this.DeleteLanQiuCart(index)
320
       this.DeleteLanQiuCart(index)
263
       this.PageList = [...this.LanQiuCart]
321
       this.PageList = [...this.LanQiuCart]
264
-      this.ToGetAllParts()
322
+      if (this.$route.query.type === 'mix') {
323
+        this.CurrentPassCode = null
324
+      }
325
+      this.TotalPrice = 0
326
+      this.TotalCount = 0
327
+      this.PriceArr = [0, 0]
328
+      this.DataLock = false
265
     },
329
     },
266
     MultipleLess (item) { // 减少倍数
330
     MultipleLess (item) { // 减少倍数
267
       if (item.Multiple > 1 && !this.DataLock) {
331
       if (item.Multiple > 1 && !this.DataLock) {
268
         this.DataLock = true
332
         this.DataLock = true
269
         item.Multiple -= 1
333
         item.Multiple -= 1
334
+        this.TotalPrice = this.TotalCount * 2 * this.Multiple
270
         this.DataLock = false
335
         this.DataLock = false
271
       }
336
       }
272
     },
337
     },
274
       if (!this.DataLock) {
339
       if (!this.DataLock) {
275
         this.DataLock = true
340
         this.DataLock = true
276
         item.Multiple += 1
341
         item.Multiple += 1
342
+        this.TotalPrice = this.TotalCount * 2 * this.Multiple
277
         this.DataLock = false
343
         this.DataLock = false
278
       }
344
       }
279
     }
345
     }

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

109
 import ZuQiuDanGuanBiFen from '../../../components/index/ZuQiuDanGuanBiFen'
109
 import ZuQiuDanGuanBiFen from '../../../components/index/ZuQiuDanGuanBiFen'
110
 import ZuQiuDanGuanJinQiuShu from '../../../components/index/ZuQiuDanGuanJinQiuShu'
110
 import ZuQiuDanGuanJinQiuShu from '../../../components/index/ZuQiuDanGuanJinQiuShu'
111
 import { mapMutations, createNamespacedHelpers } from 'vuex'
111
 import { mapMutations, createNamespacedHelpers } from 'vuex'
112
-const { mapState: mapUserState, mapActions: mapUserActions } = createNamespacedHelpers('user')
112
+const { mapState: mapUserState, mapActions: mapUserActions, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
113
 export default {
113
 export default {
114
   name: '',
114
   name: '',
115
   data () {
115
   data () {
178
     ...mapUserActions([
178
     ...mapUserActions([
179
       'GetMixData'
179
       'GetMixData'
180
     ]),
180
     ]),
181
+    ...mapUserMutations([
182
+      'AddZuQiuCart',
183
+      'EmptyZuQiuCart'
184
+    ]),
181
     Init () { // 初始化
185
     Init () { // 初始化
182
       this.GetMixData({ queryData: { lottery: 'football' } }).then((res) => {
186
       this.GetMixData({ queryData: { lottery: 'football' } }).then((res) => {
183
         this.MixData = res.data.data || []
187
         this.MixData = res.data.data || []
184
       })
188
       })
185
     },
189
     },
190
+    ToBetting () { // 去投注
191
+      if (this.SelectType > 5) {
192
+        if (this.ResList.length) {
193
+          this.EmptyZuQiuCart()
194
+          this.ResList.map((item) => {
195
+            this.AddZuQiuCart(item)
196
+          })
197
+          this.$router.push({ name: 'ZuQiuDingDan', query: { type: 'single' } })
198
+        }
199
+      } else {
200
+        if (this.ResList.length > 1) {
201
+          this.EmptyZuQiuCart()
202
+          this.ResList.map((item) => {
203
+            this.AddZuQiuCart(item)
204
+          })
205
+          this.$router.push({ name: 'ZuQiuDingDan', query: { type: 'mix' } })
206
+        }
207
+      }
208
+    },
186
     ResChange (e) { // 投注结果更新
209
     ResChange (e) { // 投注结果更新
187
       this.ResList = e
210
       this.ResList = e
188
     },
211
     },

src/pages/index/LanQiuDingDan/index copy.vue → src/pages/index/ZuQiuDingDan/index.vue 查看文件

25
             <div class="flex-h">
25
             <div class="flex-h">
26
               <span class="flex-item">加倍</span>
26
               <span class="flex-item">加倍</span>
27
               <span>
27
               <span>
28
-                <a class="iconfont iconjianhao" @click="Multiple = Multiple > 1 ? Multiple - 1 : 1"></a>
28
+                <a class="iconfont iconjianhao" @click="Multiple = Multiple > 1 ? Multiple - 1 : 1; TotalPrice = TotalCount * 2 * Multiple"></a>
29
                 <input type="number" disabled="disabled" v-model="Multiple">
29
                 <input type="number" disabled="disabled" v-model="Multiple">
30
                 <span>倍</span>
30
                 <span>倍</span>
31
-                <a class="iconfont iconjiahao" @click="Multiple += 1"></a>
31
+                <a class="iconfont iconjiahao" @click="Multiple += 1; TotalPrice = TotalCount * 2 * Multiple"></a>
32
               </span>
32
               </span>
33
             </div>
33
             </div>
34
           </div>
34
           </div>
46
       </div>
46
       </div>
47
       <div class="Count">
47
       <div class="Count">
48
         <span>
48
         <span>
49
-          <em>{{AllPartsCounts}}</em>注
49
+          <em>{{TotalCount}}</em>注
50
         </span>
50
         </span>
51
-        <span>金额:<em>{{TotalPrize * Multiple}}</em>元</span>
52
-        <span>预计奖金:<em>0 ~ 0</em>元</span>
51
+        <span>金额:<em>{{TotalPrice}}</em>元</span>
52
+        <span>预计奖金:<em>{{(PriceArr[0] * Multiple).toFixed(2)}} ~ {{(PriceArr[1] * Multiple).toFixed(2)}}</em>元</span>
53
       </div>
53
       </div>
54
-      <a @click="ToPostBetting" :class="{'active': CurrentStoreId !== null && LanQiuCart.length}">立即购买</a>
54
+      <a :class="{'active': CurrentStoreId !== null && LanQiuCart.length}" @click="ToPostBetting">立即购买</a>
55
     </div>
55
     </div>
56
 
56
 
57
     <div class="Layer" v-if="ShowPassWay">
57
     <div class="Layer" v-if="ShowPassWay">
65
           <a v-for="(item, index) in FootballKeys.passes" :key="index" v-if="item.unitNum <= PageList.length && item.unitNum > 2 && item.amount !== 1" :class="{'active': item.passCode === CurrentPassCode}" @click="CutPassCode(item)">{{item.name}}</a>
65
           <a v-for="(item, index) in FootballKeys.passes" :key="index" v-if="item.unitNum <= PageList.length && item.unitNum > 2 && item.amount !== 1" :class="{'active': item.passCode === CurrentPassCode}" @click="CutPassCode(item)">{{item.name}}</a>
66
         </nav>
66
         </nav>
67
         <div class="Bottom flex-h">
67
         <div class="Bottom flex-h">
68
-          <a class="flex-item" @click="CurrentPassCode = null; ShowPassWay = false">取消</a>
68
+          <a class="flex-item" @click="ShowPassWay = false">取消</a>
69
           <a class="flex-item active" @click="ShowPassWay = false">确定</a>
69
           <a class="flex-item active" @click="ShowPassWay = false">确定</a>
70
         </div>
70
         </div>
71
       </div>
71
       </div>
110
 <script>
110
 <script>
111
 import { Switch } from 'vant'
111
 import { Switch } from 'vant'
112
 import GetAllParts from '../../../util/Sports'
112
 import GetAllParts from '../../../util/Sports'
113
+import GetPrice from '../../../util/Basketball'
113
 import { mapState, mapMutations, createNamespacedHelpers } from 'vuex'
114
 import { mapState, mapMutations, createNamespacedHelpers } from 'vuex'
114
 const { mapState: mapUserState, mapActions: mapUserActions, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
115
 const { mapState: mapUserState, mapActions: mapUserActions, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
115
 export default {
116
 export default {
116
   name: '',
117
   name: '',
117
   data () {
118
   data () {
118
     return {
119
     return {
119
-      AllPartsCounts: 0,
120
+      PriceArr: [0, 0], // 奖金区间
120
       AllParts: [], // 投注生成结果
121
       AllParts: [], // 投注生成结果
121
       CurrentPassUnitNum: 0,
122
       CurrentPassUnitNum: 0,
122
       CurrentPassAmount: 0,
123
       CurrentPassAmount: 0,
130
       Multiple: 1, // 倍数
131
       Multiple: 1, // 倍数
131
       ShowStore: false, // 是否显示店铺选择弹窗
132
       ShowStore: false, // 是否显示店铺选择弹窗
132
       TotalCount: 0, // 总注数
133
       TotalCount: 0, // 总注数
133
-      TotalPrize: 0, // 总金额
134
+      TotalPrice: 0, // 总金额
134
       PageList: [],
135
       PageList: [],
135
       DataLock: false
136
       DataLock: false
136
     }
137
     }
140
       FootballKeys: x => x.FootballKeys // 竞彩字典
141
       FootballKeys: x => x.FootballKeys // 竞彩字典
141
     }),
142
     }),
142
     ...mapUserState({
143
     ...mapUserState({
144
+      UserInfo: x => x.UserInfo, // 用户信息
143
       LanQiuCart: x => x.LanQiuCart // 篮球购物车
145
       LanQiuCart: x => x.LanQiuCart // 篮球购物车
144
     })
146
     })
145
   },
147
   },
149
   created () {
151
   created () {
150
     this.EditMainData([ // 配置页面框架数据
152
     this.EditMainData([ // 配置页面框架数据
151
       { name: 'ShowMainHeader', value: true },
153
       { name: 'ShowMainHeader', value: true },
152
-      { name: 'MainHeaderTitle', value: '球' },
154
+      { name: 'MainHeaderTitle', value: '球' },
153
       { name: 'ShowMainHeaderBack', value: true }
155
       { name: 'ShowMainHeaderBack', value: true }
154
     ])
156
     ])
155
-    this.PageList = [...this.LanQiuCart]
156
-    console.log(this.PageList)
157
-    if (this.$route.query.type === 'single') {
158
-      this.CurrentPassCode = '1*1'
159
-    }
160
-    this.CheckOrderCount() // 计算订单倍数、金额
161
-    this.GetStoreList({
162
-      queryData: {
163
-        location: '114.16936109999999,22.3193039',
164
-        lotteryId: 'lottery'
165
-      }
166
-    }).then((res) => {
167
-      let StoreList = res.data.data.nearest || []
168
-      let RecommendStoreList = res.data.data.recommend || []
169
-      StoreList.map((item) => {
170
-        if (item.status - 0 === 1) {
171
-          this.StoreList.push(item)
172
-        }
173
-      })
174
-      RecommendStoreList.map((item) => {
175
-        if (item.status - 0 === 1) {
176
-          this.RecommendStoreList.push(item)
177
-        }
178
-      })
179
-    })
157
+    this.Init()
180
   },
158
   },
181
   mounted () {
159
   mounted () {
182
     this.$nextTick(() => {
160
     this.$nextTick(() => {
194
       'PostBetting',
172
       'PostBetting',
195
       'GetStoreList'
173
       'GetStoreList'
196
     ]),
174
     ]),
197
-    ToGetAllParts () { // 获取投注数 & 金额
175
+    Init () { // 初始化
176
+      this.PageList = [...this.LanQiuCart] // 赋值页面数据
177
+      console.log(this.PageList)
178
+      this.ToGetStoreList() // 获取店铺列表
179
+      if (this.$route.query.type === 'single') { // 单关
180
+        this.CurrentPassCode = '1*1'
181
+        this.ToGetAllParts() // 枚举投注
182
+      }
183
+    },
184
+    ToPostBetting () { // 去下注
185
+      if (this.DataLock || !this.LanQiuCart.length || this.CurrentStoreId === null || this.CurrentPassCode === null) return
186
+      this.DataLock = true
187
+      let Data = null
188
+      let ListData = []
189
+      this.LanQiuCart.map((item) => {
190
+        ListData.push({
191
+          matchId: item.id,
192
+          awayTeamId: item.awayTeamId, // 客队id
193
+          awayTeamName: item.awayTeamName, // 客队名称
194
+          homeTeamId: item.homeTeamId, // 主队id
195
+          homeTeamName: item.homeTeamName, // 主队名称
196
+          detailList: this.ReturnDeatilList(item.list, item.id)
197
+        })
198
+      })
199
+      Data = {
200
+        expectedEarning: `${this.PriceArr[0].toFixed(2)}~${this.PriceArr[1].toFixed(2)}元`, // 预期奖金
201
+        customerId: this.UserInfo.customerId, // 用户id
202
+        isDigit: false, // 是否数字彩
203
+        isSport: true, // 是否体彩
204
+        itemList: [...ListData], // 购彩方案
205
+        lotteryId: 'football', // 彩种ID
206
+        notesNum: this.TotalCount, // 总注数
207
+        passCode: this.CurrentPassCode, // 过关方式
208
+        shopId: this.CurrentStoreId, // 店铺ID
209
+        times: this.Multiple, // 倍数
210
+        totalPrice: this.TotalPrice * 100 // 总金额
211
+      }
212
+      this.PostBetting({
213
+        urlData: { id: 'football' },
214
+        data: { ...Data }
215
+      }).then((res) => {
216
+        this.Toast('投注成功!')
217
+        this.EmptyLanQiuCart()
218
+        this.PageList = []
219
+        this.PriceArr = [0, 0]
220
+        this.TotalCount = 0
221
+        this.TotalPrice = 0
222
+        this.Multiple = 1
223
+        this.DataLock = false
224
+      }).catch((res) => {
225
+        this.Toast(res.data.message)
226
+        this.DataLock = false
227
+      })
228
+    },
229
+    ToGetStoreList () { // 获取店铺列表
230
+      this.GetStoreList({
231
+        queryData: {
232
+          location: '114.16936109999999,22.3193039',
233
+          lotteryId: 'lottery'
234
+        }
235
+      }).then((res) => {
236
+        let StoreList = res.data.data.nearest || []
237
+        let RecommendStoreList = res.data.data.recommend || []
238
+        StoreList.map((item) => {
239
+          if (item.status - 0 === 1) {
240
+            this.StoreList.push(item)
241
+          }
242
+        })
243
+        RecommendStoreList.map((item) => {
244
+          if (item.status - 0 === 1) {
245
+            this.RecommendStoreList.push(item)
246
+          }
247
+        })
248
+      })
249
+    },
250
+    ToGetAllParts () { // 枚举投注
198
       let ListData = []
251
       let ListData = []
199
       this.LanQiuCart.map((item) => {
252
       this.LanQiuCart.map((item) => {
200
         ListData.push({
253
         ListData.push({
201
           matchId: item.id,
254
           matchId: item.id,
255
+          spreadPoints: item.rq,
256
+          presetPoints: item.ys,
202
           awayTeamId: item.awayTeamId, // 客队id
257
           awayTeamId: item.awayTeamId, // 客队id
203
           awayTeamName: item.awayTeamName, // 客队名称
258
           awayTeamName: item.awayTeamName, // 客队名称
204
           homeTeamId: item.homeTeamId, // 主队id
259
           homeTeamId: item.homeTeamId, // 主队id
215
         }
270
         }
216
       })
271
       })
217
       this.AllParts = GetAllParts([...ListData], PassTarget).allParts
272
       this.AllParts = GetAllParts([...ListData], PassTarget).allParts
218
-      console.log(this.AllParts)
219
-      this.AllPartsCounts = GetAllParts([...ListData], PassTarget).sum
273
+      this.TotalCount = GetAllParts([...ListData], PassTarget).sum
274
+      this.TotalPrice = this.TotalCount * 2 * this.Multiple
275
+      this.PriceArr = GetPrice(this.AllParts)
276
+      console.log(JSON.stringify(this.AllParts))
220
     },
277
     },
221
-    CalcRes () { // 计算投注数、金额
222
-      if (this.CurrentPassCode === null) {
223
-        this.TotalCount = 0
224
-        this.TotalPrize = 0
225
-      } else {
226
-        if (this.CurrentPassAmount === 1) { // 自由过关
227
-
228
-        } else { // 多串过关
229
-
230
-        }
231
-      }
278
+    ReturnDeatilList (list, pid) {
279
+      let Arr = []
280
+      list.map((item) => {
281
+        Arr.push({
282
+          matchId: pid,
283
+          odds: item.odds,
284
+          ruleCode: item.ruleCode,
285
+          wayCode: item.wayCode
286
+        })
287
+      })
288
+      return Arr || []
232
     },
289
     },
233
     CutPassCode (item) { // 切换串法
290
     CutPassCode (item) { // 切换串法
291
+      if (this.DataLock) return
292
+      this.DataLock = true
234
       if (this.CurrentPassCode === item.passCode) {
293
       if (this.CurrentPassCode === item.passCode) {
235
         this.CurrentPassCode = null
294
         this.CurrentPassCode = null
236
         this.CurrentPassName = null
295
         this.CurrentPassName = null
237
         this.CurrentPassUnitNum = 0
296
         this.CurrentPassUnitNum = 0
238
         this.CurrentPassAmount = 0
297
         this.CurrentPassAmount = 0
298
+        this.TotalCount = 0
299
+        this.TotalPrice = 0
300
+        this.PriceArr = [0, 0]
239
       } else {
301
       } else {
240
         this.CurrentPassCode = item.passCode
302
         this.CurrentPassCode = item.passCode
241
         this.CurrentPassName = item.name
303
         this.CurrentPassName = item.name
242
         this.CurrentPassUnitNum = item.unitNum
304
         this.CurrentPassUnitNum = item.unitNum
243
         this.CurrentPassAmount = item.amount
305
         this.CurrentPassAmount = item.amount
306
+        this.ToGetAllParts()
244
       }
307
       }
245
-      this.CalcRes()
246
-      this.ToGetAllParts()
247
-    },
248
-    CalcTotalCount () {
249
-      let Count = 0
250
-      this.LanQiuCart.map((item) => {
251
-        item.list.map(() => {
252
-          Count += 1
253
-        })
254
-      })
255
-      return Count || 0
308
+      this.DataLock = false
256
     },
309
     },
257
     SelectStore (item) { // 选择店铺
310
     SelectStore (item) { // 选择店铺
258
       if (this.DataLock) return
311
       if (this.DataLock) return
261
       this.CurrentStoreId = item.shopId === this.CurrentStoreId ? null : item.shopId
314
       this.CurrentStoreId = item.shopId === this.CurrentStoreId ? null : item.shopId
262
       this.DataLock = false
315
       this.DataLock = false
263
     },
316
     },
264
-    ReturnDeatilList (list, pid) {
265
-      let Arr = []
266
-      list.map((item) => {
267
-        Arr.push({
268
-          matchId: pid,
269
-          odds: item.odds,
270
-          ruleCode: item.ruleCode,
271
-          wayCode: item.wayCode
272
-        })
273
-      })
274
-      return Arr || []
275
-    },
276
-    ToPostBetting () { // 去下注
277
-      if (this.DataLock || !this.LanQiuCart.length || this.CurrentStoreId === null || this.CurrentPassCode !== null) return
278
-      this.DataLock = true
279
-      let ListData = []
280
-      let Data = null
281
-      if (this.$route.type === 'single') {
282
-        this.LanQiuCart.map((item) => {
283
-          ListData.push({
284
-            matchId: item.id,
285
-            awayTeamId: item.awayTeamId, // 客队id
286
-            awayTeamName: item.awayTeamName, // 客队名称
287
-            homeTeamId: item.homeTeamId, // 主队id
288
-            homeTeamName: item.homeTeamName, // 主队名称
289
-            amount: this.Multiple * item.list.length, // 购买注数
290
-            charges: this.Multiple * 2 * 100, // 价格
291
-            detailList: this.ReturnDeatilList(item.list, item.id)
292
-          })
293
-        })
294
-      } else {
295
-        ListData = [...this.AllParts]
296
-      }
297
-      Data = {
298
-        itemList: [...ListData], // 这个是详细购买方案的列表
299
-        lotteryId: 'basketball', // 彩种ID
300
-        notesNum: this.AllPartsCounts, // 总注数
301
-        shopId: this.CurrentStoreId, // 店铺ID
302
-        times: this.Multiple, // 倍数
303
-        passCode: this.CurrentPassCode, // 过关方式
304
-        // totalPrice: this.TotalPrize * this.Multiple * 100 // 总金额
305
-        totalPrice: this.CalcTotalCount() * this.Multiple * 2 * 100 // 总金额
306
-      }
307
-      this.PostBetting({
308
-        urlData: { id: 'basketball' },
309
-        data: { ...Data }
310
-      }).then((res) => {
311
-        this.Toast('投注成功!')
312
-        this.EmptyLanQiuCart()
313
-        this.PageList = []
314
-        this.TotalCount = 0
315
-        this.TotalPrize = 0
316
-        this.Multiple = 1
317
-        this.DataLock = false
318
-      }).catch((res) => {
319
-        this.Toast(res.data.message)
320
-        this.DataLock = false
321
-      })
322
-    },
323
-    SwitchChange () { // 追加状态改变
324
-      this.CheckOrderCount()
325
-    },
326
     DeleteItem (index) { // 删除投注
317
     DeleteItem (index) { // 删除投注
318
+      if (this.DataLock) return
319
+      this.DataLock = true
327
       this.DeleteLanQiuCart(index)
320
       this.DeleteLanQiuCart(index)
328
       this.PageList = [...this.LanQiuCart]
321
       this.PageList = [...this.LanQiuCart]
329
-      this.CheckOrderCount()
330
-    },
331
-    ReturnType (item) {
332
-      if (item.FirstRes.Dan.length || item.LastRes.Dan.length) {
333
-        return '拖胆'
334
-      } else if (item.Count > 1) {
335
-        return '复式'
336
-      } else {
337
-        return '单式'
322
+      if (this.$route.query.type === 'mix') {
323
+        this.CurrentPassCode = null
338
       }
324
       }
325
+      this.TotalPrice = 0
326
+      this.TotalCount = 0
327
+      this.PriceArr = [0, 0]
328
+      this.DataLock = false
339
     },
329
     },
340
     MultipleLess (item) { // 减少倍数
330
     MultipleLess (item) { // 减少倍数
341
       if (item.Multiple > 1 && !this.DataLock) {
331
       if (item.Multiple > 1 && !this.DataLock) {
342
         this.DataLock = true
332
         this.DataLock = true
343
         item.Multiple -= 1
333
         item.Multiple -= 1
344
-        this.CheckOrderCount() // 计算订单倍数、金额
334
+        this.TotalPrice = this.TotalCount * 2 * this.Multiple
345
         this.DataLock = false
335
         this.DataLock = false
346
       }
336
       }
347
     },
337
     },
349
       if (!this.DataLock) {
339
       if (!this.DataLock) {
350
         this.DataLock = true
340
         this.DataLock = true
351
         item.Multiple += 1
341
         item.Multiple += 1
352
-        this.CheckOrderCount() // 计算订单倍数、金额
342
+        this.TotalPrice = this.TotalCount * 2 * this.Multiple
353
         this.DataLock = false
343
         this.DataLock = false
354
       }
344
       }
355
-    },
356
-    CheckOrderCount () { // 计算订单倍数、金额
357
-      // let Count = 0 // 注数
358
-      // let Money = 0 // 金额
359
-      // let ItemPrize = this.IsAdd ? 3 : 2
360
-      // this.PageList.map((item) => {
361
-      //   Count += item.Count
362
-      //   Money += item.Count * ItemPrize
363
-      // })
364
-      // this.TotalCount = Count
365
-      // this.TotalPrize = Money
366
     }
345
     }
367
   }
346
   }
368
 }
347
 }

+ 324
- 0
src/pages/index/ZuQiuDingDan/page.scss 查看文件

1
+.Page {
2
+  background: #f8f8f8;
3
+  position: relative;
4
+  overflow: hidden;
5
+  > div {
6
+    &.flex-item {
7
+      position: relative;
8
+      overflow: hidden;
9
+      z-index: 1;
10
+      > div {
11
+        width: 100%;
12
+        position: absolute;
13
+        left: 0;
14
+        top: 0;
15
+        bottom: 0;
16
+        overflow-y: scroll;
17
+        -webkit-overflow-scrolling: touch;
18
+        > ul {
19
+          padding: 0.15rem;
20
+          position: relative;
21
+          > li {
22
+            background: #fff;
23
+            position: relative;
24
+            overflow: visible;
25
+            padding: 0.15rem;
26
+            box-shadow: 0 0 0.02rem 0.02rem rgba(0, 0, 0, 0.05);
27
+            margin-top: 0.15rem;
28
+            border-radius: 0.06rem;
29
+            &:first-child {
30
+              margin-top: 0;
31
+            }
32
+            > .Close {
33
+              display: inline-block;
34
+              position: absolute;
35
+              right: 0;
36
+              top: 0;
37
+              font-size: 0.2rem;
38
+              color: #999;
39
+            }
40
+            > .Title {
41
+              align-items: center;
42
+              > span {
43
+                font-size: 0.12rem;
44
+                color: #999;
45
+                line-height: 0.2rem;
46
+              }
47
+              > div {
48
+                position: relative;
49
+                margin-left: 0.15rem;
50
+                > div {
51
+                  width: 100%;
52
+                  position: relative;
53
+                  overflow: hidden;
54
+                  > span {
55
+                    display: block;
56
+                    white-space: nowrap;
57
+                    font-size: 0.12rem;
58
+                    line-height: 0.2rem;
59
+                    overflow: hidden;
60
+                    text-overflow: ellipsis;
61
+                  }
62
+                }
63
+              }
64
+            }
65
+            > .List {
66
+              font-size: 0;
67
+              > span {
68
+                display: inline-block;
69
+                vertical-align: middle;
70
+                font-size: 0.12rem;
71
+                line-height: 0.2rem;
72
+                margin-top: 0.05rem;
73
+                margin-right: 0.05rem;
74
+                color: #fff;
75
+                background: #ff5200;
76
+                padding: 0 0.1rem;
77
+              }
78
+            }
79
+          }
80
+        }
81
+        > .OtherTab {
82
+          padding: 0 0.15rem;
83
+          position: relative;
84
+          margin-bottom: 0.15rem;
85
+          > div {
86
+            background: #fff;
87
+            border-radius: 0.06rem;
88
+            box-shadow: 0 0 0.02rem 0.02rem rgba(0, 0, 0, 0.05);
89
+            > div {
90
+              padding: 0.15rem;
91
+              border-top: 0.01rem solid #f7f7f7;
92
+              align-items: center;
93
+              &:first-child {
94
+                border-top: none;
95
+              }
96
+              > span {
97
+                &:nth-child(1) {
98
+                  font-size: 0.15rem;
99
+                  color: #666;
100
+                  line-height: 0.2rem;
101
+                }
102
+                &:nth-child(2) {
103
+                  display: inline-block;
104
+                  margin-left: 0.1rem;
105
+                  position: relative;
106
+                  overflow: hidden;
107
+                  border: 0.01rem solid #f7f7f7;
108
+                  border-radius: 0.03rem;
109
+                  font-size: 0;
110
+                  white-space: nowrap;
111
+                  > * {
112
+                    display: inline-block;
113
+                    vertical-align: middle;
114
+                    font-size: 0.14rem;
115
+                    color: #999;
116
+                    line-height: 0.2rem;
117
+                    border-left: 0.01rem solid #f7f7f7;
118
+                    &:first-child {
119
+                      border: none;
120
+                      border-right: 0.01rem solid #f7f7f7;
121
+                    }
122
+                  }
123
+                  > a {
124
+                    width: 0.2rem;
125
+                    text-align: center;
126
+                  }
127
+                  > input {
128
+                    border: none;
129
+                    width: 0.35rem;
130
+                    text-align: center;
131
+                    color: #333;
132
+                    &:disabled {
133
+                      color: #333;
134
+                    }
135
+                  }
136
+                  > span {
137
+                    border: none;
138
+                    margin-right: 0.03rem;
139
+                  }
140
+                }
141
+              }
142
+            }
143
+          }
144
+        }
145
+      }
146
+    }
147
+    &.Bottom {
148
+      background: #fff;
149
+      position: relative;
150
+      overflow: hidden;
151
+      box-shadow: 0 0 0.02rem 0.02rem rgba(0, 0, 0, 0.05);
152
+      z-index: 2;
153
+      padding: 0.15rem;
154
+      padding-bottom: 0.2rem;
155
+      > .Store {
156
+        font-size: 0;
157
+        text-align: center;
158
+        > a {
159
+          display: inline-block;
160
+          font-size: 0.14rem;
161
+          color: #333;
162
+          line-height: 0.2rem;
163
+          max-width: 100%;
164
+          overflow: hidden;
165
+          white-space: nowrap;
166
+          text-overflow: ellipsis;
167
+        }
168
+      }
169
+      > .Chuan {
170
+        margin: 0.1rem 0;
171
+        > span {
172
+          font-size: 0.14rem;
173
+          line-height: 0.2rem;
174
+          display: block;
175
+          white-space: nowrap;
176
+          overflow: hidden;
177
+          text-align: center;
178
+          text-overflow: ellipsis;
179
+        }
180
+      }
181
+      > .Count {
182
+        font-size: 0;
183
+        text-align: center;
184
+        white-space: nowrap;
185
+        margin-top: 0.05rem;
186
+        > span {
187
+          display: inline-block;
188
+          vertical-align: middle;
189
+          font-size: 0.12rem;
190
+          color: #333;
191
+          line-height: 0.2rem;
192
+          margin-left: 0.1rem;
193
+          &:first-child {
194
+            margin-left: 0;
195
+          }
196
+          > em {
197
+            color: #d91d36;
198
+            font-size: 0.12rem;
199
+            line-height: 0.2rem;
200
+            font-weight: bold;
201
+          }
202
+        }
203
+      }
204
+      > a {
205
+        display: block;
206
+        text-align: center;
207
+        font-size: 0.16rem;
208
+        line-height: 0.42rem;
209
+        background: #ccc;
210
+        border-radius: 0.06rem;
211
+        color: #fff;
212
+        margin-top: 0.1rem;
213
+        &.active {
214
+          background: #ff5200;
215
+        }
216
+      }
217
+    }
218
+    &.Layer {
219
+      width: 100%;
220
+      position: absolute;
221
+      left: 0;
222
+      top: 0;
223
+      bottom: 0;
224
+      z-index: 10;
225
+      background: rgba(0, 0, 0, 0.7);
226
+      > div {
227
+        width: 80%;
228
+        background: #fff;
229
+        border-radius: 0.06rem;
230
+        position: relative;
231
+        overflow: hidden;
232
+        padding-top: 0.15rem;
233
+        > span {
234
+          font-size: 0.14rem;
235
+          font-weight: bold;
236
+          color: #000;
237
+          line-height: 0.3rem;
238
+          display: block;
239
+          text-indent: 0.15rem;
240
+        }
241
+        > nav {
242
+          font-size: 0;
243
+          padding: 0 0.15rem;
244
+          > a {
245
+            display: inline-block;
246
+            font-size: 0.12rem;
247
+            color: #666;
248
+            border: 0.01rem solid #666;
249
+            border-radius: 0.03rem;
250
+            line-height: 0.2rem;
251
+            padding: 0 0.15rem;
252
+            margin-bottom: 0.1rem;
253
+            margin-right: 0.1rem;
254
+            &.active {
255
+              color: #fff;
256
+              background: #ff5200;
257
+              border-color: #ff5200;
258
+            }
259
+          }
260
+        }
261
+        > ul {
262
+          padding: 0 0.15rem;
263
+          position: relative;
264
+          overflow: hidden;
265
+          &.ScrollList {
266
+            max-height: 2.5rem;
267
+            overflow-y: scroll;
268
+            -webkit-overflow-scrolling: touch;
269
+          }
270
+          > li {
271
+            align-items: center;
272
+            border-top: 0.01rem solid #f7f7f7;
273
+            &:first-child {
274
+              border: none;
275
+            }
276
+            > div {
277
+              position: relative;
278
+              > div {
279
+                width: 100%;
280
+                position: relative;
281
+                > span {
282
+                  display: block;
283
+                  white-space: nowrap;
284
+                  overflow: hidden;
285
+                  text-overflow: ellipsis;
286
+                  font-size: 0.14rem;
287
+                  color: #333;
288
+                  line-height: 0.42rem;
289
+                }
290
+              }
291
+            }
292
+            > span {
293
+              font-size: 0.14rem;
294
+              color: #999;
295
+              margin-right: 0.1rem;
296
+            }
297
+            > i {
298
+              font-size: 0.2rem;
299
+              color: #999;
300
+              &.active {
301
+                color: #ff5200;
302
+              }
303
+            }
304
+          }
305
+        }
306
+        > .Bottom {
307
+          border-top: 0.01rem solid #f7f7f7;
308
+          > a {
309
+            font-size: 0.16rem;
310
+            line-height: 0.42rem;
311
+            text-align: center;
312
+            border-left: 0.01rem solid #f7f7f7;
313
+            &.active {
314
+              color: #ff5200;
315
+            }
316
+            &:first-child {
317
+              border: none;
318
+            }
319
+          }
320
+        }
321
+      }
322
+    }
323
+  }
324
+}

+ 4
- 0
src/router/index.js 查看文件

25
             path: '/index/ZuQiu', // 足球
25
             path: '/index/ZuQiu', // 足球
26
             name: 'ZuQiu',
26
             name: 'ZuQiu',
27
             component: resolve => (require(['@/pages/index/ZuQiu'], resolve))
27
             component: resolve => (require(['@/pages/index/ZuQiu'], resolve))
28
+          }, {
29
+            path: '/index/ZuQiuDingDan', // 足球订单
30
+            name: 'ZuQiuDingDan',
31
+            component: resolve => (require(['@/pages/index/ZuQiuDingDan'], resolve))
28
           }, {
32
           }, {
29
             path: '/index/LanQiu', // 篮球
33
             path: '/index/LanQiu', // 篮球
30
             name: 'LanQiu',
34
             name: 'LanQiu',

+ 0
- 2
src/util/Basketball.js 查看文件

18
   let minPrice
18
   let minPrice
19
   let maxPrice
19
   let maxPrice
20
 
20
 
21
-  debugger
22
-
23
   // 遍历模拟比赛的各种可能
21
   // 遍历模拟比赛的各种可能
24
   matches.forEach(match => {
22
   matches.forEach(match => {
25
     const [min, max] = GetMinAndMax(allParts, match)
23
     const [min, max] = GetMinAndMax(allParts, match)