瀏覽代碼

19-4-22-1

李昌恒 6 年之前
父節點
當前提交
5e549f59df
共有 100 個文件被更改,包括 8328 次插入5023 次删除
  1. 二進制
      .DS_Store
  2. 0 566
      vue_sports/.svn/pristine/13/13b4e2ce2cf8b15f0a506c8b14c522cf367059bd.svn-base
  3. 36 12
      vue_sports/.svn/pristine/1f/1f8eabe40f18e105be65964f21ef52883c375923.svn-base
  4. 二進制
      vue_sports/.svn/pristine/22/225038b3263f1f8caccb15bf7ddf5d5e32245b74.svn-base
  5. 0 565
      vue_sports/.svn/pristine/25/250a5f97598b8a3e10716bee5692e2cfbf46b776.svn-base
  6. 二進制
      vue_sports/.svn/pristine/32/3236ae92cefa3886e45fc3dc90a731d0bf670a4d.svn-base
  7. 二進制
      vue_sports/.svn/pristine/33/334361ee217698b84b627dd6d80f9b00d47467d9.svn-base
  8. 2 2
      vue_sports/.svn/pristine/39/399f3282fc962ef512a2400221733de195178f10.svn-base
  9. 8 2
      vue_sports/.svn/pristine/41/41f7d5eea30718361d2460dd6f3fcba283a51211.svn-base
  10. 316 166
      vue_sports/.svn/pristine/44/44ba7a69dfec4d4bda35aa7d7501fca0a9c1b626.svn-base
  11. 651 0
      vue_sports/.svn/pristine/48/484c2ab90fbf1c7d16cf9ee967e8967ce40d252e.svn-base
  12. 二進制
      vue_sports/.svn/pristine/5d/5d3d7bb7eb9c4792728194ee6d8301db5c5764ea.svn-base
  13. 7 2
      vue_sports/.svn/pristine/60/602c05b5046c81c4ecbe890272e24b6c86584ab3.svn-base
  14. 16 10
      vue_sports/.svn/pristine/66/66c756297cae2a94704266954046b6067af9bf5b.svn-base
  15. 18 3
      vue_sports/.svn/pristine/66/66cf4faed4cb6ab36c6d457b7586abc5433c8525.svn-base
  16. 899 0
      vue_sports/.svn/pristine/68/689a954d28c15c6f05ea7b497b3ba505614b0c31.svn-base
  17. 25 11
      vue_sports/.svn/pristine/6d/6d4120c067707601c02205e132535fc9168408f5.svn-base
  18. 16 21
      vue_sports/.svn/pristine/73/736c0d7a9702f014b63cfaeb92213e23c4d93903.svn-base
  19. 15 4
      vue_sports/.svn/pristine/7a/7aa1305ec88f008eca20c29c8798fb0468e6106c.svn-base
  20. 71 4
      vue_sports/.svn/pristine/7b/7bf089f135f9c0cb8c9cb567a761fb7c7af1d238.svn-base
  21. 173 0
      vue_sports/.svn/pristine/7c/7ce7f1f43ea49d3d50a5c5702b6416eaf8627ff5.svn-base
  22. 5 4
      vue_sports/.svn/pristine/86/864e405584cc9db4d7a02cf0ae6d557720163710.svn-base
  23. 0 549
      vue_sports/.svn/pristine/8e/8e23c89d102fe548a05f8e51770013224c882658.svn-base
  24. 二進制
      vue_sports/.svn/pristine/8e/8e7d413cd9d5859e97a17e90e007590eb21511f9.svn-base
  25. 二進制
      vue_sports/.svn/pristine/8f/8fc5557b63dc6a799fbc2180a1325fc1c0f9fc3c.svn-base
  26. 19 1
      vue_sports/.svn/pristine/9a/9a905562b6d981b78c9eb2925939232278270d97.svn-base
  27. 0 844
      vue_sports/.svn/pristine/a2/a25a9e2f1b1a1edb6d9c7d7ceaa7636a9f37ee76.svn-base
  28. 481 0
      vue_sports/.svn/pristine/af/af119b63f3af006113b0c0973b44b7b420ba6c50.svn-base
  29. 0 471
      vue_sports/.svn/pristine/b2/b29db425aca1ea54d41aba1397c46834edb0e224.svn-base
  30. 二進制
      vue_sports/.svn/pristine/b6/b66cd93d13630da74f82488b7b96e8efb2c2f17e.svn-base
  31. 14 0
      vue_sports/.svn/pristine/b7/b7386e8f770eed2a4dd01d5ba11029c5e1389e74.svn-base
  32. 16 10
      vue_sports/.svn/pristine/b8/b81728a99059658e8b173d0c540ba5982a921577.svn-base
  33. 16 9
      vue_sports/.svn/pristine/bc/bcb942409e1122cbee4a93c85ea5cdfe899ff0b3.svn-base
  34. 79 12
      vue_sports/.svn/pristine/be/be0b04b52e309253a3a2ac1db57ee8e8ef52fd37.svn-base
  35. 5 1
      vue_sports/.svn/pristine/be/be84dcb55c1994c29a6cd56b72d84dcc215ed725.svn-base
  36. 二進制
      vue_sports/.svn/pristine/c0/c07b9b018086910d216bfecaa7517d2b4157d304.svn-base
  37. 1 1
      vue_sports/.svn/pristine/c2/c24d09cce7692545e6ec09a097f76933a4353a66.svn-base
  38. 9 4
      vue_sports/.svn/pristine/c6/c6a350b765c623cd9211617a6fb6450c647baa04.svn-base
  39. 6 4
      vue_sports/.svn/pristine/c6/c6c12a6c7a160f8e1df36ac551624e49acf3d97f.svn-base
  40. 335 57
      vue_sports/.svn/pristine/c7/c7d841b5c97ecec11536dfd00d6a9975d1e0338f.svn-base
  41. 0 153
      vue_sports/.svn/pristine/ca/cac8122214ae67bb989204d115885500293e7a77.svn-base
  42. 10 4
      vue_sports/.svn/pristine/cf/cfcfb16cb695a7a355d118762014c8bf6cff168f.svn-base
  43. 二進制
      vue_sports/.svn/pristine/d1/d123b40ff3b41b986240f7dfea6a5716326ef825.svn-base
  44. 二進制
      vue_sports/.svn/pristine/d5/d50d213b5a5941d9c62b37192b997d1eaadbf1ff.svn-base
  45. 0 430
      vue_sports/.svn/pristine/d8/d89b10bf0483d0a8eefe6769534a3c4039a152b8.svn-base
  46. 18 0
      vue_sports/.svn/pristine/d8/d8c96903a07f0c1a11cc068f53859f627d885901.svn-base
  47. 63 15
      vue_sports/.svn/pristine/d9/d952938c7c4fa057c5ad467ab4a28640b863c8a9.svn-base
  48. 二進制
      vue_sports/.svn/pristine/dd/dd774e626ba5e641b5c457b1b5c68083977f640e.svn-base
  49. 31 18
      vue_sports/.svn/pristine/e4/e4e522cb7b21ed8b33cc3c7a9ef35c0c52b0e865.svn-base
  50. 17 8
      vue_sports/.svn/pristine/e8/e8a2ba0ad29b6130fb572e36356fefdaea8e6164.svn-base
  51. 二進制
      vue_sports/.svn/pristine/eb/eb1c409330d9b8d8b26521d24dd976be51c7d053.svn-base
  52. 二進制
      vue_sports/.svn/pristine/ee/ee30baedad4744a4c4810d2f28ba1b20ff117c6e.svn-base
  53. 20 2
      vue_sports/.svn/pristine/f0/f0a5cee4834b60eb6ef7ea1e1eadb080891de773.svn-base
  54. 46 33
      vue_sports/.svn/pristine/f2/f290f80e76d92fd9a65673c14a67404146da4273.svn-base
  55. 1022 0
      vue_sports/.svn/pristine/f3/f3258ab4ec5a62f0e802c91815ff41f6eae7514b.svn-base
  56. 二進制
      vue_sports/.svn/wc.db
  57. 5 1
      vue_sports/src/api/http.js
  58. 19 1
      vue_sports/src/api/ports.js
  59. 71 4
      vue_sports/src/assets/publicFunction.js
  60. 二進制
      vue_sports/src/assets/st-imges/Moreandmore.png
  61. 二進制
      vue_sports/src/assets/st-imges/Personalstatements.png
  62. 二進制
      vue_sports/src/assets/st-imges/Securitycenter.png
  63. 二進制
      vue_sports/src/assets/st-imges/Thedetail.png
  64. 二進制
      vue_sports/src/assets/st-imges/Themessage.png
  65. 二進制
      vue_sports/src/assets/st-imges/Thepersonaldata.png
  66. 二進制
      vue_sports/src/assets/st-imges/Thereport.png
  67. 二進制
      vue_sports/src/assets/st-imges/date.png
  68. 二進制
      vue_sports/src/assets/st-imges/deposit.png
  69. 二進制
      vue_sports/src/assets/st-imges/narrow.png
  70. 二進制
      vue_sports/src/assets/st-imges/touxiang.jpg
  71. 二進制
      vue_sports/src/assets/st-imges/withdrawals.png
  72. 31 18
      vue_sports/src/components/StBallDisc.vue
  73. 16 21
      vue_sports/src/components/StBasketballBlock.vue
  74. 335 57
      vue_sports/src/components/StBettingWindow.vue
  75. 25 11
      vue_sports/src/components/StCapot.vue
  76. 899 0
      vue_sports/src/components/StChampionsCup.vue
  77. 18 0
      vue_sports/src/components/StCharacteristic.vue
  78. 20 2
      vue_sports/src/components/StEntryForm.vue
  79. 16 9
      vue_sports/src/components/StGoal.vue
  80. 634 178
      vue_sports/src/components/StMatch.vue
  81. 79 12
      vue_sports/src/components/StNavBall.vue
  82. 2 2
      vue_sports/src/components/StRollingBall.vue
  83. 564 383
      vue_sports/src/components/StSerch.vue
  84. 316 166
      vue_sports/src/components/StSerchBox.vue
  85. 15 4
      vue_sports/src/components/StSports.vue
  86. 46 33
      vue_sports/src/components/StSportsHead.vue
  87. 70 50
      vue_sports/src/components/StTennis.vue
  88. 16 10
      vue_sports/src/components/StWaveBladder.vue
  89. 8 2
      vue_sports/src/components/dedicated/StFullHalf.vue
  90. 16 10
      vue_sports/src/components/dedicated/StGoalSingleAndDouble.vue
  91. 9 4
      vue_sports/src/components/dedicated/StGoalSize.vue
  92. 17 8
      vue_sports/src/components/dedicated/StOnlyWin.vue
  93. 10 4
      vue_sports/src/components/dedicated/StStartEnd.vue
  94. 36 12
      vue_sports/src/components/dedicated/StTeamGoalSize.vue
  95. 二進制
      vue_sports/src/components/dedicated/~$组件详情.docx
  96. 18 3
      vue_sports/src/pages/AllMatch/index/AllMatch.vue
  97. 481 0
      vue_sports/src/pages/Login/index/ProfitAndLossRecord.vue
  98. 6 4
      vue_sports/src/pages/Login/index/StLogin.vue
  99. 1 1
      vue_sports/src/pages/StLeagueBetting/index/StLeagueList.vue
  100. 63 15
      vue_sports/src/pages/StRollBallBettingPage/index/StRollBallBettingPage.vue

二進制
.DS_Store


+ 0 - 566
vue_sports/.svn/pristine/13/13b4e2ce2cf8b15f0a506c8b14c522cf367059bd.svn-base

@@ -1,566 +0,0 @@
-<template>
-  <div>
-      <div v-if="noData">
-      <NotOpend :title="this.info"/>
-    </div>
-    <!-- 让球&大小 -->
-    <div class="match" v-if="isShow && rShow">
-      <div v-for="(items,index) in letBallData" :key="items.id" class="mg">
-        <!-- <div v-for="items in list[index]" :key="items.id"> -->
-        <div class="row allAlignment  haderBox center">
-          <span>{{items.leagueName}}</span>
-          <div class="row Match-title-num">
-            <span>{{items.matchNum}}</span>
-          </div>
-        </div>
-        <div class="Match-box">
-          <div v-for="(itemList,index) in items.matchData" :key="itemList.id"   @click="matchInfo(itemList.match_id)">
-          
-              <div class="row allAlignment Match-box-top">
-                <div class="Match-box-top-left">
-                  <span>{{itemList.match_date}}</span>
-                  <span class="texttop">{{itemList.match_time}}</span>
-                </div>
-                <div class="Match-box-top-right row">
-                  <span style="margin-right: .1rem;" class="Match-box-top-num">{{itemList.tag}}</span>
-                  <span style="margin-right: .1rem;">让球</span>
-                  <span style="margin-right: .1rem;">大小</span>
-                </div>
-              </div>
-              <div class="row allAlignment center listbox">
-                <div class="column average name-box">
-                  <div>{{itemList.home_team}}</div>
-                  <div>{{itemList.guest_team}}</div>
-                </div>
-                <div class="Match-list-box row item-center average">
-                  <div v-for="(odds,i) in itemList.oddsData[0]" :key="odds.id" class="match-list">
-                    <div
-                      @click.stop="isclick(index,i)"
-                      class="column center"
-                      :class="items.istrue == i ?'active':''"
-                    >
-                      <span style="color:#FD8F26">{{odds.condition}}</span>
-                      <span>{{odds.odds}}</span>
-                    </div>
-                  </div>
-                </div>
-      
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-    <!-- 1x2 -->
-    <div v-if="!isShow && !ishow && rShow">
-      <div v-for="(item,index) in letBallData" :key="item.id" @click="betting()">
-        <div class="row allAlignment haderBox center">
-          <span>{{item.leagueName}}</span>
-          <div class="Match-title-num">
-            <span>{{item.matchNum}}</span>
-          </div>
-        </div>
-        <div v-for="(itemList,$index) in item.matchData" :key="itemList.id"   @click="matchInfo(itemList.match_id)">
- 
-            <div class="box">
-              <div class="row allAlignment item-center top-box">
-                <span>
-                  <i>{{itemList.match_date}}</i>
-                  <b style="color:#F76649;font-weight: normal;">{{itemList.match_time}}</b>
-                </span>
-                <span class="top-num">{{itemList.tag}}</span>
-              </div>
-            </div>
-            <div class="box-bottom">
-              <div class="box row item-center main-box">
-                <span v-if="itemList.home_score" class="num-box" style="color:#eb921e">{{itemList.home_score}}</span>
-                &nbsp;&nbsp;{{itemList.home_team}}
-              </div>
-              <div class="box row item-center main-box">
-                <span v-if="itemList.guest_score? itemList.guest_score:'0'" class="num-box" style="color:#eb921e">{{itemList.guest_score}}</span>
-                &nbsp;&nbsp;{{itemList.guest_team}}
-              </div>
-              <div class="footBox">
-                <div
-                  class="box row allAlignment bottom-box center"
-                  v-for="(odds,idx) in itemList.oddsData[1]"
-                  :key="odds.id"
-                >
-                  <div
-                    class="item-center bottom-num"
-                    :class="item.istrueA==true?'active':''"
-                    @click.stop="isClick(idx,1)"
-                  >
-                    <p style="color:#eb921e">{{odds.condition}}</p>
-                    <p>{{odds.odds}}</p>
-                  </div>
-                </div>
-       
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-    <!-- 独赢盘 -->
-      <div class="match" v-if="!isShow && ishow && rShow">
-        <div v-for="(items,index) in letBallData" :key="items.id" class="mg">
-        <!-- <div v-for="items in list[index]" :key="items.id"> -->
-        <div class="row allAlignment letBallBox center">
-          <span>{{items.leagueName}}</span>
-          <div class="row Match-title-num">
-            <span>{{items.matchNum}}</span>
-          </div>
-        </div>
-        <div class="Match-box">
-          <div v-for="(itemList,index) in items.matchData" :key="itemList.id" class="Match-box"   @click="matchInfo(itemList.match_id)">
-        
-              <div class="row allAlignment Match-box-top">
-                <div class="Match-box-top-left">
-                  <span>{{itemList.match_date}}</span>
-                  <span class="texttop">{{itemList.match_time}}</span>
-                </div>
-                <div class="Match-box-top-right row">
-                  <span style="margin-right: .1rem;" class="Match-box-top-num">{{itemList.tag}}</span>
-                  <!-- <span style="margin-right: .1rem;">让球</span> -->
-                  <span style="margin-right: .1rem;">独赢盘</span>
-                </div>
-              </div>
-              <div class="row allAlignment center listbox">
-                <div class="column average name-box">
-                  <div>{{itemList.home_team}}</div>
-                  <div>{{itemList.guest_team}}</div>
-                </div>
-                <div class="Match-list-box row item-center average">
-                  <div v-for="(odds,i) in itemList.oddsData[0]" :key="odds.id" class="match-list">
-                    <div
-                      @click.stop="isclick(index,i)"
-                      class="column center"
-                      :class="items.istrue==i?'active':''"
-                    >
-                      <span style="color:#FD8F26">{{odds.condition}}</span>
-                      <span>{{odds.odds}}</span>
-                    </div>
-                  </div>
-         
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-    <!-- 如过是网球则显示 -->
-        <div class="match" v-if="isShow && !rShow">
-      <div v-for="(items,index) in letBallData" :key="items.id" class="mg">
-        <!-- <div v-for="items in list[index]" :key="items.id"> -->
-        <div class="row allAlignment letBallBox center">
-          <span>{{items.leagueName}}</span>
-          <div class="row Match-title-num">
-            <span>{{items.matchNum}}</span>
-          </div>
-        </div>
-        <div class="Match-box">
-          <div v-for="(itemList,index) in items.matchData" :key="itemList.id" class="Match-box"   @click="matchInfo(itemList.match_id)">
-        
-              <div class="row allAlignment Match-box-top">
-                <div class="Match-box-top-left">
-                  <span>{{itemList.match_date}}</span>
-                  <span class="texttop">{{itemList.match_time}}</span>
-                </div>
-                <div class="Match-box-top-right row">
-                  <span style="margin-right: .1rem;" class="Match-box-top-num">{{itemList.tag}}</span>
-                  <span style="margin-right: .1rem;">独赢盘</span>
-                  <span style="margin-right: .1rem;">让盘</span>
-                </div>
-              </div>
-              <div class="row allAlignment center listbox">
-                <div class="column average name-box">
-                  <div>{{itemList.home_team}}</div>
-                  <div>{{itemList.guest_team}}</div>
-                </div>
-                <div class="Match-list-box row item-center average">
-                  <div v-for="(odds,i) in itemList.oddsData[0]" :key="odds.id" class="match-list">
-                    <div
-                      @click.stop="isclick(index,i)"
-                      class="column center"
-                      :class="items.istrue ? 'active':''"
-                    >
-                      <span style="color:#FD8F26">{{odds.condition}}</span>
-                      <span>{{odds.odds}}</span>
-                    </div>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </div>
-      </div>
-    </div>
-    <div class="BettingWindow" v-if="isWindow">
-      <BettingWindow />
-    </div>
-
-  </div>
-</template>
-<script>
-import Bus from "../assets/bus.js";
-import NotOpend from "@/components/StNotOpend";
-import BettingWindow from '@/components/StBettingWindow';
-export default {
-  props: ["gameCode", "name",'ishow'],
-  components:{NotOpend,BettingWindow},
-  data() {
-    return {
-      show: false, //暂时状态
-      isShow: true,
-      noData: true, //显示暂无数据
-      rShow:true,//是否为棒球与网球,是则不显示
-      info: "没有相关比赛信息",
-      status: false,
-      isWindow :false,//投注组件隐藏
-      isAjax:false,//开关
-      list:[],
-      letBallData: "" ,//让球大小和1X2数据
-    };
-  },
-  /**
-   * 函数方法
-   */
-  methods: {
-    matchInfo(id){
-      this.$router.push({path:'/StRollBallBettingPage',query:{gameCode: this.$store.getters.getBallId,number:1,home:true}});
-      this.$store.dispatch("MACTH_ID",id);
-    },
-    //打开联赛投注页面
-    goMatchInfo: function(leagueId, sessionId) {
-      //console.log(leagueId, sessionId);
-      this.$store.dispatch("GETSHOW", true);
-      Bus.$on("show", data => {
-        this.isShow = data;
-      });
-    },
-    getAjax: function(game_code,type_code) {
-      this.$store.dispatch('GETSHOW',true);
-      if(!game_code || !type_code) return false;
-      this.$http
-        .get(this.$ports.match.matchState, { 
-          game_code,
-          type_code
-        })
-        .then(res => {
-          this.isAjax = true
-          if(res.data.status == 1 && res.data.data.length >0  && res.data != null){
-            this.letBallData = res.data.data;
-          // console.log('  this.letBallData',  this.letBallData)
-           this.noData = false;
-          }else{
-            //  是否显示组件
-            this.noData = true;
-            //console.log('data',this.noData)
-            // 每次更新数据没有数据时则置空。
-             this.letBallData = [];
-            
-          }
-          // 状态值数据更改
-          this.$store.dispatch('GETSHOW',false);
-        });
-    },
-    isClick() {
-    
-            if(this.$store.getters.getIsBetting==true){
-           return false
-       }
-      
-        this.$store.dispatch('ISBETTING',true)
-      // this.$set(this.letBallData.matchData[1].oddsData[1][i], "istrue", (this.letBallData.list[i].istrue = num));
-    },
-    betting(){
-      this.isWindow = true;
-    },
-    // 点击事件确认选中
-    isclick(index, num) {
-        console.log(this.letBallData)
-       if(this.$store.getters.getIsBetting==true){
-           return false
-       }
-      
-        this.$store.dispatch('ISBETTING',true)
-    }
-  },
-  /**
-   * 计算属性
-   */
-  computed: {
-    getInfo: function() {
-      // 监听vuex状态值的改变
-      this.goMatchInfo();
- 
-      return {game_code: this.$store.getters.getBallId,type_code:this.$store.getters.getActivity}
-    },
-     IsWindow(){
-      return  this.$store.getters.getIsBetting
-    }
-  },
-  watch: {
-    getInfo(obj) {
-         if(this.$store.getters.getActivity == "StSoon" || this.$store.getters.getActivity == "StRollBall" ){
-        if(this.isAjax ){
-        this.getAjax(obj.game_code,obj.type_code);
-        }
-      }
-      if(obj.game_code == 'wq'){
-          this.rShow = false;
-      }else{
-        this.rShow = true;
-      }
-    },
-      IsWindow(val){
-       this.isWindow = val;
-    }
-  },
-  mounted(){
-    this.getAjax(this.$store.getters.getBallId,this.$store.getters.getActivity);
-  }
-};
-</script>
-<style scoped>
-.yd-cell-box .yd-cell {
-  z-index: 99;
-  border-radius: 0.2rem;
-}
-.matchBox {
-  background: #f9f9f9;
-  padding: 0.27rem 0.34rem 0 0.32rem;
-}
-.match .tit {
-  display: flex;
-  justify-content: space-between;
-  font-size: 0.32rem;
-  margin-bottom: 0.3rem;
-}
-.match .list {
-  overflow: hidden;
-  transition: all 0.3s cubic-bezier(0.4, 0.6, 0.2, 1);
-}
-.match .list div {
-  background: #dcdcdc;
-  width: 100%;
-  height: 0.88rem;
-  padding: 0.26rem 0.56rem 0.3rem 0.3rem;
-  display: flex;
-  justify-content: space-between;
-  border-radius: 0.08rem;
-  margin-bottom: 0.12rem;
-}
-.match .list span {
-  color: #333333;
-  font-size: 0.28rem;
-}
-.match .list .num {
-  width: 0.4rem;
-  height: 0.4rem;
-  display: inline-block;
-  line-height: 0.4rem;
-  text-align: center;
-  color: #f5f5f5;
-  border-radius: 50%;
-  font-size: 0.2rem;
-  background: #f76649;
-}
-.yd-accordion {
-  background: transparent;
-}
-.match .list div:nth-last-child(1) {
-  margin-bottom: 0.34rem;
-}
-div /deep/ .yd-accordion-head,
-div /deep/ .yd-accordion-head-content,
-div /deep/ .yd-accordion-title,
-div /deep/ .yd-accordion-title-full {
-  height: 0.3rem;
-}
-div /deep/ .yd-accordion-title {
-  min-height: 0;
-  font-size: 0.28rem;
-}
-div /deep/ .yd-accordion-head {
-  margin-bottom: 0.3rem;
-  border: none;
-}
-.list-box {
-  border: 2px solid #cecece;
-  border-radius: 0.2rem;
-}
-div /deep/ .yd-accordion-head:after {
-  height: 0px;
-}
-div /deep/ .yd-accordion-head-arrow:after {
-  border: none;
-  width: 0.4rem;
-  height: 0.4rem;
-  background: url("../assets/st-imges/xiangxia.png") no-repeat;
-  background-size: 0.4rem 0.4rem;
-}
-/* 1x2 */
-.top-box {
-  height: 0.44rem;
-  font-size: 0.24rem;
-  background: #fff;
-  border-bottom: 1px solid #e4e4e4;
-}
-.box-bottom {
-  /* height: 2.9rem;  */
-}
-.top-num {
-  display: inline-block;
-  width: 0.64rem;
-  height: 0.44rem;
-  line-height: 0.44rem;
-  color: #000000;
-  text-align: center;
-  background: #ebebeb;
-  font-size: 0.24rem;
-}
-.box {
-  padding: 0 0.32rem;
-  background: #fff;
-}
-.Match-title-num {
-  width: 0.46rem;
-  height: 0.46rem;
-  line-height: 0.46rem;
-  text-align: center;
-  background: #f76649;
-  font-size: 0.26rem;
-  border-radius: 50%;
-  color: #e4e4e4;
-}
-.haderBox {
-  padding: 0 0.32rem;
-  height: 0.88rem;
-  font-size: 0.32rem;
-  background: #f8f8f8;
-}
-.main-box {
-  height: 0.9rem;
-  background: #fff;
-  font-size: 0.28rem;
-}
-.bottom-box {
-  height: 1.1rem;
-  background: #fff;
-  font-size: 0.24rem;
-}
-.bottom-box div {
-  width: 1.07rem;
-  height: 0.76rem;
-  border: 2px solid #cecece;
-  border-radius: 0.1rem;
-  font-size: 0.24rem;
-}
-.bottom-num {
-  padding: 0.1rem;
-  text-align: center;
-}
-.active {
-  background: #f76649;
-  border: 2px solid #f76649 !important;
-}
-.active > p {
-  color: #e4e4e4 !important;
-}
-.num-box {
-  width: 0.66rem;
-  height: 0.34rem;
-  background: #f76649;
-  border-radius: 0.17rem;
-  color: #f5f5f5 !important;
-  line-height: 0.34rem;
-  text-align: center;
-}
-.footBox {
-  display: flex;
-  flex-wrap: wrap;
-  align-items: center;
-}
-.footBox .box {
-  width: 33%;
-  text-align: center;
-}
-/* 让球&大小 */
-.letBallBox {
-  padding: 0 0.32rem;
-  height: 0.88rem;
-  font-size: 0.28rem;
-  background: #f4f4f4;
-}
-
-.mg {
-  margin-bottom: 0.1rem;
-}
-.Match-title-num {
-  width: 0.46rem;
-  height: 0.46rem;
-  align-items: center;
-  justify-content: center;
-  line-height: 0.46rem;
-  text-align: center;
-  background: #f76649;
-  font-size: 0.2rem;
-  border-radius: 50%;
-  color: #f5f5f5;
-}
-
-.Match-box-top-right > span {
-  width: 1.07rem;
-  text-align: center;
-}
-.listbox{
-  padding: 0 .32rem;
-}
-.name-box {
-  height: 1.76rem;
-  width: 3.8rem;
-}
-.Match-box-top {
-  height: 0.44rem;
-  padding: 0 0.32rem;
-  line-height: 0.44rem;
-  background: #DCDCDC;
-  font-size: 0.23rem;
-}
-.Match-box-top-num {
-  width:0.64rem !important;
-  
-  height: 0.44rem;
-  background: #ebebeb;
-  font-size: 0.24rem;
-}
-.texttop{
-  color: #f76649
-}
-.Match-box {
-  padding-top: .12rem;
-  background: #f8f8f8;
-}
-.Match-list-box {
-  width: 35%;
-  height: 1.76rem;
-  flex-wrap: wrap;
-}
-.Match-list-box .match-list div {
-  width: 1.07rem;
-  height: 0.8rem;
-  border: 2px solid #cecece;
-  border-radius: 0.1rem;
-  flex-wrap: wrap;
-}
-.active {
-  background: #e4e4e4;
-}
-/* 模态框样式 */
-.BettingWindow{
-  z-index: 10000;
-  position:fixed;
-  top:0;
-  width: 100%;
-}
-
-</style>

+ 36 - 12
vue_sports/.svn/pristine/d2/d27528b877bdbbe8ca9dbe0980a7bbf8602165e7.svn-base → vue_sports/.svn/pristine/1f/1f8eabe40f18e105be65964f21ef52883c375923.svn-base

@@ -10,7 +10,7 @@
                   <div v-for="(items) in item.data.a" class=" left-box">
                     <div class="row allAlignment center">
                       <span>大</span>
-                      <div class="column center btn-box">
+                      <div class="column center btn-box" @click="bettingBtn(items.id,'大',items.odds_only,items.p_code,match_id)">
                         <span style="color: #FD8F26;" v-if="items.condition">{{ items.condition }}</span>
                         <span>{{ items.odds }}</span>
                       </div>
@@ -21,7 +21,7 @@
                   <div v-for="(items) in item.data.b" class="right-box">
                     <div class="row allAlignment center ">
                       <span>小</span>
-                      <div class="column center btn-box">
+                      <div class="column center btn-box" @click="bettingBtn(items.id,'小',items.odds_only,items.p_code,match_id)">
                         <span style="color: #FD8F26;" v-if="items.condition">{{ items.condition }}</span>
                         <span>{{ items.odds }}</span>
                       </div>
@@ -44,18 +44,38 @@ export default {
       guest_team: "",
       title: "球队进球大小",
       data: [],
-      isDisplay: false
+      isDisplay: false,
+      match_id:'',
     };
   },
   methods: {
-    // 点击更改组件选中状态
-    Theclubboxclick(num) {
-      // 更改组件是否选中
-      //   this.$set(
-      //     this.table.list[num],
-      //     "istrue",
-      //     this.table.list[num].istrue == true ? false : true
-      //   );
+    bettingBtn(id,name,odds,odds_only,p_code,match_id,condition='',bettingTime='') {
+      console.log(id,name,odds,odds_only,p_code,match_id,'我的')
+        let _this = this;
+     let bettingInfo = {
+        id,
+        home_team:this.home_team,
+        guest_team:this.guest_team,
+        name,
+        odds,
+        p_code,
+        match_id,
+        condition,
+        ganame:this.title,
+        score:this.score,
+        bettingTime,
+        odds_only,
+         ballId:this.$store.getters.getBallId,
+      }
+      //调用玩法投注公共方法
+      this.$public.bettingFunction(this.betting,bettingInfo,this.data,this.$store.getters.getBetting,this.title,this.dataNum,function(res,type){
+        _this.$set(res,'isTrue',type);
+      },function(data,val){
+         _this.$store.dispatch("BETTING", []);
+          _this.$store.dispatch("BETTING", data ? data : val);
+          if(_this.$store.getters.getIsBetting) return false
+          _this.$store.dispatch("ISBETTING",true)
+      })
     }
   },
   computed: {
@@ -65,6 +85,7 @@ export default {
   },
   watch: {
     getUserIcons(val) {
+      this.match_id=val.match_id
       if (!val) return false;
       this.home_team = val.home_team;
       this.guest_team = val.guest_team;
@@ -130,7 +151,10 @@ export default {
 
       console.log(this.data);
     }
-  }
+  },
+  mounted() {
+     console.log('/////',this.data)
+  },
 };
 </script>
 

二進制
vue_sports/.svn/pristine/22/225038b3263f1f8caccb15bf7ddf5d5e32245b74.svn-base


+ 0 - 565
vue_sports/.svn/pristine/25/250a5f97598b8a3e10716bee5692e2cfbf46b776.svn-base

@@ -1,565 +0,0 @@
-<template>
-  <div>
-      <div v-if="noData">
-      <NotOpend :title="this.info"/>
-    </div>
-    <!-- 让球&大小 -->
-    <div class="match" v-if="isShow && rShow">
-      <div v-for="(items,index) in letBallData" :key="items.id" class="mg">
-        <!-- <div v-for="items in list[index]" :key="items.id"> -->
-        <div class="row allAlignment  haderBox center">
-          <span>{{items.leagueName}}</span>
-          <div class="row Match-title-num">
-            <span>{{items.matchNum}}</span>
-          </div>
-        </div>
-        <div class="Match-box">
-          <div v-for="(itemList,index) in items.matchData" :key="itemList.id"   @click="matchInfo(itemList.match_id)">
-          
-              <div class="row allAlignment Match-box-top">
-                <div class="Match-box-top-left">
-                  <span>{{itemList.match_date}}</span>
-                  <span class="texttop">{{itemList.match_time}}</span>
-                </div>
-                <div class="Match-box-top-right row">
-                  <span style="margin-right: .1rem;" class="Match-box-top-num">{{itemList.tag}}</span>
-                  <span style="margin-right: .1rem;">让球</span>
-                  <span style="margin-right: .1rem;">大小</span>
-                </div>
-              </div>
-              <div class="row allAlignment center listbox">
-                <div class="column average name-box">
-                  <div>{{itemList.home_team}}</div>
-                  <div>{{itemList.guest_team}}</div>
-                </div>
-                <div class="Match-list-box row item-center average">
-                  <div v-for="(odds,i) in itemList.oddsData[0]" :key="odds.id" class="match-list">
-                    <div
-                      @click.stop="isclick(index,i)"
-                      class="column center"
-                      :class="items.istrue == i ?'active':''"
-                    >
-                      <span style="color:#FD8F26">{{odds.condition}}</span>
-                      <span>{{odds.odds}}</span>
-                    </div>
-                  </div>
-                </div>
-      
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-    <!-- 1x2 -->
-    <div v-if="!isShow && !ishow && rShow">
-      <div v-for="(item,index) in letBallData" :key="item.id" @click="betting()">
-        <div class="row allAlignment haderBox center">
-          <span>{{item.leagueName}}</span>
-          <div class="Match-title-num">
-            <span>{{item.matchNum}}</span>
-          </div>
-        </div>
-        <div v-for="(itemList,$index) in item.matchData" :key="itemList.id"   @click="matchInfo(itemList.match_id)">
- 
-            <div class="box">
-              <div class="row allAlignment item-center top-box">
-                <span>
-                  <i>{{itemList.match_date}}</i>
-                  <b style="color:#F76649;font-weight: normal;">{{itemList.match_time}}</b>
-                </span>
-                <span class="top-num">{{itemList.tag}}</span>
-              </div>
-            </div>
-            <div class="box-bottom">
-              <div class="box row item-center main-box">
-                <span v-if="itemList.home_score" class="num-box" style="color:#eb921e">{{itemList.home_score}}</span>
-                &nbsp;&nbsp;{{itemList.home_team}}
-              </div>
-              <div class="box row item-center main-box">
-                <span v-if="itemList.guest_score" class="num-box" style="color:#eb921e">{{itemList.guest_score}}</span>
-                <!-- <span v-if="itemList.guest_score? itemList.guest_score:'0'" class="num-box" style="color:#eb921e">{{itemList.guest_score}}</span> -->
-                &nbsp;&nbsp;{{itemList.guest_team}}
-              </div>
-              <div class="footBox">
-                <div
-                  class="box row allAlignment bottom-box center"
-                  v-for="(odds,idx) in itemList.oddsData[1]"
-                  :key="odds.id"
-                >
-                  <div
-                    class="item-center bottom-num"
-                    :class="item.istrueA==true?'active':''"
-                    @click.stop="isClick(idx,1)"
-                  >
-                    <p style="color:#eb921e">{{odds.condition}}</p>
-                    <p>{{odds.odds}}</p>
-                  </div>
-                </div>
-       
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-    <!-- 独赢盘 -->
-      <div class="match" v-if="!isShow && ishow && rShow">
-        <div v-for="(items,index) in letBallData" :key="items.id" class="mg">
-        <!-- <div v-for="items in list[index]" :key="items.id"> -->
-        <div class="row allAlignment letBallBox center">
-          <span>{{items.leagueName}}</span>
-          <div class="row Match-title-num">
-            <span>{{items.matchNum}}</span>
-          </div>
-        </div>
-        <div class="Match-box">
-          <div v-for="(itemList,index) in items.matchData" :key="itemList.id" class="Match-box"   @click="matchInfo(itemList.match_id)">
-        
-              <div class="row allAlignment Match-box-top">
-                <div class="Match-box-top-left">
-                  <span>{{itemList.match_date}}</span>
-                  <span class="texttop">{{itemList.match_time}}</span>
-                </div>
-                <div class="Match-box-top-right row">
-                  <span style="margin-right: .1rem;" class="Match-box-top-num">{{itemList.tag}}</span>
-                  <!-- <span style="margin-right: .1rem;">让球</span> -->
-                  <span style="margin-right: .1rem;">独赢盘</span>
-                </div>
-              </div>
-              <div class="row allAlignment center listbox">
-                <div class="column average name-box">
-                  <div>{{itemList.home_team}}</div>
-                  <div>{{itemList.guest_team}}</div>
-                </div>
-                <div class="Match-list-box row item-center average">
-                  <div v-for="(odds,i) in itemList.oddsData[0]" :key="odds.id" class="match-list">
-                    <div
-                      @click.stop="isclick(index,i)"
-                      class="column center"
-                      :class="items.istrue==i?'active':''"
-                    >
-                      <span style="color:#FD8F26">{{odds.condition}}</span>
-                      <span>{{odds.odds}}</span>
-                    </div>
-                  </div>
-         
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-    <!-- 如过是网球则显示 -->
-        <div class="match" v-if="isShow && !rShow">
-      <div v-for="(items,index) in letBallData" :key="items.id" class="mg">
-        <!-- <div v-for="items in list[index]" :key="items.id"> -->
-        <div class="row allAlignment letBallBox center">
-          <span>{{items.leagueName}}</span>
-          <div class="row Match-title-num">
-            <span>{{items.matchNum}}</span>
-          </div>
-        </div>
-        <div class="Match-box">
-          <div v-for="(itemList,index) in items.matchData" :key="itemList.id" class="Match-box"   @click="matchInfo(itemList.match_id)">
-        
-              <div class="row allAlignment Match-box-top">
-                <div class="Match-box-top-left">
-                  <span>{{itemList.match_date}}</span>
-                  <span class="texttop">{{itemList.match_time}}</span>
-                </div>
-                <div class="Match-box-top-right row">
-                  <span style="margin-right: .1rem;" class="Match-box-top-num">{{itemList.tag}}</span>
-                  <span style="margin-right: .1rem;">独赢盘</span>
-                  <span style="margin-right: .1rem;">让盘</span>
-                </div>
-              </div>
-              <div class="row allAlignment center listbox">
-                <div class="column average name-box">
-                  <div>{{itemList.home_team}}</div>
-                  <div>{{itemList.guest_team}}</div>
-                </div>
-                <div class="Match-list-box row item-center average">
-                  <div v-for="(odds,i) in itemList.oddsData[0]" :key="odds.id" class="match-list">
-                    <div
-                      @click.stop="isclick(index,i)"
-                      class="column center"
-                      :class="items.istrue ? 'active':''"
-                    >
-                      <span style="color:#FD8F26">{{odds.condition}}</span>
-                      <span>{{odds.odds}}</span>
-                    </div>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </div>
-      </div>
-    </div>
-    <div class="BettingWindow" v-if="isWindow">
-      <BettingWindow />
-    </div>
-
-  </div>
-</template>
-<script>
-import Bus from "../assets/bus.js";
-import NotOpend from "@/components/StNotOpend";
-import BettingWindow from '@/components/StBettingWindow';
-export default {
-  props: ["gameCode", "name",'ishow'],
-  components:{NotOpend,BettingWindow},
-  data() {
-    return {
-      show: false, //暂时状态
-      isShow: true,
-      noData: true, //显示暂无数据
-      rShow:true,//是否为棒球与网球,是则不显示
-      info: "没有相关比赛信息",
-      status: false,
-      isWindow :false,//投注组件隐藏
-      isAjax:false,//开关
-      list:[],
-      letBallData: "" ,//让球大小和1X2数据
-    };
-  },
-  /**
-   * 函数方法
-   */
-  methods: {
-    matchInfo(id){
-      this.$router.push({path:'/StRollBallBettingPage',query:{gameCode: this.$store.getters.getBallId,number:1,home:true}});
-      this.$store.dispatch("MACTH_ID",id);
-    },
-    //打开联赛投注页面
-    goMatchInfo: function(leagueId, sessionId) {
-      //console.log(leagueId, sessionId);
-      this.$store.dispatch("GETSHOW", true);
-      Bus.$on("show", data => {
-        this.isShow = data;
-      });
-    },
-    getAjax: function(game_code,type_code) {
-      this.$store.dispatch('GETSHOW',true);
-      if(!game_code || !type_code) return false;
-      this.$http
-        .get(this.$ports.match.matchState, { 
-          game_code,
-          type_code
-        })
-        .then(res => {
-          this.isAjax = true
-          if(res.data.status == 1 && res.data.data.length >0  && res.data != null){
-            this.letBallData = res.data.data;
-          // console.log('  this.letBallData',  this.letBallData)
-           this.noData = false;
-          }else{
-            //  是否显示组件
-            this.noData = true;
-            //console.log('data',this.noData)
-            // 每次更新数据没有数据时则置空。
-             this.letBallData = [];
-            
-          }
-          // 状态值数据更改
-          this.$store.dispatch('GETSHOW',false);
-        });
-    },
-    isClick() {
-            if(this.$store.getters.getIsBetting==true){
-           return false
-       }
-      
-        this.$store.dispatch('ISBETTING',true)
-      // this.$set(this.letBallData.matchData[1].oddsData[1][i], "istrue", (this.letBallData.list[i].istrue = num));
-    },
-    betting(){
-      this.isWindow = true;
-    },
-    // 点击事件确认选中
-    isclick(index, num) {
-       if(this.$store.getters.getIsBetting==true){
-           return false
-       }
-      
-        this.$store.dispatch('ISBETTING',true)
-    }
-  },
-  /**
-   * 计算属性
-   */
-  computed: {
-    getInfo: function() {
-      // 监听vuex状态值的改变
-      this.goMatchInfo();
- 
-      return {game_code: this.$store.getters.getBallId,type_code:this.$store.getters.getActivity}
-    },
-     IsWindow(){
-      return  this.$store.getters.getIsBetting
-    }
-  },
-  watch: {
-    getInfo(obj) {
-         if(this.$store.getters.getActivity == "StSoon" || this.$store.getters.getActivity == "StRollBall" ){
-        if(this.isAjax ){
-        this.getAjax(obj.game_code,obj.type_code);
-        }
-      }
-      if(obj.game_code == 'wq'){
-          this.rShow = false;
-      }else{
-        this.rShow = true;
-      }
-    },
-      IsWindow(val){
-       this.isWindow = val;
-    }
-  },
-  mounted(){
-    this.getAjax(this.$store.getters.getBallId,this.$store.getters.getActivity);
-  }
-};
-</script>
-<style scoped>
-.yd-cell-box .yd-cell {
-  z-index: 99;
-  border-radius: 0.2rem;
-}
-.matchBox {
-  background: #f9f9f9;
-  padding: 0.27rem 0.34rem 0 0.32rem;
-}
-.match .tit {
-  display: flex;
-  justify-content: space-between;
-  font-size: 0.32rem;
-  margin-bottom: 0.3rem;
-}
-.match .list {
-  overflow: hidden;
-  transition: all 0.3s cubic-bezier(0.4, 0.6, 0.2, 1);
-}
-.match .list div {
-  background: #dcdcdc;
-  width: 100%;
-  height: 0.88rem;
-  padding: 0.26rem 0.56rem 0.3rem 0.3rem;
-  display: flex;
-  justify-content: space-between;
-  border-radius: 0.08rem;
-  margin-bottom: 0.12rem;
-}
-.match .list span {
-  color: #333333;
-  font-size: 0.28rem;
-}
-.match .list .num {
-  width: 0.4rem;
-  height: 0.4rem;
-  display: inline-block;
-  line-height: 0.4rem;
-  text-align: center;
-  color: #f5f5f5;
-  border-radius: 50%;
-  font-size: 0.2rem;
-  background: #f76649;
-}
-.yd-accordion {
-  background: transparent;
-}
-.match .list div:nth-last-child(1) {
-  margin-bottom: 0.34rem;
-}
-div /deep/ .yd-accordion-head,
-div /deep/ .yd-accordion-head-content,
-div /deep/ .yd-accordion-title,
-div /deep/ .yd-accordion-title-full {
-  height: 0.3rem;
-}
-div /deep/ .yd-accordion-title {
-  min-height: 0;
-  font-size: 0.28rem;
-}
-div /deep/ .yd-accordion-head {
-  margin-bottom: 0.3rem;
-  border: none;
-}
-.list-box {
-  border: 2px solid #cecece;
-  border-radius: 0.2rem;
-}
-div /deep/ .yd-accordion-head:after {
-  height: 0px;
-}
-div /deep/ .yd-accordion-head-arrow:after {
-  border: none;
-  width: 0.4rem;
-  height: 0.4rem;
-  background: url("../assets/st-imges/xiangxia.png") no-repeat;
-  background-size: 0.4rem 0.4rem;
-}
-/* 1x2 */
-.top-box {
-  height: 0.44rem;
-  font-size: 0.24rem;
-  background: #fff;
-  border-bottom: 1px solid #e4e4e4;
-}
-.box-bottom {
-  /* height: 2.9rem;  */
-}
-.top-num {
-  display: inline-block;
-  width: 0.64rem;
-  height: 0.44rem;
-  line-height: 0.44rem;
-  color: #000000;
-  text-align: center;
-  background: #ebebeb;
-  font-size: 0.24rem;
-}
-.box {
-  padding: 0 0.32rem;
-  background: #fff;
-}
-.Match-title-num {
-  width: 0.46rem;
-  height: 0.46rem;
-  line-height: 0.46rem;
-  text-align: center;
-  background: #f76649;
-  font-size: 0.26rem;
-  border-radius: 50%;
-  color: #e4e4e4;
-}
-.haderBox {
-  padding: 0 0.32rem;
-  height: 0.88rem;
-  font-size: 0.32rem;
-  background: #f8f8f8;
-}
-.main-box {
-  height: 0.9rem;
-  background: #fff;
-  font-size: 0.28rem;
-}
-.bottom-box {
-  height: 1.1rem;
-  background: #fff;
-  font-size: 0.24rem;
-}
-.bottom-box div {
-  width: 1.07rem;
-  height: 0.76rem;
-  border: 2px solid #cecece;
-  border-radius: 0.1rem;
-  font-size: 0.24rem;
-}
-.bottom-num {
-  padding: 0.1rem;
-  text-align: center;
-}
-.active {
-  background: #f76649;
-  border: 2px solid #f76649 !important;
-}
-.active > p {
-  color: #e4e4e4 !important;
-}
-.num-box {
-  width: 0.66rem;
-  height: 0.34rem;
-  background: #f76649;
-  border-radius: 0.17rem;
-  color: #f5f5f5 !important;
-  line-height: 0.34rem;
-  text-align: center;
-}
-.footBox {
-  display: flex;
-  flex-wrap: wrap;
-  align-items: center;
-}
-.footBox .box {
-  width: 33%;
-  text-align: center;
-}
-/* 让球&大小 */
-.letBallBox {
-  padding: 0 0.32rem;
-  height: 0.88rem;
-  font-size: 0.28rem;
-  background: #f4f4f4;
-}
-
-.mg {
-  margin-bottom: 0.1rem;
-}
-.Match-title-num {
-  width: 0.46rem;
-  height: 0.46rem;
-  align-items: center;
-  justify-content: center;
-  line-height: 0.46rem;
-  text-align: center;
-  background: #f76649;
-  font-size: 0.2rem;
-  border-radius: 50%;
-  color: #f5f5f5;
-}
-
-.Match-box-top-right > span {
-  width: 1.07rem;
-  text-align: center;
-}
-.listbox{
-  padding: 0 .32rem;
-}
-.name-box {
-  height: 1.76rem;
-  width: 3.8rem;
-}
-.Match-box-top {
-  height: 0.44rem;
-  padding: 0 0.32rem;
-  line-height: 0.44rem;
-  background: #DCDCDC;
-  font-size: 0.23rem;
-}
-.Match-box-top-num {
-  width:0.64rem !important;
-  
-  height: 0.44rem;
-  background: #ebebeb;
-  font-size: 0.24rem;
-}
-.texttop{
-  color: #f76649
-}
-.Match-box {
-  padding-top: .12rem;
-  background: #f8f8f8;
-}
-.Match-list-box {
-  width: 35%;
-  height: 1.76rem;
-  flex-wrap: wrap;
-}
-.Match-list-box .match-list div {
-  width: 1.07rem;
-  height: 0.8rem;
-  border: 2px solid #cecece;
-  border-radius: 0.1rem;
-  flex-wrap: wrap;
-}
-.active {
-  background: #e4e4e4;
-}
-/* 模态框样式 */
-.BettingWindow{
-  z-index: 10000;
-  position:fixed;
-  top:0;
-  width: 100%;
-}
-
-</style>

二進制
vue_sports/.svn/pristine/32/3236ae92cefa3886e45fc3dc90a731d0bf670a4d.svn-base


二進制
vue_sports/.svn/pristine/33/334361ee217698b84b627dd6d80f9b00d47467d9.svn-base


+ 2 - 2
vue_sports/.svn/pristine/62/628d45e780484f87168c06784a6b9705d82887d4.svn-base → vue_sports/.svn/pristine/39/399f3282fc962ef512a2400221733de195178f10.svn-base

@@ -10,7 +10,7 @@
   import '../css/index.css';
  
   export default {
-    props: ["name",'index','id','type','gameCode','ballName'],
+    props: ["name",'index','id','type','gameCode','ballName','gameCode','lgId'],
     data() {
       return {
       };
@@ -22,7 +22,7 @@
             this.$store.dispatch('GET_BALL_ID',this.id);
             this.$router.push({ path: '/StRollBallpage', query:{ titleNumber: e }});
           }else{
-            this.$router.push({path:'/StLeagueBetting',query:{ id:this.index,gameCode:this.gameCode,name:this.name,number: 0 ,home:true}});
+            this.$router.push({path:'StLeagueList',query:{ gameCode:this.gameCode,lgId:this.lgId, id:this.index,gameCode:this.gameCode,name:this.name,number: 0 ,home:true,btn:2}});
           
          }
        }

+ 8 - 2
vue_sports/.svn/pristine/e2/e21fa907e73a546f845fd5157cd1619274fb788f.svn-base → vue_sports/.svn/pristine/41/41f7d5eea30718361d2460dd6f3fcba283a51211.svn-base

@@ -11,7 +11,7 @@
               </div>
               <span
                 :class="item.isTrue== true ? 'active The-club-box' : 'The-club-box'"
-                @click="bettingBtn(item.id,item.condition,item.odds)"
+                @click="bettingBtn(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id)"
               >
                 <!-- <i style="color: #FD8F26;" v-if="item.num">{{ item.num.num1 }}</i> -->
                 <i>{{ item.odds}}</i>
@@ -35,6 +35,7 @@ export default {
       guest_team: "", //客队名
       isDisplay: false, //是否显示
       titleKey: [], //
+      match_id:'',
       titleData: [], //
       betting: [], //已投注倍率id集合
       dataNum: 10000 //对应的数据的下标
@@ -42,7 +43,7 @@ export default {
   },
   methods: {
     //玩法投注
-    bettingBtn(id,condition,odds,bettingTime='') {
+    bettingBtn(id,condition,odds,odds_only,p_code,match_id,bettingTime='') {
       let _this = this;
       let bettingInfo = {
         id,
@@ -51,6 +52,10 @@ export default {
         name,
         odds,
         condition,
+        odds_only,
+         ballId:this.$store.getters.getBallId,
+        p_code,
+        match_id,
         ganame: this.title,
         score: this.score,
         bettingTime
@@ -102,6 +107,7 @@ export default {
   watch: {
     //监听vuex里面数据
     getUserIcons(val) {
+      this.match_id=val.match_id
       this.home_team = val.home_team;
       this.guest_team = val.guest_team;
       val.oddsData.forEach(res => {

+ 316 - 166
vue_sports/.svn/pristine/9c/9c812a0b40922d40d57cc48f494691e38f80b431.svn-base → vue_sports/.svn/pristine/44/44ba7a69dfec4d4bda35aa7d7501fca0a9c1b626.svn-base

@@ -1,5 +1,6 @@
 <template>
-  <div>
+  <!-- 禁止滚动 -->
+  <div :class="scorll=='2'?'noscorll':''">
     <div class="Serch row item-center">
       <div class="Soccer-game row item-center">
         <div
@@ -72,7 +73,7 @@
               class="Match-list-left"
               v-for="(items,indexs) in item.oddsData.homeOdds"
               :key="indexs"
-              @click.stop="isBetting(items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,'homeOdds')"
+              @click.stop="bteBetting(item.match_id, items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,items.odds_only,'homeOdds')"
             >
               <div :class="{ 'active' : items.isTrue == true}" class="column center">
                 <span style="color:#FD8F26">{{items.condition}}</span>
@@ -86,7 +87,7 @@
               class="Match-list-right row"
               v-for="(items,indexs) in item.oddsData.guestOdds"
               :key="indexs"
-              @click.stop="isBetting(items.id,item.home_team,item.guest_team,item.guest_team,items.odds,items.condition,'guestOdds')"
+              @click.stop="bteBetting(item.match_id,items.id,item.home_team,item.guest_team,item.guest_team,items.odds,items.condition,items.odds_only,'guestOdds')"
             >
               <div :class="{'active':items.isTrue==true}" class="column center">
                 <span>
@@ -100,40 +101,44 @@
       </div>
     </div>
     <!-- 冠军组件 -->
-   <div class="champion" v-if="championShow">
-      <div class="title">
-        <span>{{this.ChampionData.title}}</span>
-        <div class="time">
-          <span>2019年5月29日</span>
-          <span>15:00</span>
+    <div class="champion" v-if="championShow">
+      <div v-for="item in ChampionData" :key="item.id">
+        <div class="title">
+          <span>{{item.name}}</span>
+          <div class="time">
+            <!-- <span>2019年5月29日</span> -->
+            <span>{{item.last_time}}</span>
+          </div>
         </div>
-      </div>
-      <div  v-for="(item,index) in ChampionData.dataList" :key="item.id">
-        <div class="chmpTit">{{item.name}}</div>
-      <div  v-for="items in ChampionData.dataList[index].data" :key="items.id">  
-        <div class="list">
-          <span class="chmName">{{items.team}}</span>
-          <span class="num">{{items.odds}}</span>
+      <div v-for="(items) in item.data" :key="items.id">
+        <div class="chmpTit">{{items.title}}</div>
+        <div v-for="itemList in items.datas" :key="itemList.id">
+          <div class="list">
+            <span class="chmName">{{itemList.team}}</span>
+            <span class="num">{{itemList.odds}}</span>
+          </div>
         </div>
       </div>
-      </div>
-    </div>
-    <div class="BettingWindow" v-show="isWindow">
-      <BettingWindow/>
     </div>
+    
     <div v-if="noData">
       <NotOpend :title="this.info"/>
     </div>
+    </div>
     <!-- <div class = "lod">
       <Loading></Loading>
     </div>-->
+    <div class="BettingWindow" v-show="isWindow">
+      <BettingWindow />
+    </div>
   </div>
 </template>
 
 <script>
-import BettingWindow from "@/components/StBettingWindow";
+import BettingWindow from "./StBettingWindow.vue";
 import NotOpend from "@/components/StNotOpend";
 import Loading from "@/components/StLoading";
+
 export default {
   name: "SerchBox",
   data() {
@@ -143,18 +148,20 @@ export default {
       title: " ", //标题
       data: "",
       isShow: true,
+      scorll: "", //背景滚动
       isAddData: false, //判断是否添加
       game_code: this.$route.query.game_code, //球的类型别名
       leagueID: this.$route.query.leagueID, //获取联赛id
       isWindow: false,
-      score:'0',//比分
+      score: "0", //比分
       codeShow: false, // 如果是参赛表传值过来,则显示另一部分
       info: "没有相关联赛信息",
       noData: false, //没有数据为true
       betting: 10000, //vuex里面玩法投注数据
       thisNum: 10000, //vuex里面
       championShow: false, //冠军组件显示
-      ChampionData:'',//冠军数据
+      ChampionData: "", //冠军数据
+      timers : false
     };
   },
   components: {
@@ -166,7 +173,7 @@ export default {
    *函数方法
    */
   methods: {
-
+    
     /*--------------------------------------------------------------------------------*/
     // 返回上一页
     isreturn() {
@@ -249,80 +256,90 @@ export default {
 
     /*--------------------------------------------------------------------------------*/
     // 添加、删除vuex投注数据公共方法
-    AddDelete:function(id,home,guest,name,odds,condition){
+    AddDelete: function(match_id,id, home, guest, name, odds, condition, odds_only) {
       let isAdd = true;
       let bettingInfo = {
         id,
-        home_team:home,
-        guest_team:guest,
+        home_team: home,
+        guest_team: guest,
         name,
         odds,
+        match_id,
         condition,
-        ganame:'concede_size',
-        score:this.score,
-        bettingTime:'',
-
-      }
+        ballId:this.$store.getters.getBallId,
+        ganame: "concede_size",
+        score: this.score,
+        bettingTime: "",
+        odds_only
+      };
       let matchList = this.$store.getters.getBetting;
       if (this.thisNum != 10000) {
         //删除vuex投注数据
-          matchList[this.thisNum].data.forEach((res, index) => {
-            if (res.id == id) {
-              matchList[this.thisNum].data.splice(index, 1);
-              this.$store.dispatch("BETTING",matchList)
-              isAdd = false;
-            }
-          });
-          //添加vuex投注数据
-          if (isAdd) {
-            matchList[this.thisNum].data.push(bettingInfo);
-            this.$store.dispatch("BETTING",[])
-            this.$store.dispatch("BETTING",matchList)
-            if(this.$store.getters.getIsBetting) return false
-            this.$store.dispatch("ISBETTING",true)
+        matchList[this.thisNum].data.forEach((res, index) => {
+          if (res.id == id) {
+            matchList[this.thisNum].data.splice(index, 1);
+            // this.$store.dispatch("ISBETTING",false);
+            this.$store.dispatch("BETTING", []);
+            this.$store.dispatch("BETTING", matchList);
+            isAdd = false;
           }
+        });
+        //添加vuex投注数据
+        if (isAdd) {
+          matchList[this.thisNum].data.push(bettingInfo);
+          this.$store.dispatch("BETTING", []);
+          this.$store.dispatch("BETTING", matchList);
+          if (this.$store.getters.getIsBetting) return false;
+          this.$store.dispatch("ISBETTING", true);
+        }
       } else {
         //添加新的玩法赔率数据
         let obj = {
-            title:'concede_size',
-            data: [bettingInfo]
-          };
-          //判断vuex有误其它玩法数据
-        if(matchList){
+          title: "concede_size",
+          data: [bettingInfo]
+        };
+        //判断vuex有误其它玩法数据
+        if (matchList) {
           matchList.push(obj);
-        }else{
-          this.$store.dispatch("BETTING",[obj])
+        } else {
+          this.$store.dispatch("BETTING", [obj]);
         }
+        if (this.$store.getters.getIsBetting) return false;
+        this.$store.dispatch("ISBETTING", true);
       }
-      console.log(this.$store.getters.getIsBetting);
-      if(this.$store.getters.getIsBetting) return false
-      this.$store.dispatch("ISBETTING",true)
     },
 
     /*--------------------------------------------------------------------------------*/
     //修改当前页面样式公共方法
-    modifyStyle:function(id,type){
-      console.log(id,type);
+    modifyStyle: function(id, type) {
       this.data.matchData.every(e => {
         let ret = false;
-        if(type == "homeOdds"){
+        if (type == "homeOdds") {
           e.oddsData.homeOdds.every((res, index) => {
             if (res.id == id) {
-                this.$set( e.oddsData.homeOdds[index],"isTrue",res.isTrue ? false : true);
-                ret = true;
-                return false;
-              }
-              return true;
+              this.$set(
+                e.oddsData.homeOdds[index],
+                "isTrue",
+                res.isTrue ? false : true
+              );
+              ret = true;
+              return false;
+            }
+            return true;
+          });
+        } else if (type == "guestOdds") {
+          e.oddsData.guestOdds.every((res, index) => {
+            if (res.id == id) {
+              this.$set(
+                e.oddsData.guestOdds[index],
+                "isTrue",
+                res.isTrue ? false : true
+              );
+              ret = true;
+              return false;
+            }
+            return true;
           });
-        }else if(type == "guestOdds"){
-            e.oddsData.guestOdds.every((res, index) => {
-              if (res.id == id) {
-                  this.$set( e.oddsData.guestOdds[index],"isTrue",res.isTrue ? false : true);
-                  ret = true;
-                  return false;
-                }
-                return true;
-            });
         }
         if (ret) {
           return false;
@@ -330,15 +347,13 @@ export default {
           return true;
         }
       });
-    
     },
     /*--------------------------------------------------------------------------------*/
     // 修改投注样式
-    isBetting(id,home,guest,name,odds,condition,type) {
-      // console.log(id, type)
+    bteBetting(match_id,id, home, guest, name, odds, condition, odds_only, type) {
       if (this.data) {
         //处理vuex里面数据
-        this.AddDelete(id,home,guest,name,odds,condition);
+        this.AddDelete(match_id,id, home, guest, name, odds, condition, odds_only);
         //处理当前页面样式
         this.modifyStyle(id, type);
       }
@@ -349,13 +364,13 @@ export default {
     matchInfo: function(id) {
       this.$router.push({
         path: "/StRollBallBettingPage",
-        query: { gameCode: this.game_code, home: 1 }
+        query: { gameCode: this.game_code, home: 1,name:this.$route.query.name }
       });
       this.$store.dispatch("MACTH_ID", id);
     },
 
     /*--------------------------------------------------------------------------------*/
-     // url : 地址, game_code 球类 leagueID lg_id 	联赛id   type_code 状态 matchDate match_date 赛事日期 search 搜索 str_type 选项类型
+    // url : 地址, game_code 球类 leagueID lg_id 	联赛id   type_code 状态 matchDate match_date 赛事日期 search 搜索 str_type 选项类型
     //获取联赛比赛列表
     getMatchData: function(
       url,
@@ -366,7 +381,7 @@ export default {
       matchDate,
       match_date,
       search,
-      str_type,
+      str_type
       // code
     ) {
       //“concede_home”: 主队全场让球,“concede_guest”: 客队全场让球,“size_home”: 主队大小,“size_guest”: 客队大小
@@ -379,42 +394,57 @@ export default {
           matchDate,
           match_date,
           search,
-          str_type,
+          str_type
           // code
         })
         .then(res => {
           this.codeShow = true;
           if (res.data.status == 1 && res.data.data != null) {
-            if((this.$store.getters.getActivity == "StStringScene" && this.$route.query.strType == 2) || (this.$store.getters.getActivity == "StChampion" && this.$route.query.strType != undefined)){
-              this.ChampionData = res.data.data;
-              console.log('data',this.ChampionData);
+            if (
+              this.$route.query.champion != undefined ||
+              (this.$store.getters.getActivity == "StStringScene" &&
+                this.$route.query.strType == 2) ||
+              (this.$store.getters.getActivity == "StChampion" &&
+                this.$route.query.strType != undefined)
+            ) {
               // 处理冠军数据
-              let champion = {},arrays=[],title='';
+              let champion = {},
+                title = "",
+                stiTime='',
+                //matchData = [],
+                chamData = [];
               title = Object.keys(res.data.data);
-              champion.title = title[0];
-              let val = Object.values(res.data.data)
-              let name = Object.keys(val[0]);
-              let data = Object.values(val[0]);
-              data.forEach((e,index)=>{
-                  arrays.push({   
-                    name:name[index],
-                    data:e
-                  });
+              let val = Object.values(res.data.data);
+              title.forEach((e,index) =>{
+                  chamData.push({
+                    name:e,
+                    data:val[index],
+                  })
+                
               })
-              champion.dataList = arrays;
-              this.ChampionData = champion;
-              // champion.leaguename = championKey;
-              // if()
-              // console.log('0', championKey
-
-            }else if(this.$route.query.champion != undefined){
-                console.log('冠军截断')
+              chamData.forEach((res)=>{
+                res.last_time =res.data.last_time;
+                let resData =  Object.values(res.data);
+                let resTitle =  Object.keys(res.data);
+                res.data = [];
+                resTitle.forEach((e,index)=>{
+                  if(e !=='last_time'){
+                   res.data.push({
+                      title:e,
+                      datas:resData[index]
+                    })
+                  }
+                })
+              })
+              this.ChampionData =chamData;
             }
             if (res.data.data.matchData && res.data.data.matchData.length < 1) {
-             
               this.isShow = false;
               this.noData = true;
-            } else if(res.data.data.matchData &&  res.data.data.matchData.length > 0) {
+            } else if (
+              res.data.data.matchData &&
+              res.data.data.matchData.length > 0
+            ) {
               this.isShow = true;
               this.noData = false;
               this.dataGroup(res.data.data);
@@ -426,7 +456,7 @@ export default {
 
     /*--------------------------------------------------------------------------------*/
     // 赛事赔率玩法数据组合方法
-  
+
     dataGroup: function(data) {
       let homeOdds = [],
         guestOdds = [];
@@ -441,11 +471,9 @@ export default {
           column.oddsData.forEach(val => {
             if (this.betting != 10000) {
               this.betting.forEach(e => {
-
                 if (val.id == e.id) {
                   val.isTrue = true;
-                  //this.$set(val,'isTrue',true);
-                } 
+                }
               });
             }
             if (val.odds_code == "concede_home") {
@@ -468,59 +496,70 @@ export default {
         }
       });
       this.data = data;
-      console.log(this.data);
-    }
+    },
+    
   },
 
-
   /**
    * 计算属性
    */
   computed: {
+    // 获取滚动状态
+    getscorllcode() {
+      return this.$public.getCache("box_size");
+    },
     getBetting() {
       return this.$store.getters.getBetting;
     },
     IsWindow() {
       return this.$store.getters.getIsBetting;
     },
-         //获取投注框删除的投注信息
-    getDeleteType(){
+    //获取投注框删除的投注信息
+    getDeleteType() {
       return this.$store.getters.getDeleteType;
-    },
+    }
   },
   /**
    * 监听器
    */
   watch: {
-     getDeleteType(val){
-       let flag=true;
-      this.data.matchData.forEach(e =>{
-          if(val =='all'){
-                e.oddsData.guestOdds.forEach(data=>{
-                    this.$set(data, "isTrue", false);
-                })
-                e.oddsData.homeOdds.forEach(data=>{
-                    this.$set(data, "isTrue", false);
-                })
-          
-          }else{
-            let showData =true;
-                e.oddsData.guestOdds.forEach(data=>{
-                    if(data.id == val){
-                      this.$set(data, "isTrue", false);
-                      showData =false;
-                    }
-                })
-                if(showData){
-                  e.oddsData.homeOdds.forEach(data=>{
-                      if(data.id == val){
-                        this.$set(data, "isTrue", false);
-                      }
-                  })
-                }
-    
+    /*--------------------------------------------------------------------------------*/
+    // 监听投注框开关
+    IsWindow(val) {
+      console.log(val);
+      this.isWindow = val;
+    },
+    // 监听滚动状态变化赋值滚动
+    getscorllcode(val) {
+      this.scorll = val;
+    },
+    getDeleteType(val) {
+      let flag = true;
+      this.data.matchData.forEach(e => {
+        if (val == "all") {
+          e.oddsData.guestOdds.forEach(data => {
+            this.$set(data, "isTrue", false);
+          });
+          e.oddsData.homeOdds.forEach(data => {
+            this.$set(data, "isTrue", false);
+          });
+        } else {
+          let showData = true;
+          e.oddsData.guestOdds.forEach(data => {
+            if (data.id == val) {
+              this.$set(data, "isTrue", false);
+              showData = false;
+            }
+          });
+          if (showData) {
+            e.oddsData.homeOdds.forEach(data => {
+              if (data.id == val) {
+                this.$set(data, "isTrue", false);
+              }
+            });
           }
-      })
+        }
+      });
     },
     /*--------------------------------------------------------------------------------*/
     //获取已投注信息
@@ -536,19 +575,19 @@ export default {
       }
     },
 
-    /*--------------------------------------------------------------------------------*/
-    // 监听投注框开关
-    IsWindow(val) {
-      this.isWindow = val;
-    },
+   
   },
   /***
    * 页面加载完成触发事件
    */
   mounted() {
-
+    let _this = this;
+    // 获取是否滑动信息
+    if (this.$public.getCache("box_size") == 1) {
+      this.isshrink = true;
+    }
     //是否展示投注框
-    if(this.$store.getters.getIsBetting){
+    if (this.$store.getters.getIsBetting) {
       this.isWindow = true;
     }
     //获取vuex玩法已投注相对应的数据
@@ -566,15 +605,30 @@ export default {
     this.game_code = game_code;
 
     if (
-       this.$route.query.navBall &&
+      this.$route.query.navBall &&
       this.$route.query.strType != undefined &&
       this.$route.query.code != undefined
     ) {
+ 
       if (this.$store.getters.getActivity == "StChampion") {
         this.championShow = true;
       } else {
         this.championShow = false;
       }
+      _this.$public.ajaxTimerFun(function(timing) {
+        _this.getMatchData(
+          _this.$ports.match.matchState,
+          game_code,
+          "",
+          leagueID,
+          _this.$store.getters.getActivity,
+          "",
+          _this.$route.query.matchDate
+        );
+        if (!_this.timers) {
+          clearInterval(timing);
+        }
+      });
       this.getMatchData(
         this.$ports.match.matchState,
         game_code,
@@ -585,12 +639,29 @@ export default {
         this.$route.query.matchDate
       );
     } else if (this.$route.query.strType != undefined) {
+   
       if (this.$store.getters.getActivity != "StChampion") {
         if (this.$route.query.strType == 2) {
           this.championShow = true;
         } else {
           this.championShow = false;
         }
+        _this.$public.ajaxTimerFun(function(timing) {
+          _this.getMatchData(
+            _this.$ports.match.matchState,
+            _this.$store.getters.getBallId,
+            "",
+            leagueID,
+            _this.$store.getters.getActivity,
+            "",
+            _this.$route.query.matchDate,
+            "",
+            _this.$route.query.strType
+          );
+          if (!_this.timers) {
+            clearInterval(timing);
+          }
+        });
         this.getMatchData(
           this.$ports.match.matchState,
           this.$store.getters.getBallId,
@@ -603,6 +674,21 @@ export default {
           this.$route.query.strType
         );
       } else {
+        _this.$public.ajaxTimerFun(function(timing) {
+          _this.getMatchData(
+            _this.$ports.match.matchState,
+            game_code,
+            "",
+            leagueID,
+            _this.$store.getters.getActivity,
+            "",
+            _this.$route.query.matchDate,
+            ""
+          );
+          if (!_this.timers) {
+            clearInterval(timing);
+          }
+        });
         this.championShow = true;
         this.getMatchData(
           this.$ports.match.matchState,
@@ -617,18 +703,43 @@ export default {
       }
     }
     // 新增
-    else if(this.$route.query.champion != undefined){
-      console.log("123")
-    this.getMatchData(
+    else if (this.$route.query.champion != undefined) {
+     
+      this.championShow = true;
+      _this.$public.ajaxTimerFun(function(timing) {
+        _this.getMatchData(
+          _this.$ports.match.matchState,
+          game_code,
+          "",
+          leagueID,
+          "StChampion"
+        );
+        if (!_this.timers) {
+          clearInterval(timing);
+        }
+      });
+      this.getMatchData(
         this.$ports.match.matchState,
         game_code,
-        // leagueID,
-        "",
         "",
-        "StRollBall"
+        leagueID,
+        "StChampion"
       );
-    }
-    else {
+    } else if (this.$route.query.matchDtl != undefined) {
+    
+      _this.$public.ajaxTimerFun(function(timing) {
+        _this.getMatchData(
+          _this.$ports.match.matchDetails,
+          game_code,
+          leagueID,
+          "",
+          "",
+          _this.$route.query.matchDate
+        );
+        if (!_this.timers) {
+          clearInterval(timing);
+        }
+      });
       this.getMatchData(
         this.$ports.match.matchDetails,
         game_code,
@@ -637,13 +748,47 @@ export default {
         "",
         this.$route.query.matchDate
       );
+    }else if(this.$route.query.btn != undefined){
+  
+            this.getMatchData(
+        this.$ports.match.matchState,
+        this.$route.query.gameCode,
+        "",
+        '27822',
+        // this.$route.query.lgId,
+        ""
+      );
+    } 
+    else {
+      console.log("`11``")
+      _this.$public.ajaxTimerFun(function(timing) {
+        _this.getMatchData(
+          _this.$ports.match.matchState,
+          game_code,
+          "",
+          leagueID,
+          _this.$store.getters.getActivity,
+          "",
+          _this.$route.query.matchDate
+        );
+        if (!_this.timers) {
+          clearInterval(timing);
+        }
+      });
+      this.getMatchData(
+        this.$ports.match.matchState,
+        game_code,
+        "",
+        leagueID,
+        this.$store.getters.getActivity,
+        "",
+        this.$route.query.matchDate
+      );
     }
-
-    // if(this.$public.getCache("box_size")){
-    //   this.isWindow=true
-    // }
   },
- 
+  beforeDestroy(){
+    this.timers = false;
+  }
 };
 </script>
 
@@ -672,9 +817,14 @@ export default {
   z-index: 10000;
   position:fixed;
   top:0;
-  width: 100%;
+  width: 55rem;
+  height: 55rem;
 } */
-
+.noscorll {
+  position: fixed;
+  top: 0;
+  width: 100%;
+}
 .Serch-box-img {
   width: 0.3rem;
   height: 0.3rem;
@@ -710,7 +860,7 @@ export default {
   color: #f76649;
   align-items: center;
   width: 1.5rem;
-  height: .75rem;
+  height: 0.75rem;
   font-size: 0.3rem;
 }
 .Soccer-game-box {

+ 651 - 0
vue_sports/.svn/pristine/48/484c2ab90fbf1c7d16cf9ee967e8967ce40d252e.svn-base

@@ -0,0 +1,651 @@
+<template>
+  <div>
+    <div class="Serch">
+      <div class="Soccer-game row center">
+        <div class="Soccer-game-title row center">
+          <img class="returnimg" :src="img.searchreturn" @click="isreturn()">
+          {{Regulations.title}}
+        </div>
+        <div
+          class="row center"
+          style="height:0.88rem;margin-left:0.1rem;padding:0 0.1rem;"
+          @click="IsSoccerGameClick(isSoccerGameClick)"
+        >
+          <img
+            :class="isSoccerGameClick==true?'Soccer-game-src act':'Soccer-game-src return'"
+            :src="img.Soccerimg1"
+          >
+        </div>
+      </div>
+      <div class="Serch-box">
+        <div class="Serch-box-home">
+          <img class="Serch-box-img" :src="img.Serchimg">
+          <input
+            v-model="SerchValue"
+            @input="serchchange(SerchValue)"
+            class="Serch-box-input"
+            type="text"
+            placeholder="请输入联赛名称"
+          >
+          <img
+            class="Serch-box-del"
+            @click="delinputvalue()"
+            v-if="Serchchange==true"
+            :src="img.Serchdel"
+          >
+        </div>
+      </div>
+    </div>
+    <div class="Soccer-game-box row" v-if="isSoccerGameClick==true">
+      <p
+        @click="listActive(i.id)"
+        v-for="(i,index) in Regulations.list"
+        :key="index"
+        :class="listnum==i.id?'active':''"
+      >{{i.name}}</p>
+    </div>
+    <div v-if="this.$route.query.id =='zq'&&  this.isTrue == true " class="box">
+      <div id="NavSlide">
+        <nav>
+          <p v-for="(item,$index) in arr" @click="toggle($index,item.id)" :key="$index">
+            <span :class="{active:$index==active}">{{item.title}}</span>
+          </p>
+        </nav>
+      </div>
+    </div>
+    <div class="match" v-if="entryShow">
+      <yd-accordion accordion>
+        <div class="matchBox" v-for="items in data" :key="items.id">
+          <yd-accordion-item :title="items.region" open>
+            <div class="list">
+              <div
+                v-for="item in items.league_count"
+                :key="item.lg_id"
+                @click="goMatchInfo(item.lg_id )"
+              >
+                <span>{{item.league}}</span>
+                <span class="num">{{item.count}}</span>
+              </div>
+            </div>
+          </yd-accordion-item>
+        </div>
+      </yd-accordion>
+    </div>
+    <div v-if="noData">
+      <NotOpend :title="this.info"/>
+    </div>
+    <!-- 参赛表 -->
+    <div v-if="!entryShow" class="entry">
+      <div
+        class="list"
+        v-for="item in entryList.info"
+        :key="item.id"
+        @click="goMatchInfo(item.lg_id,item.code )"
+      >
+        <span>{{item.name}}</span>
+        <span class="num">{{item.count}}</span>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import NotOpend from "@/components/StNotOpend";
+import "../css/index.css";
+export default {
+  data() {
+    return {
+      SerchValue: "",
+      data: "", //联赛列表
+      ballId: "", //球类别名
+      noData: false, //没有数据为true
+      datetimeNum: "", //赛事时间
+      active: 0,
+      listnum: 2, //赛事类型
+      isTrue: true, //显示日期
+      Serchchange: false,
+      info: "没有相关联赛信息",
+      isSoccerGameClick: true,
+      entryShow: false, //显示参赛表
+      entryList: "", // 参赛表数据
+      img: {
+        Soccerimg1: require("../assets/st-imges/soccer1.png"),
+        Soccerimg2: require("../assets/st-imges/soccer1.png"),
+        Serchimg: require("../assets/st-imges/sousuo.png"),
+        Serchdel: require("../assets/st-imges/del.png"),
+        searchreturn: require("../assets/st-imges/returnbox.png")
+      },
+      Regulations: {
+        title: " ",
+        list: [
+          { id: 1, name: "参赛表" },
+          { id: 2, name: "赛事" },
+          { id: 3, name: "冠军盘口" }
+        ]
+      },
+      active: 0,
+      arr: [{ id: "", title: "所有赛事" }, { id: "today", title: "今日赛事" }],
+      timers: true
+    };
+  },
+  components: {
+    NotOpend
+  },
+  created() {
+    this.fun_date();
+  },
+  methods: {
+    //设置一周赛事
+    fun_date: function() {
+      let date = new Date();
+      let date2 = new Date(date);
+      for (let i = 1; i < 7; i++) {
+        date2.setDate(date.getDate() + i);
+        let years = date2.getFullYear();
+        let month =
+          date2.getMonth() + 1 < 10
+            ? "0" + (date2.getMonth() + 1)
+            : date2.getMonth() + 1;
+        let day =
+          date2.getDate() < 10 ? "0" + date2.getDate() : date2.getDate();
+        let time2 = {};
+        time2.id = years + "-" + month + "-" + day;
+        time2.title = years + "-" + month + "-" + day;
+        this.arr.push(time2);
+        if (i == 6) {
+          this.arr.push({ id: "morning", title: "早盘" });
+        }
+      }
+    },
+    //获取数据信息
+    //game_code=球类型、search=联赛搜索关键字、datetime=日期搜索、event_type=赛事类型
+
+    getAjaxInfo: function(url,typeGame,gameType,game_code,search,datetime,event_type
+    ) {
+      this.$http
+        .get(url, { typeGame, gameType, search, datetime, event_type })
+        .then(res => {
+          console.log(res,'你好')
+          this.$store.dispatch("GETSHOW", false);
+          if (
+            res.status == 200 &&
+            res.data.data != [] &&
+            res.data.data != null
+          ) {
+            console.log("数据", res.data);
+            if (this.listnum == 1) {
+              this.entryList = res.data.data;
+              console.log("entry", this.entryList);
+            }
+            this.Regulations.title = res.data.data.type;
+            if (res.data.data.info.length > 0) {
+              this.data = res.data.data.info;
+            } else {
+              this.data = "";
+              this.noData = true;
+            }
+            // this.$store.dispatch('GET_BALL_DATA',res.data);//将活动类别存入vuex里面
+          }
+        });
+    },
+    //获取冠军盘口数据
+    getChampion: function(game_code, type_code, search) {
+      this.$store.dispatch("GETSHOW", true);
+      this.$http
+        .get(this.$ports.match.matchState, {
+          type_code: "StChampion",
+          game_code,
+          search
+        })
+        .then(res => {
+          console.log("res", res);
+          if (
+            res.data.status == 1 &&
+            res.data.data.length > 0 &&
+            res.data.data != null
+          ) {
+            this.data = res.data.data;
+            console.log("res", res);
+            this.$store.dispatch("GETSHOW", false);
+          } else {
+          }
+        });
+    },
+    //显示隐藏赛事类型
+    IsSoccerGameClick(isclick) {
+      this.isSoccerGameClick = !isclick;
+    },
+    //获取input输入的值查询数据
+    serchchange(val) {
+      if (val.length >= 1) {
+        this.Serchchange = true;
+      } else {
+        this.Serchchange = false;
+      }
+      if (this.listnum == 2) {
+        this.getAjaxInfo(
+          this.$ports.match.matchData,
+          "",
+          this.$route.query.id,
+          this.$route.query.id,
+          val,
+          this.datetimeNum,
+          this.listnum
+        );
+      } else if (this.listnum == 3) {
+        this.getChampion(this.$route.query.id, val);
+      }
+    },
+    //删除搜索框数据
+    delinputvalue() {
+      this.SerchValue = "";
+      this.Serchchange = false;
+      if (this.listnum == 2) {
+        this.getAjaxInfo(
+          this.$ports.match.matchData,
+          "",
+          this.$route.query.id,
+          this.$route.query.id,
+          "",
+          this.datetimeNum,
+          this.listnum
+        );
+      } else if (this.listnum == 3) {
+        this.getChampion(this.$route.query.id);
+      }
+    },
+    //切换赛事类型
+    listActive(id) {
+      if (this.listnum == id) return false;
+      this.SerchValue = "";
+      this.listnum = id;
+			
+      if (id == 2) {
+        this.isTrue = true;
+        this.entryShow = true;
+        this.getAjaxInfo(
+          this.$ports.match.matchData,
+          "",
+          this.$route.query.id,
+          this.$route.query.id,
+          "",
+          this.datetimeNum,
+          id
+        );
+      } else {
+        this.isTrue = false;
+        if (id == 3) {
+          this.entryShow = true;
+          this.getChampion(this.$route.query.id);
+        } else if (id == 1) {
+          this.entryShow = false;
+          this.getAjaxInfo(this.$ports.match.participate, this.$route.query.id);
+        }
+      }
+    },
+    //切换日期时间
+    toggle: function(index, id) {
+      this.active = index;
+      this.datetimeNum = id;
+      console.log("id", this.datetimeNum);
+      this.SerchValue = "";
+      this.getAjaxInfo(
+        this.$ports.match.matchData,
+        "",
+        this.$route.query.id,
+        this.$route.query.id,
+        "",
+        id,
+        this.listnum
+      );
+    },
+    //打开联赛投注页面
+    goMatchInfo: function(sessionId, code) {
+      console.log("code", code);
+      if (this.listnum == 3) {
+        this.$router.push({
+          path: "StLeagueList",
+          query: {
+            game_code: this.ballId,
+            leagueID: sessionId,
+            name: this.Regulations.title,
+            matchDate: this.datetimeNum,
+            code: code,
+            champion: 3
+          }
+        });
+      } else if (this.listnum == 2) {
+        this.$router.push({
+          path: "StLeagueList",
+          query: {
+            game_code: this.ballId,
+            leagueID: sessionId,
+            name: this.Regulations.title,
+            matchDate: this.datetimeNum,
+            code: code,
+            matchDtl: 2
+          }
+        });
+      } else {
+        this.$router.push({
+          path: "StLeagueList",
+          query: {
+            game_code: this.ballId,
+            leagueID: sessionId,
+            name: this.Regulations.title,
+            matchDate: this.datetimeNum,
+            code: code
+          }
+        });
+      }
+    },
+    // 返回上一层页面
+    isreturn() {
+      history.go(-1);
+    }
+  },
+  mounted() {
+    let _this = this;
+    this.$public.ajaxTimerFun(function(timing) {
+      _this.getAjaxInfo(
+        _this.$ports.match.matchData,
+        "",
+        _this.$route.query.id,
+        _this.$store.getters.getBallId
+      );
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
+    //分球的类型获取默认数据
+    this.ballId = this.$route.query.id;
+    //console.log(this.$route.query.id);
+    this.$store.dispatch("GETSHOW", true);
+    this.getAjaxInfo(
+      this.$ports.match.matchData,
+      "",
+      this.$route.query.id,
+      this.$store.getters.getBallId
+    );
+    if (this.listnum == 2) {
+      this.entryShow = true;
+    }
+  },
+  computed: {
+    changeListNum() {
+      return this.listnum;
+    }
+  },
+  watch: {
+    changeListNum(val) {
+      let _this = this;
+      this.timers = false;
+      if (val == 1) {
+        this.timers = true;
+        this.$public.ajaxTimerFun(function(timing) {
+          _this.getAjaxInfo(
+            _this.$ports.match.participate,
+            _this.$route.query.id
+          );
+          if (!_this.timers) {
+            clearInterval(timing);
+          }
+        });
+      } else if (val == 2) {
+        this.timers = true;
+        this.$public.ajaxTimerFun(function(timing) {
+          _this.getAjaxInfo(
+            _this.$ports.match.matchData,
+            "",
+            _this.$route.query.id,
+            _this.$route.query.id,
+            "",
+            _this.datetimeNum,
+						'2'
+          );
+          if (!_this.timers) {
+            clearInterval(timing);
+          }
+        });
+      } else {
+        this.timers = true;
+        this.$public.ajaxTimerFun(function(timing) {
+          _this.getChampion(_this.$route.query.id);
+          if (!_this.timers) {
+            clearInterval(timing);
+          }
+        });
+      }
+    }
+  },
+  beforeDestroy() {
+    this.timers = false;
+  }
+};
+</script>
+
+<style scoped>
+.act {
+  transform: rotate(180deg);
+  transition: 0.2s;
+}
+.return {
+  transform: rotate(0deg);
+  transition: 0.2s;
+}
+.Serch {
+  height: 0.88rem;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  background: linear-gradient(to bottom, #6a6a6a, #565656);
+  color: #f76649;
+  font-family: "PingFang-SC-Regular";
+  padding: 0 0.33rem;
+}
+.returnimg {
+  width: 0.37rem;
+  height: 0.3rem;
+  margin-right: 0.1rem;
+}
+.Serch-box {
+  display: flex;
+  align-items: center;
+}
+.Serch-box-input {
+  width: 3.8rem;
+  border: none;
+  position: absolute;
+  height: 0.44rem;
+  line-height: 0.44rem;
+  left: 0.5rem;
+  color: #aaa;
+}
+.Serch-box-img {
+  width: 0.3rem;
+  height: 0.3rem;
+  position: absolute;
+  left: 0.1rem;
+  top: 0.06rem;
+}
+.Serch-box-del {
+  width: 0.2rem;
+  height: 0.2rem;
+  position: absolute;
+  right: 0.2rem;
+}
+.Serch-box-home {
+  height: 0.45rem;
+  line-height: 0.45rem;
+  width: 4.73rem;
+  background: #e4e4e4;
+  border-radius: 0.2rem;
+  display: flex;
+  justify-content: space-around;
+  align-items: center;
+  padding-left: 0.1rem;
+  padding-right: 0.1rem;
+  position: relative;
+}
+.Soccer-game-title {
+  height: 0.88rem;
+  font-size: 0.3rem;
+}
+.Soccer-game-box {
+  height: 0.88rem;
+  /* padding: 0 0.32rem; */
+  background-color: #626262;
+}
+.Soccer-game-box > p {
+  margin: 0.3rem;
+  color: #a6a6a6;
+}
+.Soccer-game-box p.active {
+  color: #f76649;
+}
+.Soccer-game-src {
+  width: 0.25rem;
+  height: 0.15rem;
+  /* margin-left: .3rem */
+}
+.box {
+  background: #ebebeb;
+  padding: 0 0.14rem;
+}
+#NavSlide {
+  width: 100%;
+  overflow: hidden;
+}
+#NavSlide nav {
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: middle;
+  -ms-flex-align: middle;
+  align-items: middle;
+  overflow: auto;
+}
+#NavSlide p {
+  text-align: center;
+  font-size: 0.28rem;
+  -ms-flex-negative: 0;
+  flex-shrink: 0;
+  padding: 0 0.1rem;
+  margin: 0 0.05rem;
+  color: #b8b8b8;
+  height: 0.88rem;
+  line-height: 0.88rem;
+}
+/* #NavSlide p a{
+	color: #E5E5E5;
+	text-decoration: none;
+} */
+#NavSlide p span.active {
+  color: #363636;
+}
+
+.yd-cell-box .yd-cell {
+  z-index: 99;
+  border-radius: 0.2rem;
+}
+.matchBox {
+  margin-bottom: 0.12rem;
+  background: #f9f9f9;
+  padding: 0.27rem 0.34rem 0 0.32rem;
+}
+div /deep/ .yd-accordion-head {
+  padding: 0 0.13rem 0 0;
+}
+div /deep/ .yd-accordion-content:after {
+  height: 0;
+}
+.match .tit {
+  display: flex;
+  justify-content: space-between;
+  font-size: 0.32rem;
+  margin-bottom: 0.3rem;
+}
+.match .list {
+  overflow: hidden;
+  transition: all 0.3s cubic-bezier(0.4, 0.6, 0.2, 1);
+}
+.match .list div {
+  background: #dcdcdc;
+  width: 100%;
+  height: 0.88rem;
+  padding: 0.26rem 0.56rem 0.3rem 0.3rem;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  border-radius: 0.08rem;
+  margin-bottom: 0.12rem;
+}
+div /deep/ .yd-accordion-head:after {
+  height: 0;
+}
+.match .list span {
+  color: #333333;
+  font-size: 0.28rem;
+}
+.match .list .num {
+  width: 0.4rem;
+  height: 0.4rem;
+  display: inline-block;
+  line-height: 0.4rem;
+  text-align: center;
+  color: #f5f5f5;
+  border-radius: 50%;
+  font-size: 0.2rem;
+  background: #f76649;
+}
+.yd-accordion {
+  background: transparent;
+}
+.match .list div:nth-last-child(1) {
+  margin-bottom: 0.34rem;
+}
+div /deep/ .yd-accordion-head,
+div /deep/ .yd-accordion-head-content,
+div /deep/ .yd-accordion-title,
+div /deep/ .yd-accordion-title-full {
+  height: 0.3rem;
+}
+div /deep/ .yd-accordion-title {
+  min-height: 0;
+}
+div /deep/ .yd-accordion-head {
+  margin-bottom: 0.3rem;
+}
+div /deep/ .yd-accordion-head-arrow:after {
+  border: none;
+  width: 0.4rem;
+  height: 0.4rem;
+  background: url("../assets/st-imges/xiangxia.png") no-repeat;
+  background-size: 0.4rem 0.4rem;
+}
+/* 参赛表 */
+.entry .list {
+  height: 1rem;
+  line-height: 0.6rem;
+  padding: 0.2rem;
+  width: 100%;
+  display: flex;
+  background: #a0a0a0;
+  color: #fefefe;
+  justify-content: space-between;
+  border-bottom: 1px solid #aaa;
+  font-size: 0.28rem;
+}
+.entry .list .num {
+  margin-top: 0.1rem;
+  width: 0.4rem;
+  height: 0.4rem;
+  display: inline-block;
+  line-height: 0.4rem;
+  text-align: center;
+  color: #f5f5f5;
+  border-radius: 50%;
+  font-size: 0.2rem;
+  background: #f76649;
+}
+</style>

二進制
vue_sports/.svn/pristine/5d/5d3d7bb7eb9c4792728194ee6d8301db5c5764ea.svn-base


+ 7 - 2
vue_sports/.svn/pristine/92/92a18c5a092797a516fe2637b52fbf142d18b0b8.svn-base → vue_sports/.svn/pristine/60/602c05b5046c81c4ecbe890272e24b6c86584ab3.svn-base

@@ -6,10 +6,10 @@ Vue.use(Router)
 const route = new Router({
   routes: [{
       path: '/',
-      name: 'Home',
+      name: 'BettingRecord',
       //Sthome
       component: resolve => require(['@/pages/StHome/StHome'], resolve)
-      // component : resolve => require(['@/components/StBettingWindow'],resolve)
+      // component : resolve => require(['@/pages/Login/index/ProfitAndLossRecord'],resolve)
     },
     {
       path: '/AllMatch',
@@ -66,6 +66,11 @@ const route = new Router({
       path:'/Login',
       name:'Login',
       component:resolve=>require(['@/pages/Login/index/StLogin'],resolve)
+    },
+    {
+      path:'/Register',
+      name:'./Register',
+      component:resolve=>require(['@/pages/Login/index/register'],resolve)
     }
 
   ],

+ 16 - 10
vue_sports/.svn/pristine/a5/a54dcd10f4e869c29e0ad56c0f31ca79d3dfc914.svn-base → vue_sports/.svn/pristine/66/66c756297cae2a94704266954046b6067af9bf5b.svn-base

@@ -13,7 +13,7 @@
             <div class="row grids">
               <div class="column">
                 <div class="gridsDiv row center" v-for="(item,index) in data " :key="item.id" v-if="item.odds_code =='bodanhome'" >
-                  <div class="column average minGrid" :class=" [item.isTrue ?'trueSelected' :'']"@click="btnChoose(item.id,home_team,item.odds,item.condition)" >
+                  <div class="column average minGrid" :class=" [item.isTrue ?'trueSelected' :'']"@click="btnChoose(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id,item.condition)" >
                     <span style="color:#FD8F26 ">{{item.condition}}</span>
                     <span>{{item.odds}}</span>
                   </div>
@@ -21,7 +21,7 @@
               </div>
               <div class="column middle">
                 <div class="gridsDiv row center" v-for="(item,index) in data " :key="item.id" v-if="item.odds_code =='bodandogfall'" >
-                  <div class="column average minGrid" :class=" [item.isTrue ? 'trueSelected' :''] "  @click="btnChoose(item.id,'和局',item.odds,item.condition)" >
+                  <div class="column average minGrid" :class=" [item.isTrue ? 'trueSelected' :''] "  @click="btnChoose(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id,item.condition)" >
                     <span style="color:#FD8F26 ">{{item.condition}}</span>
                     <span>{{item.odds}}</span>
                   </div>
@@ -29,7 +29,7 @@
               </div>
               <div class="column">
                 <div class="gridsDiv row center"  v-for="(item,index) in data " :key="item.id" v-if="item.odds_code =='bodanguest'" >
-                  <div class="column average minGrid" :class=" [item.isTrue ? 'trueSelected' :''] " @click="btnChoose(item.id,guest_team,item.odds,item.condition)" >
+                  <div class="column average minGrid" :class=" [item.isTrue ? 'trueSelected' :''] " @click="btnChoose(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id,item.condition)" >
                     <span style="color:#FD8F26 ">{{item.condition}}</span>
                     <span>{{item.odds}}</span>
                   </div>
@@ -39,7 +39,7 @@
             <div style="background:#f8f8f8;">
               <div class="row rightAlignment center"  style="height: 0.88rem;">
                 <span>其他比分:</span>
-                <div class="minGrid minGridAll"  :class=" newbodanother.isTrue ? 'trueSelected' :''"  @click="btnChoose(newbodanother.id,'其他比分',newbodanother.odds,newbodanother.condition)" >
+                <div class="minGrid minGridAll"  :class=" newbodanother.isTrue ? 'trueSelected' :''"  @click="btnChoose(newbodanother.id,'其他比分',newbodanother.odds,newbodanother.odds_only,newbodanother.p_code,match_id,newbodanother.condition)" >
                   {{newbodanother.odds}}
                 </div>
               </div>
@@ -59,7 +59,7 @@
             <div class="row grids">
               <div class="column">
                 <div class="gridsDiv row center" v-for="(item,index) in data " :key="item.id" v-if="item.odds_code =='halfbodanhome'" >
-                  <div class="column average minGrid" :class=" [item.isTrue ?'trueSelected' :'']" @click="btnChoose(item.id,home_team,item.odds,item.condition)">
+                  <div class="column average minGrid" :class=" [item.isTrue ?'trueSelected' :'']" @click="btnChoose(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id,item.condition)">
                     <span style="color:#FD8F26 ">{{item.condition}}</span>
                     <span>{{item.odds}}</span>
                   </div>
@@ -67,7 +67,7 @@
               </div>
               <div class="column middle">
                 <div class="gridsDiv row center" v-for="(item,index) in data " :key="item.id" v-if="item.odds_code =='halfbodandogfall'" >
-                  <div class="column average minGrid" :class=" [item.isTrue ? 'trueSelected' :''] " @click="btnChoose(item.id,'和局',item.odds,item.condition)">
+                  <div class="column average minGrid" :class=" [item.isTrue ? 'trueSelected' :''] " @click="btnChoose(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id,item.condition)">
                     <span style="color:#FD8F26 ">{{item.condition}}</span>
                     <span>{{item.odds}}</span>
                   </div>
@@ -75,7 +75,7 @@
               </div>
               <div class="column">
                 <div class="gridsDiv row center" v-for="(item,index) in data " :key="item.id" v-if="item.odds_code =='halfbodanguest'">
-                  <div class="column average minGrid" :class=" [item.isTrue ? 'trueSelected' :''] " @click="btnChoose(item.id,guest_team,item.odds,item.condition)" >
+                  <div class="column average minGrid" :class=" [item.isTrue ? 'trueSelected' :''] " @click="btnChoose(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id,item.condition)" >
                     <span style="color:#FD8F26 ">{{item.condition}}</span>
                     <span>{{item.odds}}</span>
                   </div>
@@ -85,7 +85,7 @@
             <div style="background:#f8f8f8;">
               <div class="row rightAlignment center" style="height: 0.88rem;">
                 <span>其他比分:</span>
-                <div class="minGrid minGridAll"  :class="newHalfbodanother.isTrue ? 'trueSelected' :'' "   @click="btnChoose(newHalfbodanother.id,'其他比分',newHalfbodanother.odds,newHalfbodanother.condition)"
+                <div class="minGrid minGridAll"  :class="newHalfbodanother.isTrue ? 'trueSelected' :'' "   @click="btnChoose(newHalfbodanother.id,'其他比分',newHalfbodanother.odds,newHalfbodanother.odds_only,newHalfbodanother.p_code,match_id,newHalfbodanother.condition)"
                 >{{newHalfbodanother.odds}}</div>
               </div>
             </div>
@@ -110,6 +110,7 @@ export default {
       guest_team: "",
       isDisplay: false,
       data: [],
+      match_id:'',
       bodanother: "",
       halfbodanother: "",
       betting: [], //已投注倍率id集合
@@ -119,7 +120,8 @@ export default {
   methods: {
     /*---------------------------------------------------- */
     //玩法投注
-    btnChoose: function(id,name,odds,condition='',bettingTime='') {
+    btnChoose: function(id,name,odds,odds_only,p_code,match_id,condition='',bettingTime='') {
+        console.log('我需要的',this.data)
       let _this = this;
       let bettingInfo = {
         id,
@@ -131,7 +133,10 @@ export default {
         ganame:this.title,
         score:this.score,
         bettingTime,
-
+        odds_only,
+         ballId:this.$store.getters.getBallId,
+        p_code,
+        match_id,
       }
       //调用玩法投注公共方法
       this.$public.bettingFunction(
@@ -179,6 +184,7 @@ export default {
   },
   watch: {
     getUserIcons(val) {
+      this.match_id=val.match_id
       if (!val) return false;
       this.home_team = val.home_team;
       this.guest_team = val.guest_team;

+ 18 - 3
vue_sports/.svn/pristine/05/054036ca05a38e84d6dde0503d45fcb0b86ac1e9.svn-base → vue_sports/.svn/pristine/66/66cf4faed4cb6ab36c6d457b7586abc5433c8525.svn-base

@@ -4,7 +4,8 @@
           <Loading></Loading>
         </div>
         <SportsHead></SportsHead>
-        <Serch></Serch>
+        <Serch v-if="isShow"></Serch>
+        <championsCup v-else/>
         <LinkFooter></LinkFooter>
     </div>
 </template>
@@ -14,6 +15,7 @@ import  Serch from '@/components/StSerch';
 import  LinkFooter from '@/components/StLinkFooter';
 import  Schedule from '@/components/StSchedule';
 import  Loading from '@/components/StLoading';
+import  championsCup from '@/components/StChampionsCup';
 export default {
     name:"AllMatch",
     components:{
@@ -21,14 +23,23 @@ export default {
         Serch,
         LinkFooter,
         Schedule,
-        Loading
+        Loading,
+        championsCup
     },
     data(){
         return{
+            isShow:true // 断定是否为冠军跳入
             // ballId:this.$route.query.id
         }
 
     },
+    mounted(){
+        if(this.$route.query.id == 'gj'){
+            this.isShow = false;
+        }else{
+            this.isShow = true;
+        }
+    }
     // created(){
     //     this.getId();
     // },
@@ -41,5 +52,9 @@ export default {
 }
 </script>
 <style  scoped>
-
+    .lod{
+        z-index: 999;
+        position: fixed;
+        width: 100%;
+    }
 </style>

+ 899 - 0
vue_sports/.svn/pristine/68/689a954d28c15c6f05ea7b497b3ba505614b0c31.svn-base

@@ -0,0 +1,899 @@
+<template>
+  <div>
+    <div class="Serch">
+      <div class="Soccer-game row center">
+        <div class="Soccer-game-title row center">
+          <img class="returnimg" :src="img.searchreturn" @click="isreturn()">
+          <span class="tit">{{title}}</span>
+          
+        </div>
+        <div
+          class="row center"
+          style="height:0.88rem;padding-left:0.1rem;"
+          @click="IsSoccerGameClick(isSoccerGameClick)"
+        >
+          <img
+            :class="isSoccerGameClick==true?'Soccer-game-src act':'Soccer-game-src return'"
+            :src="img.Soccerimg1"
+          >
+        </div>
+      </div>
+      <div class="Serch-box">
+        <div class="Serch-box-home">
+          <img class="Serch-box-img" :src="img.Serchimg">
+          <input
+            v-model="SerchValue"
+            @input="serchchange(SerchValue)"
+            class="Serch-box-input"
+            type="text"
+            placeholder="请输入联赛名称"
+          >
+          <img
+            class="Serch-box-del"
+            @click="delinputvalue()"
+            v-if="Serchchange==true"
+            :src="img.Serchdel"
+          >
+        </div>
+      </div>
+    </div>
+    <div class="Soccer-game-box row" v-if="isSoccerGameClick==true">
+      <p
+        class="row item-center"
+        v-for="(i,index) in Regulations.list"
+        @click="listActive(i.id,i.name,i.num)"
+        :key="index"
+        :class="listnum==i.id?'active':''"
+      >
+        {{i.name}}
+        <span
+          class="Soccer-game-num"
+          v-if="i.name!='冠军盘口'"
+          :class="listnum==i.id?'active':''"
+        >
+          <!--Soccer 导航数字  -->
+          {{i.num}}
+        </span>
+      </p>
+    </div>
+    <div
+      v-if="isShow"
+      class="event_prompt row item-center"
+    >目前暂无可适用的{{event_prompt_name==''?'':event_prompt_name}}赛事</div>
+    <div v-else class='ChampionsCup_content' >
+      <div v-if="listnum==1">
+            
+      </div>
+      <div v-if="listnum==2">
+
+      </div>
+      <div v-if="listnum==3">
+        <div
+      v-for=" (item,index) in data.matchData"
+      :key="index"
+      class="Match-box"
+    >
+     
+      <div class="row allAlignment Match-box-top">
+        <div class="Match-box-top-left">
+          <span>{{item.match_date}}</span>
+          <span>{{item.match_time}}</span>
+        </div>
+        <div class="Match-box-top-right row">
+          <span style="margin-right: .15rem;" class="Match-box-top-num">{{item.tag}}</span>
+          <span style="margin-right: .15rem;">让球</span>
+          <span style="margin-right: .15rem;">大小</span>
+        </div>
+      </div>
+      <div
+        class="row allAlignment center"
+        @click="matchInfo(item.match_id);"
+        style="padding:0 .32rem"
+      >
+        <div class="column average name-box">
+          <div>{{item.home_team}}</div>
+          <div>{{item.guest_team}}</div>
+        </div>
+        <div class="Match-bottom-right">
+          <!-- 主队 -->
+          <div class="row">
+            <div
+              class="Match-list-left"
+              v-for="(items,indexs) in item.oddsData.homeOdds"
+              :key="indexs"
+              @click.stop="isBetting(items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,items.odds_only,'homeOdds')"
+            >
+              <div :class="{ 'active' : items.isTrue == true}" class="column center">
+                <span style="color:#FD8F26">{{items.condition}}</span>
+                <span>{{items.odds}}</span>
+              </div>
+            </div>
+          </div>
+          <!-- 客队 -->
+          <div class="row">
+            <div
+              class="Match-list-right row"
+              v-for="(items,indexs) in item.oddsData.guestOdds"
+              :key="indexs"
+              @click.stop="isBetting(items.id,item.home_team,item.guest_team,item.guest_team,items.odds,items.condition,items.odds_only,'guestOdds')"
+            >
+              <div :class="{'active':items.isTrue==true}" class="column center">
+                <span>
+                  <i style="color:#FD8F26">{{items.condition}}</i>
+                </span>
+                <span>{{items.odds}}</span>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+      </div>
+      <div v-show="listnum==4">
+        <!-- 冠军组件 -->
+    <div class="champion">
+      <div v-for="item in ChampionData" :key="item.id">
+        <div class="title">
+          <span>{{item.name}}</span>
+          <div class="time">
+            <!-- <span>2019年5月29日</span> -->
+            <span>{{item.last_time}}</span>
+          </div>
+        </div>
+      <div v-for="(items) in item.data" :key="items.id">
+        <div class="chmpTit">{{items.title}}</div>
+        <div v-for="itemList in items.datas" :key="itemList.id">
+          <div class="list">
+            <span class="chmName">{{itemList.team}}</span>
+            <span class="num">{{itemList.odds}}</span>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <!-- <div v-if="noData">
+      <NotOpend :title="this.info"/>
+    </div> -->
+    </div>
+      </div>
+    </div>
+        <div class="BettingWindow" v-show="isWindow">
+      <BettingWindow/>
+    </div>
+  </div>
+</template>
+
+<script>
+import "@/css/index.css";
+import BettingWindow from "@/components/StBettingWindow";
+export default {
+  name: "ChampionsCup",
+  components:{BettingWindow},
+  data() {
+    return {
+        title:'',
+      // 日期时间数组
+      arr: [],
+      // 本页面的数据
+      data: "",
+      isShow : true, //显示无数据
+      //冠军盘口提示显示隐藏
+      event_prompt: false,
+      scorll: "", //背景滚动
+      //冠军盘口提示区分盘口名
+      event_prompt_name: "",
+      isSoccerGameClick: true,
+      Serchchange: false,
+      listnum: 2, //赛事类型
+      SerchValue: "",
+      betting: 10000, //vuex里面玩法投注数据
+      thisNum: 10000, //vuex里面
+      ChampionData :'', //冠军数据
+      isWindow:false,
+      img: {
+        Soccerimg1: require("@/assets/st-imges/soccer1.png"),
+        Soccerimg2: require("@/assets/st-imges/soccer1.png"),
+        Serchimg: require("@/assets/st-imges/sousuo.png"),
+        Serchdel: require("@/assets/st-imges/del.png"),
+        searchreturn: require("@/assets/st-imges/returnbox.png")
+      },
+      Regulations: {
+        title: " ",
+        list: [
+          { id: 1, name: "滚球", num:''},
+          { id: 2, name: "今日", num:''},
+          { id: 3, name: "早盘", num:''},
+          { id: 4, name: "冠军盘口" }
+        ]
+      }
+    };
+  },
+  created() {
+    this.fun_date();
+  },
+  methods: {
+    //   获取一周赛事
+    fun_date: function() {
+      let date = new Date();
+      let date2 = new Date(date);
+      for (let i = 1; i < 7; i++) {
+        date2.setDate(date.getDate() + i);
+        let years = date2.getFullYear();
+        let month =
+          date2.getMonth() + 1 < 10
+            ? "0" + (date2.getMonth() + 1)
+            : date2.getMonth() + 1;
+        let day =
+          date2.getDate() < 10 ? "0" + date2.getDate() : date2.getDate();
+        let time2 = {};
+        time2.id = years + "-" + month + "-" + day;
+        time2.title = years + "-" + month + "-" + day;
+        this.arr.push(time2);
+        if (i == 6) {
+          this.arr.push({ id: "morning", title: "早盘" });
+        }
+      }
+    },
+    //切换赛事类型
+    listActive(id, name, num) {
+      let time;
+      this.listnum = id;
+      this.event_prompt_name = name;
+      if (num == 0) {
+        this.event_prompt = true;
+        time = setTimeout(() => {
+          this.event_prompt = false;
+          clearTimeout(time);
+        }, 1500);
+      }
+      clearTimeout(time);
+      if (this.listnum == id) return false;
+      this.SerchValue = "";
+      this.listnum = id;
+    },
+    //删除搜索框数据
+    delinputvalue() {
+      this.SerchValue = "";
+      this.Serchchange = false;
+    },
+    toggle: function(index, id) {
+      this.active = index;
+      this.datetimeNum = id;
+      console.log("id", this.datetimeNum);
+      this.SerchValue = "";
+    },
+    // 返回上一层页面
+    isreturn() {
+      history.go(-1);
+    },
+    //获取input输入的值查询数据
+    serchchange(val) {
+      if (val.length >= 1) {
+        this.Serchchange = true;
+      } else {
+        this.Serchchange = false;
+      }
+    },
+    //显示隐藏赛事类型
+    IsSoccerGameClick(isclick) {
+      this.isSoccerGameClick = !isclick;
+    },
+    
+    getAjax(){
+      this.$store.dispatch('GETSHOW',true);
+       this.$http.get(this.$ports.match.ChampionsCup).then(res => {
+      if (res.data.data && res.data.status == 1) {
+        console.log('res', res.data.data.StMorningPlate)
+        this.Regulations.list.forEach(e => {
+          if (e.id == 1) {
+            this.$set(e, "name", res.data.data.StRollBall.typeName);
+            this.$set(e, "num", res.data.data.StRollBall.matchNum);
+          } else if (e.id == 2) {
+            this.$set(e, "name", res.data.data.StToday.typeName);
+            this.$set(e, "num", (e.num = res.data.data.StToday.matchNum));
+          } else if (e.id == 3) {
+            this.$set(e, "name", res.data.data.StMorningPlate.typeName);
+            this.$set(e, "num", res.data.data.StMorningPlate.matchNum);
+          } else if (e.id == 4) {
+            this.$set(e, "name", res.data.data.StChampion.typeName);
+            this.$set(e, "num", res.data.data.StChampion.matchNum);
+          }
+        });
+        console.log('list',this.Regulations)
+        if(this.listnum == 1){
+            this.data = res.data.data.StRollBall;
+        }else if(this.listnum == 2){
+            this.data = res.data.data.StToday;
+        }else if(this.listnum == 3){
+            this.data = res.data.data.StMorningPlate;
+        }else {
+           this.data = res.data.data.StChampion;
+            let champion = {},
+                title = "",
+                stiTime='',
+                //matchData = [],
+                chamData = [];
+              title = Object.keys(this.data.matchData);
+              let val = Object.values(this.data.matchData);
+              title.forEach((e,index) =>{
+                  chamData.push({
+                    name:e,
+                    data:val[index],
+                  })
+                
+              })
+              chamData.forEach((res)=>{
+                res.last_time =res.data.last_time;
+                let resData =  Object.values(res.data);
+                let resTitle =  Object.keys(res.data);
+                res.data = [];
+                resTitle.forEach((e,index)=>{
+                  if(e !=='last_time'){
+                   res.data.push({
+                      title:e,
+                      datas:resData[index]
+                    })
+                  }
+                })
+              })
+                    this.ChampionData =chamData;
+               console.log(this.ChampionData);
+        }
+        // 取值出来进行判定
+        if(this.data.matchData && this.data.matchData.length < 1){
+              this.isShow = true;
+            }else if (
+              this.data.matchData &&
+              this.data.matchData.length > 0
+            ){
+              this.isShow = false;
+              // console.log('dtaa',this.data)
+               console.log('找不到',this.data)
+                 this.dataGroup(this.data);
+            }
+            if(this.listnum == 4){
+                if(this.data.matchData == null){
+              this.isShow = true;
+            }else {
+              this.isShow = false;
+            }
+            }
+          
+      }
+      this.title=res.data.data.leagueName
+      this.$store.dispatch('GETSHOW',false);
+     
+    });
+    },
+       /*--------------------------------------------------------------------------------*/
+    // 添加、删除vuex投注数据公共方法
+    AddDelete: function(id, home, guest, name, odds, condition, odds_only) {
+      let isAdd = true;
+      let bettingInfo = {
+        id,
+        home_team: home,
+        guest_team: guest,
+        name,
+        odds,
+        condition,
+        ganame: "concede_size",
+        score: this.score,
+        bettingTime: "",
+        odds_only
+      };
+      let matchList = this.$store.getters.getBetting;
+      if (this.thisNum != 10000) {
+        //删除vuex投注数据
+        matchList[this.thisNum].data.forEach((res, index) => {
+          if (res.id == id) {
+            matchList[this.thisNum].data.splice(index, 1);
+            this.$store.dispatch("BETTING", matchList);
+            isAdd = false;
+          }
+        });
+        //添加vuex投注数据
+        if (isAdd) {
+          matchList[this.thisNum].data.push(bettingInfo);
+          this.$store.dispatch("BETTING", []);
+          this.$store.dispatch("BETTING", matchList);
+          if (this.$store.getters.getIsBetting) return false;
+          this.$store.dispatch("ISBETTING", true);
+        }
+      } else {
+        //添加新的玩法赔率数据
+        let obj = {
+          title: "concede_size",
+          data: [bettingInfo]
+        };
+        //判断vuex有误其它玩法数据
+        if (matchList) {
+          matchList.push(obj);
+        } else {
+          this.$store.dispatch("BETTING", [obj]);
+        }
+      }
+      // console.log(this.$store.getters.getIsBetting);
+      if (this.$store.getters.getIsBetting) return false;
+      this.$store.dispatch("ISBETTING", true);
+    },
+        /*--------------------------------------------------------------------------------*/
+    // 添加、删除vuex投注数据公共方法
+    AddDelete: function(id, home, guest, name, odds, condition, odds_only) {
+      let isAdd = true;
+      let bettingInfo = {
+        id,
+        home_team: home,
+        guest_team: guest,
+        name,
+        odds,
+        condition,
+        ganame: "concede_size",
+        score: this.score,
+        bettingTime: "",
+        odds_only
+      };
+      let matchList = this.$store.getters.getBetting;
+      if (this.thisNum != 10000) {
+        //删除vuex投注数据
+        matchList[this.thisNum].data.forEach((res, index) => {
+          if (res.id == id) {
+            matchList[this.thisNum].data.splice(index, 1);
+            this.$store.dispatch("BETTING", matchList);
+            isAdd = false;
+          }
+        });
+        //添加vuex投注数据
+        if (isAdd) {
+          matchList[this.thisNum].data.push(bettingInfo);
+          this.$store.dispatch("BETTING", []);
+          this.$store.dispatch("BETTING", matchList);
+          if (this.$store.getters.getIsBetting) return false;
+          this.$store.dispatch("ISBETTING", true);
+        }
+      } else {
+        //添加新的玩法赔率数据
+        let obj = {
+          title: "concede_size",
+          data: [bettingInfo]
+        };
+        //判断vuex有误其它玩法数据
+        if (matchList) {
+          matchList.push(obj);
+        } else {
+          this.$store.dispatch("BETTING", [obj]);
+        }
+      }
+      // console.log(this.$store.getters.getIsBetting);
+      if (this.$store.getters.getIsBetting) return false;
+      this.$store.dispatch("ISBETTING", true);
+    },
+
+    /*--------------------------------------------------------------------------------*/
+    //修改当前页面样式公共方法
+    modifyStyle: function(id, type) {
+      console.log(id, type);
+      this.data.matchData.every(e => {
+        let ret = false;
+        if (type == "homeOdds") {
+          e.oddsData.homeOdds.every((res, index) => {
+            if (res.id == id) {
+              this.$set(
+                e.oddsData.homeOdds[index],
+                "isTrue",
+                res.isTrue ? false : true
+              );
+              ret = true;
+              return false;
+            }
+            return true;
+          });
+        } else if (type == "guestOdds") {
+          e.oddsData.guestOdds.every((res, index) => {
+            if (res.id == id) {
+              this.$set(
+                e.oddsData.guestOdds[index],
+                "isTrue",
+                res.isTrue ? false : true
+              );
+              ret = true;
+              return false;
+            }
+            return true;
+          });
+        }
+        if (ret) {
+          return false;
+        } else {
+          return true;
+        }
+      });
+    },
+       /*--------------------------------------------------------------------------------*/
+    // 修改投注样式
+    isBetting(id, home, guest, name, odds, condition, odds_only, type) {
+      console.log(this.data);
+      if (this.data) {
+        //处理vuex里面数据
+        this.AddDelete(id, home, guest, name, odds, condition, odds_only);
+        //处理当前页面样式
+        this.modifyStyle(id, type);
+      }
+    },
+      /*--------------------------------------------------------------------------------*/
+    // 赛事赔率玩法数据组合方法
+
+    dataGroup: function(data) {
+     
+      let homeOdds = [],
+        guestOdds = [];
+      let A, B, C, D;
+      data.matchData.forEach((column, index) => {
+        if (column.oddsData == null || column.oddsData.length == 0) {
+          column.oddsData = {
+            homeOdds: [{ status: -1 }, { status: -1 }],
+            guestOdds: [{ status: -1 }, { status: -1 }]
+          };
+        } else {
+          column.oddsData.forEach(val => {
+            if (this.betting != 10000) {
+              this.betting.forEach(e => {
+                if (val.id == e.id) {
+                  val.isTrue = true;
+                  //this.$set(val,'isTrue',true);
+                }
+              });
+            }else{
+                 val.isTrue = false;
+            }
+            if (val.odds_code == "concede_home") {
+              A = val;
+              
+            } else if (val.odds_code == "size_home") {
+              B = val;
+            } else if (val.odds_code == "concede_guest") {
+              C = val;
+            } else if (val.odds_code == "size_guest") {
+              D = val;
+            }
+          });
+          column.oddsData = {};
+          column.oddsData.homeOdds = [];
+          if(A != undefined){
+            column.oddsData.homeOdds.push(A);
+          }
+          if(B != undefined){
+            column.oddsData.homeOdds.push(B);
+            
+            }
+          column.oddsData.guestOdds = [];
+          if(C != undefined){
+            column.oddsData.guestOdds.push(C);
+          }
+          if(D != undefined){
+            column.oddsData.guestOdds.push(D);
+          }
+        }
+      });
+      this.data = data;
+      console.log('data`````', this.data);
+    }
+  },
+  mounted() {
+    // 默认选中数据
+    this.listnum = 3; 
+        // 获取是否滑动信息
+    if (this.$public.getCache("box_size") == 1) {
+      this.isshrink = true;
+    }
+    //是否展示投注框
+    if (this.$store.getters.getIsBetting) {
+      this.isWindow = true;
+    }
+        //获取vuex玩法已投注相对应的数据
+    let getBetting = this.$store.getters.getBetting;
+    
+    if (getBetting) {
+      getBetting.forEach((e, index) => {
+        if ("concede_size" == e.title) {
+          console.log('数据源',e);
+          this.thisNum = index;
+          if(e.data.length > 0){
+
+            this.betting = e.data;
+          }
+        }
+      });
+    }
+    this.getAjax();
+  },
+  computed:{
+    changeData:function(){
+        
+      return this.listnum
+    },
+        getBetting() {
+      return this.$store.getters.getBetting;
+    },
+    IsWindow() {
+      return this.$store.getters.getIsBetting;
+    },
+    //获取投注框删除的投注信息
+    getDeleteType() {
+      return this.$store.getters.getDeleteType;
+    }
+  },
+  watch:{
+    changeData(val){
+      console.log(val)
+      // 监听改变状态修改值。
+       this.getAjax();
+  
+    },
+      // 监听滚动状态变化赋值滚动
+    getscorllcode(val) {
+      console.log(val);
+      this.scorll = val;
+    },
+    getDeleteType(val) {
+      let flag = true;
+      this.data.matchData.forEach(e => {
+        if (val == "all") {
+          e.oddsData.guestOdds.forEach(data => {
+            this.$set(data, "isTrue", false);
+          });
+          e.oddsData.homeOdds.forEach(data => {
+            this.$set(data, "isTrue", false);
+          });
+        } else {
+          let showData = true;
+          e.oddsData.guestOdds.forEach(data => {
+            if (data.id == val) {
+              this.$set(data, "isTrue", false);
+              showData = false;
+            }
+          });
+          if (showData) {
+            e.oddsData.homeOdds.forEach(data => {
+              if (data.id == val) {
+                this.$set(data, "isTrue", false);
+              }
+            });
+          }
+        }
+      });
+    },
+    /*--------------------------------------------------------------------------------*/
+    //获取已投注信息
+    getBetting(val) {
+      //获取vuex玩法已投注相对应的数据
+      if (val) {
+        val.forEach((e, index) => {
+          if ("concede_size" == e.title) {
+            this.thisNum = index;
+            this.betting = e.data;
+          }
+        });
+      }
+    },
+        /*--------------------------------------------------------------------------------*/
+    // 监听投注框开关
+    IsWindow(val) {
+      this.isWindow = val;
+    }
+  }
+};
+</script>
+
+<style scoped>
+.event_prompt {
+  height: 0.88rem;
+  background: #737373;
+  color: #a6a6a6;
+  padding-left: 0.3rem;
+}
+.Soccer-game-num {
+  display: inline-block;
+  width: 0.4rem;
+  height: 0.4rem;
+  border-radius: 50%;
+  background: #a6a6a6;
+  color: #626262;
+  margin-left: 0.1rem;
+  line-height: 0.4rem;
+  text-align: center;
+}
+.Soccer-game-num.active {
+  background: #f76649;
+  color: #f8f8f8;
+}
+.act {
+  transform: rotate(180deg);
+  transition: 0.2s;
+}
+.return {
+  transform: rotate(0deg);
+  transition: 0.2s;
+}
+.Serch {
+  height: 0.88rem;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  background: linear-gradient(to bottom, #6a6a6a, #565656);
+  color: #f76649;
+  font-family: "PingFang-SC-Regular";
+  padding: 0 0.33rem;
+}
+.returnimg {
+  width: 0.37rem;
+  height: 0.3rem;
+  margin-right: 0.1rem;
+}
+.Serch-box {
+  display: flex;
+  align-items: center;
+}
+.Serch-box-input {
+  width: 3.8rem;
+  border: none;
+  position: absolute;
+  height: 0.44rem;
+  line-height: 0.44rem;
+  left: 0.5rem;
+  color: #aaa;
+}
+.Serch-box-img {
+  width: 0.3rem;
+  height: 0.3rem;
+  position: absolute;
+  left: 0.1rem;
+  top: 0.06rem;
+}
+.Serch-box-del {
+  width: 0.2rem;
+  height: 0.2rem;
+  position: absolute;
+  right: 0.2rem;
+}
+.Serch-box-home {
+  height: 0.45rem;
+  line-height: 0.45rem;
+  width: 4.2rem;
+  background: #e4e4e4;
+  border-radius: 0.2rem;
+  display: flex;
+  justify-content: space-around;
+  align-items: center;
+  padding-left: 0.1rem;
+  padding-right: 0.1rem;
+  position: relative;
+}
+.Soccer-game-title {
+  height: 0.88rem;
+  font-size: 0.23rem;
+}
+.Soccer-game-title .tit{
+  font-size: 0.3rem;
+}
+.Soccer-game-box {
+  height: 0.88rem;
+  background-color: #626262;
+}
+.Soccer-game-box > p {
+  margin-left: 0.3rem;
+  color: #a6a6a6;
+}
+.Soccer-game-box p.active {
+  color: #f76649;
+}
+.Soccer-game-src {
+  width: 0.25rem;
+  height: 0.15rem;
+  /* margin-left: .3rem */
+}
+
+.Match-title-num {
+  width: 0.46rem;
+  height: 0.46rem;
+  line-height: 0.46rem;
+  text-align: center;
+  background: #f76649;
+  font-size: 0.26rem;
+  border-radius: 50%;
+  color: #f5f5f5;
+}
+
+.Match-box-top-right > span {
+  width: 1.07rem;
+  text-align: center;
+}
+.Match-box {
+  height: 2.45rem;
+}
+.name-box {
+  height: 1.76rem;
+}
+.Match-box-top {
+  height: 0.45rem;
+  line-height: 0.45rem;
+  background: #dcdcdc;
+  font-size: 0.23rem;
+  padding: 0 0.32rem;
+}
+.Match-box-top-num {
+  width: 0.64rem !important;
+  height: 0.45rem;
+  background: #ebebeb;
+  font-size: 0.24rem;
+}
+.Match-box {
+  background: #f8f8f8;
+}
+.Match-bottom-right {
+  height: 2rem;
+  padding: 0.1rem 0.1rem 0 0.14rem;
+}
+.Match-list-left div {
+  width: 1.07rem;
+  height: 0.76rem;
+  border: 1px solid #e4e4e4;
+  border-radius: 0.1rem;
+  padding: 0.1rem;
+  margin: 0.06rem 0.08rem;
+}
+.Match-list-right div {
+  width: 1.07rem;
+  height: 0.76rem;
+  border: 1px solid #e4e4e4;
+  border-radius: 0.1rem;
+  margin: 0.06rem 0.08rem;
+}
+/* 冠军 */
+.champion .title {
+  height: 1rem;
+  padding: 0.15rem 0.2rem;
+  background-color: #626262;
+}
+.champion .title span {
+  font-size: 0.28rem;
+  font-weight: bold;
+  color: #e1e1df;
+}
+.champion .title .time span:nth-child(2) {
+  color: #f76649;
+}
+.chmpTit {
+  height: 0.7rem;
+  line-height: 0.7rem;
+  padding: 0 0.2rem;
+  background: #e4e4e4;
+}
+.champion .list {
+  height: 1rem;
+  line-height: 0.6rem;
+  padding: 0.1rem 0.2rem;
+  width: 100%;
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-pack: justify;
+  -ms-flex-pack: justify;
+  justify-content: space-between;
+  border-bottom: 1px solid #aaa;
+  font-size: 0.28rem;
+  background: #ffffff;
+}
+.champion .list span:nth-child(1) {
+  margin-top: 0.1rem;
+}
+.champion .list .num {
+  width: 1.07rem;
+  height: 0.76rem;
+  border: 1px solid #e4e4e4;
+  border-radius: 0.1rem;
+  padding: 0.1rem;
+  text-align: center;
+}
+
+
+</style>

+ 25 - 11
vue_sports/.svn/pristine/59/59f27e8ea6202421ce28773d0f12be595723317d.svn-base → vue_sports/.svn/pristine/6d/6d4120c067707601c02205e132535fc9168408f5.svn-base

@@ -117,7 +117,8 @@ export default {
       data: {},
       data2: [],
       info: "没有相关比赛信息",
-      noData: false
+      noData: false,
+      timers:true
     };
   },
   components: {
@@ -148,16 +149,9 @@ export default {
           this.data2[index].istrueC == true ? false : true
         );
       }
-    }
-  },
-  mounted() {
-    this.$store.dispatch("GETSHOW", true);
-    // 接收头部传过来的状态
-    Bus.$on("show", data => {
-      console.log("data", data);
-      this.isShow = data;
-    });
-    this.$http
+    },
+    getAjax(){
+          this.$http
       .get(this.$ports.match.matchState, {
         game_code: this.gameCode,
         type_code: "StRollBall"
@@ -174,6 +168,26 @@ export default {
         }
       })
       .catch(res => {});
+    }
+  },
+  mounted() {
+    this.$store.dispatch("GETSHOW", true);
+    // 接收头部传过来的状态
+    Bus.$on("show", data => {
+      console.log("data", data);
+      this.isShow = data;
+    });
+  this.getAjax();
+  let _this = this;
+      this.$public.ajaxTimerFun(function(timing) {
+      _this.getAjax();
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
+  },
+  beforeDestroy(){
+    this.timers = false;
   }
 };
 </script>

+ 16 - 21
vue_sports/.svn/pristine/60/60760fc9b18b77975a6f96906b50208ca9955421.svn-base → vue_sports/.svn/pristine/73/736c0d7a9702f014b63cfaeb92213e23c4d93903.svn-base

@@ -58,7 +58,8 @@ export default {
         name: "",
         index: ""
       },
-      data: ""
+      data: "",
+      timers:true // 定时器
     };
   },
   components: {
@@ -81,8 +82,8 @@ export default {
       this.$http.get(this.$ports.home.trollingBall).then(res => {
         console.log("这是足球",res)
           // this.sssd();
-        if (res.data.status == 1 && res.data.data.length > 0 && res.data.data.matchData.length > 0) {
-             this.isShow = true;
+        if (res.data.status == 1 && res.data.data != null && res.data.data.matchData.length > 0) {
+            this.isShow = true;
           console.log('res', res.data)
           this.data = res.data.data.matchData;
           this.titel = res.data.data.gameName;
@@ -109,7 +110,7 @@ export default {
     } else if (this.type == 2) {
       this.$store.dispatch('GETSHOW',true);
       this.$http.get(this.$ports.home.rollingBall).then(res => {
-        if (res.data.status == 1 && res.data.data.length > 0 && res.data.data.matchData.length > 0) {
+        if (res.data.status == 1 && res.data.data != null && res.data.data.matchData.length > 0) {
              this.isShow = true;
             
           
@@ -127,7 +128,7 @@ export default {
     } else if (this.type == 3) {
         this.$store.dispatch('GETSHOW',true);
       this.$http.get(this.$ports.home.bqrollingBall).then(res => {
-        if (res.data.status == 1 && res.data.data.length > 0 && res.data.data.matchData.length > 0) {
+        if (res.data.status == 1 && res.data.data != null && res.data.data.matchData.length > 0) {
              this.isShow = true;
         
           this.data = res.data.data.matchData;
@@ -143,26 +144,20 @@ export default {
         }
       });
     }
-  
-
     },
-    // sssd:function(){
-        // let time=setInterval(function (params) {
-        // console.log('可爱多'); 
-        // this.$http.get(this.$ports.home.trollingBall).then(res=>{
-        // if(res.data.status==="1"&&res.data.msg==="成功"){
-        //     // 代码
-        //   console.log('计时器',res)
-        // }else{
-        //     console.log("请求失败")
-        // }
-      // })
-    //  },5000)
-    // }
   },
   mounted() {
-   
+    let _this =this;
+    this.$public.ajaxTimerFun(function(timing){
+       _this.getAjax();
+      if (!_this.timers){
+      clearInterval(timing);
+    }
+    })
     this.getAjax();
+  },
+  beforeDestroy(){
+    this.timers = false;
   }
 };
 </script>

+ 15 - 4
vue_sports/.svn/pristine/81/813c870fdab83f52d2381a5c160d3604440e89a7.svn-base → vue_sports/.svn/pristine/7a/7aa1305ec88f008eca20c29c8798fb0468e6106c.svn-base

@@ -39,13 +39,13 @@
           <span>{{items.match_time}}</span>
         </div>
       </div>
-      <rollingBall
-        :ballName="ball.name"
-        :index="ball.index"
+              <rollingBall
+        :ballName=" item.today.name"
+        :index=" item.today.count"
         style="margin-top:0.47rem;margin-bottom:0.16rem;"
       ></rollingBall>
       <div v-for=" item_a in item.league" :key="item_a.id">
-        <rollingBall :ballName="item_a.name" :index="item_a.count" style="margin-bottom:0.16rem;"></rollingBall>
+        <rollingBall :ballName="item_a.name_chinese" :gameCode='item.game_code' :lgId ='item_a.lg_id' :index="item_a.count" style="margin-bottom:0.16rem;"></rollingBall>
       </div>
     </div>
     <!-- 即将开赛 -->
@@ -100,6 +100,7 @@ export default {
       },
       matchNum: "", //btn数量
       gameCode: "", //传入betting的值
+      timers:true
     };
   },
   methods: {
@@ -142,6 +143,13 @@ export default {
   },
   components: { rollingBall },
   mounted() {
+        let _this =this;
+    this.$public.ajaxTimerFun(function(timing){
+       _this.getAjax(_this.$ports.home.sports);
+      if (!_this.timers){
+      clearInterval(timing);
+    }
+    })
     this.getAjax(this.$ports.home.sports);
   },
   computed: {
@@ -157,6 +165,9 @@ export default {
         this.getAjax(this.$ports.home.getSon);
       }
     }
+  },
+  beforeDestroy(){
+    this.timers = false;
   }
 };
 </script>

+ 71 - 4
vue_sports/.svn/pristine/ba/bad390c8a33169f7c8282c8c00d30e73fabafd34.svn-base → vue_sports/.svn/pristine/7b/7bf089f135f9c0cb8c9cb567a761fb7c7af1d238.svn-base

@@ -1,7 +1,7 @@
 import { type } from "os";
 
 export default {
-  //数据存放到缓存
+  //数据存放到sessionStorage缓存
   setCache: function (key, val) {
     if (val instanceof Array) {
       let str = JSON.stringify(val);
@@ -11,10 +11,18 @@ export default {
     }
 
   },
-  //获取缓存数据
+  //获取缓存sessionStorage数据
   getCache: function (key) {
     return window.sessionStorage.getItem(key);
   },
+  //获取缓存localStorage数据
+  setItem: function (key,val) {
+    return localStorage.setItem(key,val);
+  },
+  //获取缓存localStorage数据
+  getItem: function (key) {
+    return localStorage.getItem(key);
+  },
 
   /**
    * 比赛时间计时器
@@ -108,7 +116,66 @@ export default {
         }
       });
     }
-  }
+  },
+  /**
+   * 接口轮询定时器
+   * @param {function} callback 定时器回调方法
+   */
+  ajaxTimerFun(callback){
+    //到计时
+    let  timing = setInterval(function(){
+      callback && callback(timing)
+    },43200000);
+    // },5000);
+  },
+
 
+  /**
+   * 复合算法
+   * @param {int} data  第几场赛事
+   * @param {array} dataList 投注赛事列表
+   */
+  betPlay(data,dataList){
+    let listLenth = dataList.length;
+
+    //赔率算法
+    let addSum =1;
+    dataList.forEach((res,index )=>{
+      //if(data >= index+1){
+        let add = addSum *(1+res.odds*1);
+        addSum =add
+      //}
+    })
+
+    //组合算法分母
+    function denominator (num){
+      let group =1;
+      for(let i = listLenth ; i >(listLenth -num);i--){
+        let add = group*i
+        group  =  add;
+      }
+      return group;
+    }
+
+    //组合算法分子
+    function molecule (num){
+      let son =1;
+      for(let i = num ; i >1;i--){
+        let add = son*i;
+        son  =  add;
+      }
+      return son;
+    }
+
+    //组合算法
+    function algorithm(data) {
+      return {
+        title:`${data}串1`,//algorithm
+        index:denominator(data)/molecule(data),
+        odds:addSum-1,
+      };
+    }    
+    return algorithm(data);
+  }
+}
 
-}

+ 173 - 0
vue_sports/.svn/pristine/7c/7ce7f1f43ea49d3d50a5c5702b6416eaf8627ff5.svn-base

@@ -0,0 +1,173 @@
+<template>
+  <div>
+    <div v-if="tennisShow">
+      <h3 style="color:#F76649;">{{title}}</h3>
+      <div class="tennis">
+        <div class="tennis-dtl" v-for="(item,index) in dat" :key="item.id">
+          <div class="teamName">
+            <span>{{item.host_player_name}}</span>
+            <div>vs</div>
+            <span>{{item.guest_player_name}}</span>
+          </div>
+          <div class="frequency">
+            <div :class="item.match_process == 1? 'status':''">
+              <span>第一盘</span>
+              <span>{{item.first_inning_score}}</span>
+            </div>
+            <div :class="item.match_process == 2? 'status':''">
+              <span>第二盘</span>
+              <span>{{item.second_inning_score}}</span>
+            </div>
+            <div :class="item.match_process == 3? 'status':''">
+              <span>第三盘</span>
+              <span>{{item.third_inning_score}}</span>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="ballBtn">
+        <rollingBall
+          :name="name"
+          :index="ball.index"
+          :id="ball.id"
+          :ballName="ball.name"
+          :gameCode="gameCode"
+        ></rollingBall>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import rollingBall from "@/components/StRollingBall";
+export default {
+  data() {
+    return {
+      title: "网球",
+      tennisShow: true,
+      selection: true,
+      ballName: "",
+      name: "", //球类名称传值
+      ball: {
+        name: "所有网球滚球",
+        index: "8",
+        id: 1003
+      },
+      gameCode: "", //球类别名
+      dat: []
+    };
+  },
+  components: { rollingBall },
+  mounted() {
+    this.getAjax();
+    let _this = this;
+    this.$public.ajaxTimerFun(function(timing) {
+      _this.getAjax();
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
+  },
+  methods: {
+    getAjax() {
+      this.$store.dispatch("GETSHOW", true);
+      this.$http.get(this.$ports.home.wqrollingBall).then(res => {
+        if (
+          res.data.status == 1 &&
+          res.data != [] &&
+          res.data.data.matchData.length != 0
+        ) {
+          console.log("网球", res);
+          this.dat = res.data.data.matchData;
+          this.title = res.data.data.gameName;
+          this.ball.index = this.dat.length;
+          this.name = this.title;
+          this.ball.name = "所有" + this.title + "滚球";
+          this.gameCode = res.data.data.game_code;
+        } else {
+          this.tennisShow = false;
+          console.log(" this.tennisShow", this.tennisShow);
+        }
+        this.$store.dispatch("GETSHOW", false);
+      });
+    }
+  }
+};
+</script>
+<style scoped>
+.tennis {
+  margin-top: 0.13rem;
+  width: 100%;
+  border-radius: 0.08rem;
+  /* height: 6.42rem; */
+  background: #dcdcdc;
+  /* padding: 0 0.3rem 0 0.35rem; */
+
+  margin-bottom: 0.2rem;
+  padding: 0.3rem;
+}
+h3 {
+  text-align: left;
+  font-size: 0.3rem;
+  color: #000000;
+  padding: 0.25rem 0 0.05rem;
+  font-weight: 500;
+}
+.tennis-dtl {
+  width: 100%;
+  background: #dcdcdc;
+  border-bottom: 1px solid #e4e4e4;
+  margin-top: 0.2rem;
+  /* height: 1.89rem; */
+  height: auto;
+  padding: 0.24rem 0.89rem 0.25rem 0.31rem;
+  position: relative;
+  display: flex;
+  justify-content: space-between;
+  /* align-items: center; */
+}
+
+.teamName {
+  color: #333333;
+  font-size: 0.28rem;
+  width: 2.7rem;
+  text-align: left;
+}
+.frequency {
+  width: 1.57rem;
+  vertical-align: middle;
+  /* 垂直对齐 */
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+}
+.frequency div {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  font-size: 0.24rem;
+  color: #333333;
+}
+.frequency div:nth-last-child(1) {
+  margin-bottom: 0;
+}
+.frequency .status {
+  color: #f76649;
+}
+.tennis-dtl .icon {
+  width: 0.08rem;
+  height: 0.08rem;
+  position: absolute;
+  top: 0.8rem;
+  right: 0.33rem;
+}
+.tennis-dtl .icon i {
+  display: inline-block;
+  background: #000000;
+  width: 0.08rem;
+  height: 0.08rem;
+}
+.ballBtn {
+  padding-top: 0.41rem;
+  padding-bottom: 0.46rem;
+}
+</style>

+ 5 - 4
vue_sports/.svn/pristine/35/356f09a59b32420fc114a5039bf44692ff61e41a.svn-base → vue_sports/.svn/pristine/86/864e405584cc9db4d7a02cf0ae6d557720163710.svn-base

@@ -28,8 +28,9 @@
       </div>
       <RollingBallHead v-if="nameShow" :name="name" :ishow="ishow"/>
     </div>
-    <Match v-show="nameShow" :gameCode="gameCode" :ishow="ishow"></Match>
-    <NavBall v-show="!nameShow" :name="name" :headShow = 'headShow'/>
+    <Match v-show="nameShow" :gameCode="gameCode" :ishow="ishow" :name="name"></Match>
+    <NavBall v-show="!nameShow" :name="name"/>
+    <!-- <NavBall v-show="!nameShow" :name="name" :headShow = 'headShow'/> -->
     <LinkFooter></LinkFooter>
   </div>
 </template>
@@ -145,7 +146,7 @@ export default {
           ];
           //console.log('滚球类',res);
           if (res.data.status == 1 && res.data.data.length > 0 && res.data.data != null ) {
-            this.headShow = true;
+            // this.headShow = true;
             let dtatArry = [];
             this.arr.forEach(e => {
               res.data.data.forEach(val => {
@@ -166,7 +167,7 @@ export default {
             }
           } else {
             this.arr = [];
-            this.headShow = false;
+            // this.headShow = false;
             this.$store.dispatch('GETSHOW',false);
           }
         });

+ 0 - 549
vue_sports/.svn/pristine/8e/8e23c89d102fe548a05f8e51770013224c882658.svn-base

@@ -1,549 +0,0 @@
-<template>
-  <div>
-    <div>
-      <div class="Serch row item-center">
-        <div class="Soccer-game row item-center">
-          <div
-            style=" display:flex;align-items:center;justify-content:center;"
-            class="Soccer-game-title"
-            @click="isreturn()"
-          >
-            <img class="box-img" src="../assets/st-imges/returnbox.png">
-            {{this.title}}
-          </div>
-        </div>
-
-        <div class="Serch-box row item-center">
-          <div class="Serch-box-home row item-center">
-            <img class="Serch-box-img" src="../assets/st-imges/sousuo.png">
-            <input
-              v-model="SerchValue"
-              @keydown="serchchange(SerchValue)"
-              @input="searchTeam(SerchValue)"
-              class="Serch-box-input"
-              type="text"
-              placeholder="请输入球队名称"
-            >
-            <img
-              class="Serch-box-del"
-              @click="delinputvalue()"
-              v-if="Serchchange==true"
-              src="../assets/st-imges/del.png"
-            >
-          </div>
-        </div>
-      </div>
-    </div>
-    <div>
-      <div v-for="items in data" :key="items.id">
-        <div class="row allAlignment box center">
-          <span>{{items.name_chinese}}</span>
-          <div class="Match-title-num">
-            <span>{{items.count}}</span>
-          </div>
-        </div>
-
-        <div v-for=" (item,index) in items.match_info" :key="index" class="Match-box">
-          <div class="row allAlignment Match-box-top">
-            <div class="Match-box-top-left">
-              <span>{{item.match_date}}</span>
-              <span>{{item.match_time}}</span>
-            </div>
-            <div class="Match-box-top-right row">
-              <span style="margin-right: .15rem;" class="Match-box-top-num">{{item.tag}}</span>
-              <span style="margin-right: .15rem;">让球</span>
-              <span style="margin-right: .15rem;">大小</span>
-            </div>
-          </div>
-          <div
-            class="row allAlignment center"
-            @click="matchInfo(item.match_id);"
-            style="padding:0 .32rem"
-          >
-            <div class="column average name-box">
-              <div>{{item.home_team}}</div>
-              <div>{{item.guest_team}}</div>
-            </div>
-            <div class="Match-bottom-right">
-              <!-- 主队 -->
-              <div class="row">
-                <div
-                  class="Match-list-left"
-                  v-for="(items,indexs) in item.oddsData.homeOdds"
-                  :key="indexs"
-                  @click.stop="isBetting(items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,'homeOdds')"
-                >
-                  <div :class="{ 'active' :items.isTrue == true}" class="column center">
-                    <span style="color:#FD8F26">{{items.condition}}</span>
-                    <span>{{items.odds}}</span>
-                  </div>
-                </div>
-              </div>
-              <!-- 客队 -->
-              <div class="row">
-                <div
-                  class="Match-list-right row"
-                  v-for="(items,indexs) in item.oddsData.guestOdds"
-                  :key="indexs"
-                  @click.stop="isBetting(items.id,item.home_team,item.guest_team,item.guest_team,items.odds,items.condition,'guestOdds')"
-                >
-                  <div :class="{'active':items.isTrue==true }" class="column center">
-                    <span style="color:#FD8F26">
-                      <i style="color:#AAAAAA">{{items.condition}}</i>
-                    </span>
-                    <span>{{items.odds}}</span>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
-</template>
-<script>
-import BettingWindow from "@/components/StBettingWindow";
-import NotOpend from "@/components/StNotOpend";
-import Loading from "@/components/StLoading";
-export default {
-  name: "entryForm",
-  data() {
-    return {
-      SerchValue: "",
-      Serchchange: false,
-      title: " ", //标题
-      data: "",
-      game_code: this.$route.query.game_code, //球的类型别名
-      leagueID: this.$route.query.leagueID, //获取联赛id
-      isWindow: false,
-      info: "没有相关联赛信息",
-      noData: false, //没有数据为true
-      betting: 10000 //vuex里面玩法投注数据
-    };
-  },
-  components: {
-    BettingWindow,
-    NotOpend,
-    Loading
-  },
-  methods: {
-    // 返回上一页
-    isreturn() {
-      history.go(-1);
-    },
-    getmatchInfo(search) {
-      // console.log('奔溃接口页面');
-      this.$store.dispatch("GETSHOW", true);
-      this.$http
-        .get(this.$ports.match.participateDtl, {
-          game_code: this.game_code,
-          code: this.$route.query.code,
-          search
-        })
-        .then(res => {
-          this.codeShow = false;
-          this.$store.dispatch("GETSHOW", false);
-          if (res.data.status == 1) {
-            // let odds = {};
-            // let homeOdds = [],
-            //   guestOdds = [];
-            console.log("参赛表单", res.data.data);
-            // for (var i = 0; i < res.data.data.length; i++) {
-            //   this.dataGroup(res.data.data[i].match_info);
-            // }
-            this.data = res.data.data;
-          } else {
-          }
-        });
-    },
-    //是否显示删除按钮
-    serchchange(val) {
-      if (val.length >= 1) {
-        this.Serchchange = true;
-      } else {
-        this.Serchchange = false;
-      }
-    },
-    /**
-     * 查询球队
-     */
-    searchTeam(val) {
-      let getActivity = this.$store.getters.getActivity;
-      let matchDate = this.$route.query.matchDate;
-      if (val.length >= 1) {
-        this.Serchchange = true;
-      } else {
-        this.Serchchange = false;
-      }
-      this.getmatchInfo(val);
-    },
-    //清空输入
-    delinputvalue() {
-      this.SerchValue = "";
-      this.Serchchange = false;
-      this.getmatchInfo("");
-    },
-     // 添加、删除vuex投注数据公共方法
-    AddDelete:function(id,home,guest,name,odds,condition){
-      let isAdd = true;
-      let bettingInfo = {
-        id,
-        home_team:home,
-        guest_team:guest,
-        name,
-        odds,
-        condition,
-        ganame:'concede_size',
-        score:this.score,
-        bettingTime:'',
-
-      }
-      let matchList = this.$store.getters.getBetting;
-      if (this.thisNum != 10000) {
-        //删除vuex投注数据
-          matchList[this.thisNum].data.forEach((res, index) => {
-            if (res.id == id) {
-              matchList[this.thisNum].data.splice(index, 1);
-              this.$store.dispatch("BETTING",matchList)
-              isAdd = false;
-            }
-          });
-          //添加vuex投注数据
-          if (isAdd) {
-            matchList[this.thisNum].data.push(bettingInfo);
-            this.$store.dispatch("BETTING",matchList)
-            if(this.$store.getters.getIsBetting) return false
-            this.$store.dispatch("ISBETTING",true)
-          }
-      } else {
-        //添加新的玩法赔率数据
-        let obj = {
-            title:'concede_size',
-            data: [bettingInfo]
-          };
-          //判断vuex有误其它玩法数据
-        if(matchList){
-          matchList.push(obj);
-        }else{
-          this.$store.dispatch("BETTING",[obj])
-        }
-      }
-      if(this.$store.getters.getIsBetting) return false
-      this.$store.dispatch("ISBETTING",true)
-    },
-       //修改当前页面样式公共方法
-    modifyStyle:function(id,type){
-      console.log(id,type);
-      this.data.matchData.every(e => {
-        let ret = false;
-        if(type == "homeOdds"){
-          e.oddsData.homeOdds.every((res, index) => {
-            if (res.id == id) {
-                this.$set( e.oddsData.homeOdds[index],"isTrue",res.isTrue ? false : true);
-                ret = true;
-                return false;
-              }
-              return true;
-          });
-        }else if(type == "guestOdds"){
-            e.oddsData.guestOdds.every((res, index) => {
-              if (res.id == id) {
-                  this.$set( e.oddsData.guestOdds[index],"isTrue",res.isTrue ? false : true);
-                  ret = true;
-                  return false;
-                }
-                return true;
-            });
-        }
-        if (ret) {
-          return false;
-        } else {
-          return true;
-        }
-      });
-    
-    },
-    //修改投注样式
-    isBetting(id,home,guest,name,odds,condition,type) {
-      if(this.data){
-        // 处理vuex 数据
-        this.AddDelete(id,home,guest,name,odds,condition);
-        // 处理当前页面样式
-         this.modifyStyle(id, type);
-      }
-    },
-    //跳转到赛事详情
-    matchInfo: function(id) {
-      this.$router.push({
-        path: "/StRollBallBettingPage",
-        query: { gameCode: this.game_code, home: 1 }
-      });
-      this.$store.dispatch("MACTH_ID", id);
-    },
-    /**
-     * 赛事赔率玩法数据组合方法
-     */
-    dataGroup: function(data) {
-      let homeOdds = [],
-        guestOdds = [];
-      let A, B, C, D;
-      data.matchData.forEach((column, index) => {
-        if (column.oddsData == null || column.oddsData.length == 0) {
-          // column.oddsData = {
-          //   homeOdds: [{ status: -1 }, { status: -1 }],
-          //   guestOdds: [{ status: -1 }, { status: -1 }]
-          // };
-        } else {
-          column.oddsData.forEach(val => {
-            if (this.betting != 10000) {
-              this.betting.forEach(e => {
-                if (val.id == e) {
-                  val.isTrue = true;
-                  //this.$set(val,'isTrue',true);
-                } else {
-                  //this.$set(val,'isTrue',false);
-                  //val.isTrue =false
-                }
-              });
-            }
-            if (val.odds_code == "concede_home") {
-              A = val;
-            } else if (val.odds_code == "size_home") {
-              B = val;
-            } else if (val.odds_code == "concede_guest") {
-              C = val;
-            } else if (val.odds_code == "size_guest") {
-              D = val;
-            }
-          });
-          column.oddsData.homeOdds = [];
-          column.oddsData.homeOdds.push(A);
-          column.oddsData.homeOdds.push(B);
-          column.oddsData.guestOdds = [];
-          column.oddsData.guestOdds.push(C);
-          column.oddsData.guestOdds.push(D);
-        }
-      });
-      this.data = data;
-    }
-  },
-  /**
-   * 计算属性
-   */
-  computed: {
-    getBetting() {
-      return this.$store.getters.getBetting;
-    },
-             //获取投注框删除的投注信息
-    getDeleteType(){
-      return this.$store.getters.getDeleteType;
-    },
-  },
-  /**
-   * 监听器
-   */
-  watch: {
-      getDeleteType(val){
-       let flag=true;
-      this.data.matchData.forEach(e =>{
-          if(val =='all'){
-                e.oddsData.guestOdds.forEach(data=>{
-                    this.$set(data, "isTrue", false);
-                })
-                e.oddsData.homeOdds.forEach(data=>{
-                    this.$set(data, "isTrue", false);
-                })
-          
-          }else{
-            let showData =true;
-                e.oddsData.guestOdds.forEach(data=>{
-                    if(data.id == val){
-                      this.$set(data, "isTrue", false);
-                      showData =false;
-                    }
-                })
-                if(showData){
-                  e.oddsData.homeOdds.forEach(data=>{
-                      if(data.id == val){
-                        this.$set(data, "isTrue", false);
-                      }
-                  })
-                }
-    
-          }
-      })
-    },
-    //获取已投注信息
-    getBetting(val) {
-      //获取vuex玩法已投注相对应的数据
-      val.forEach(e => {
-        if ("concede_size" == e.title) {
-          this.betting = e.data;
-        }
-      });
-    }
-  },
-  mounted() {
-    //获取vuex玩法已投注相对应的数据
-    let getBetting = this.$store.getters.getBetting;
-    if (getBetting) {
-      getBetting.forEach(e => {
-        if ("concede_size" == e.title) {
-          this.betting = e.data;
-        }
-      });
-    }
-    /*-----------------------*/
-    this.getmatchInfo("");
-  }
-};
-</script>
-<style scoped>
-.Serch {
-  height: 0.75rem;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  background-color: #363636;
-  color: #fd8f26;
-  font-family: "PingFang-SC-Regular";
-  padding: 0 0.32rem;
-}
-.lock {
-  background: #f4f4f4;
-}
-.Serch-box-input {
-  width: 2rem;
-  border: none;
-  position: absolute;
-  left: 0.5rem;
-  top: 0.06rem;
-}
-/* .BettingWindow{
-  z-index: 10000;
-  position:fixed;
-  top:0;
-  width: 100%;
-} */
-
-.Serch-box-img {
-  width: 0.3rem;
-  height: 0.3rem;
-  position: absolute;
-  left: 0.1rem;
-  top: 0.06rem;
-}
-.Serch-box-del {
-  width: 0.2rem;
-  height: 0.2rem;
-  position: absolute;
-  right: 0.2rem;
-}
-.Serch-box-home {
-  height: 0.44rem;
-  width: 4.73rem;
-  background: #e4e4e4;
-  border-radius: 0.2rem;
-  display: flex;
-  justify-content: space-around;
-  align-items: center;
-  padding-left: 0.1rem;
-  padding-right: 0.1rem;
-  position: relative;
-}
-.box-img {
-  width: 0.37rem;
-  height: 0.3rem;
-  margin-right: 0.18rem;
-}
-.Soccer-game-title {
-  display: flex;
-  color: #f76649;
-  align-items: center;
-  width: 1.3rem;
-  font-size: 0.3rem;
-}
-.Soccer-game-box {
-  display: flex;
-  left: -0.3rem;
-  top: 0.2rem;
-  background: #fff;
-  background: #626262;
-  color: #a6a6a6;
-  height: 0.7rem;
-  align-items: center;
-}
-.Soccer-game-src {
-  width: 0.25rem;
-  height: 0.25rem;
-}
-.box {
-  padding: 0 0.32rem;
-  color: #e1e1df;
-  height: 0.88rem;
-  font-size: 0.32rem;
-  background: linear-gradient(to bottom, #999999, #6a6a6b);
-}
-.Match-title-num {
-  width: 0.46rem;
-  height: 0.46rem;
-  line-height: 0.46rem;
-  text-align: center;
-  background: #f76649;
-  font-size: 0.26rem;
-  border-radius: 50%;
-  color: #f5f5f5;
-}
-
-.Match-box-top-right > span {
-  width: 1.07rem;
-  text-align: center;
-}
-.Match-box {
-  height: 2.45rem;
-}
-.name-box {
-  height: 1.76rem;
-}
-.Match-box-top {
-  height: 0.45rem;
-  line-height: 0.45rem;
-  background: #dcdcdc;
-  font-size: 0.23rem;
-  padding: 0 0.32rem;
-}
-.Match-box-top-num {
-  width: 0.64rem !important;
-  height: 0.45rem;
-  background: #ebebeb;
-  font-size: 0.24rem;
-}
-.Match-box {
-  background: #f8f8f8;
-}
-.Match-bottom-right {
-  height: 2rem;
-  padding: 0.1rem 0.1rem 0 0.14rem;
-}
-.Match-list-left div {
-  width: 1.07rem;
-  height: 0.76rem;
-  border: 1px solid #e4e4e4;
-  border-radius: 0.1rem;
-  padding: 0.1rem;
-  margin: 0.06rem 0.08rem;
-}
-.Match-list-right div {
-  width: 1.07rem;
-  height: 0.76rem;
-  border: 1px solid #e4e4e4;
-  border-radius: 0.1rem;
-  margin: 0.06rem 0.08rem;
-}
-.active {
-  background: #f76649;
-  border: none;
-  color: #e1e1df !important;
-}
-</style>

二進制
vue_sports/.svn/pristine/8e/8e7d413cd9d5859e97a17e90e007590eb21511f9.svn-base


二進制
vue_sports/.svn/pristine/8f/8fc5557b63dc6a799fbc2180a1325fc1c0f9fc3c.svn-base


+ 19 - 1
vue_sports/.svn/pristine/92/92d10ef759c4afa697752a85453337b3b55ddba0.svn-base → vue_sports/.svn/pristine/9a/9a905562b6d981b78c9eb2925939232278270d97.svn-base

@@ -31,6 +31,8 @@ export default {
       participateDtl:'/Sports/MatchList/participate_details',
       //球类比赛列表
       matchDetails:'/sports/MatchList/matchDetails',
+      // 冠军接口
+      ChampionsCup:'/Sports/MatchList/getUEFAChampions',
       //球类冠军盘口
       first:'/Sports/MatchList/first',
       // 获取赛事数据
@@ -48,7 +50,23 @@ export default {
     },
     login:{
       login:'/api/Account/login',
-      reg:'/api/Account/enroll'
+      reg:'/api/Account/enroll',
+      getAgent:'/api/Account/getAgent',
+      // 盈亏接口
+      ProfitAndLossRecord:'/api/UserBuy/moneyRecord',
+      // 中奖接口
+      prizeRecord:'/api/UserBuy/prizeRecord',
+      // 转账记录
+      getdata:'/InApi-index/getdata',
+      // 充值记录
+      rechargeRecord:'/api/UserBuy/rechargeRecord',
+      // 投注记录
+      bettingRecord:'/api/UserBuy/bettingRecord'
+
+    },
+    //玩法投注
+    betOrder:{
+      Bet:'/Api/Betorder/Bet'
     }
     
   }

+ 0 - 844
vue_sports/.svn/pristine/a2/a25a9e2f1b1a1edb6d9c7d7ceaa7636a9f37ee76.svn-base

@@ -1,844 +0,0 @@
-<template>
-  <div>
-    <div class="Serch row item-center">
-      <div class="Soccer-game row item-center">
-        <div
-          style="display:flex;align-items:center;justify-content:center;"
-          class="Soccer-game-title"
-          @click="isreturn()"
-        >
-          <img class="box-img" src="../assets/st-imges/returnbox.png">
-          {{this.title}}
-        </div>
-      </div>
-      <div class="Serch-box row item-center" v-if="!championShow">
-        <div class="Serch-box-home row item-center">
-          <img class="Serch-box-img" src="../assets/st-imges/sousuo.png">
-          <input
-            v-model="SerchValue"
-            @keydown="serchchange(SerchValue)"
-            @change="serchchange(SerchValue)"
-            @input="searchTeam(SerchValue)"
-            class="Serch-box-input"
-            type="text"
-            placeholder="请输入球队名称"
-          >
-          <img
-            class="Serch-box-del"
-            @click="delinputvalue()"
-            v-if="Serchchange==true"
-            src="../assets/st-imges/del.png"
-          >
-        </div>
-      </div>
-    </div>
-    <div v-if="isShow && !championShow" class="row allAlignment box center">
-      <span>{{data.leagueName}}</span>
-      <div class="Match-title-num">
-        <span>{{data.matchNum}}</span>
-      </div>
-    </div>
-
-    <div
-      v-if="!championShow"
-      v-for=" (item,index) in data.matchData"
-      :key="index"
-      class="Match-box"
-    >
-      <div class="row allAlignment Match-box-top">
-        <div class="Match-box-top-left">
-          <span>{{item.match_date}}</span>
-          <span>{{item.match_time}}</span>
-        </div>
-        <div class="Match-box-top-right row">
-          <span style="margin-right: .15rem;" class="Match-box-top-num">{{item.tag}}</span>
-          <span style="margin-right: .15rem;">让球</span>
-          <span style="margin-right: .15rem;">大小</span>
-        </div>
-      </div>
-      <div
-        class="row allAlignment center"
-        @click="matchInfo(item.match_id);"
-        style="padding:0 .32rem"
-      >
-        <div class="column average name-box">
-          <div>{{item.home_team}}</div>
-          <div>{{item.guest_team}}</div>
-        </div>
-        <div class="Match-bottom-right">
-          <!-- 主队 -->
-          <div class="row">
-            <div
-              class="Match-list-left"
-              v-for="(items,indexs) in item.oddsData.homeOdds"
-              :key="indexs"
-              @click.stop="isBetting(items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,'homeOdds')"
-            >
-              <div :class="{ 'active' : items.isTrue == true}" class="column center">
-                <span style="color:#FD8F26">{{items.condition}}</span>
-                <span>{{items.odds}}</span>
-              </div>
-            </div>
-          </div>
-          <!-- 客队 -->
-          <div class="row">
-            <div
-              class="Match-list-right row"
-              v-for="(items,indexs) in item.oddsData.guestOdds"
-              :key="indexs"
-              @click.stop="isBetting(items.id,item.home_team,item.guest_team,item.guest_team,items.odds,items.condition,'guestOdds')"
-            >
-              <div :class="{'active':items.isTrue==true}" class="column center">
-                <span>
-                  <i style="color:#FD8F26">{{items.condition}}</i>
-                </span>
-                <span>{{items.odds}}</span>
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-    <!-- 冠军组件 -->
-   <div class="champion" v-if="championShow">
-      <div class="title">
-        <span>{{this.ChampionData.title}}</span>
-        <div class="time">
-          <span>2019年5月29日</span>
-          <span>15:00</span>
-        </div>
-      </div>
-      <div  v-for="(item,index) in ChampionData.dataList" :key="item.id">
-        <div class="chmpTit">{{item.name}}</div>
-      <div  v-for="items in ChampionData.dataList[index].data" :key="items.id">  
-        <div class="list">
-          <span class="chmName">{{items.team}}</span>
-          <span class="num">{{items.odds}}</span>
-        </div>
-      </div>
-      </div>
-    </div>
-    <div class="BettingWindow" v-show="isWindow">
-      <BettingWindow/>
-    </div>
-    <div v-if="noData">
-      <NotOpend :title="this.info"/>
-    </div>
-    <!-- <div class = "lod">
-      <Loading></Loading>
-    </div>-->
-  </div>
-</template>
-
-<script>
-import BettingWindow from "@/components/StBettingWindow";
-import NotOpend from "@/components/StNotOpend";
-import Loading from "@/components/StLoading";
-export default {
-  name: "SerchBox",
-  data() {
-    return {
-      SerchValue: "",
-      Serchchange: false,
-      title: " ", //标题
-      data: "",
-      isShow: true,
-      isAddData: false, //判断是否添加
-      game_code: this.$route.query.game_code, //球的类型别名
-      leagueID: this.$route.query.leagueID, //获取联赛id
-      isWindow: false,
-      score:'0',//比分
-      codeShow: false, // 如果是参赛表传值过来,则显示另一部分
-      info: "没有相关联赛信息",
-      noData: false, //没有数据为true
-      betting: 10000, //vuex里面玩法投注数据
-      thisNum: 10000, //vuex里面
-      championShow: false, //冠军组件显示
-      ChampionData:'',//冠军数据
-    };
-  },
-  components: {
-    BettingWindow,
-    NotOpend,
-    Loading
-  },
-  /**
-   *函数方法
-   */
-  methods: {
-
-    /*--------------------------------------------------------------------------------*/
-    // 返回上一页
-    isreturn() {
-      history.go(-1);
-    },
-
-    /*--------------------------------------------------------------------------------*/
-    // 是否显示删除按钮
-    serchchange(val) {
-      if (val.length >= 1) {
-        this.Serchchange = true;
-      } else {
-        this.Serchchange = false;
-      }
-    },
-
-    /*--------------------------------------------------------------------------------*/
-    // 查询球队
-    searchTeam(val) {
-      let getActivity = this.$store.getters.getActivity;
-      let matchDate = this.$route.query.matchDate;
-      if (val.length >= 1) {
-        this.Serchchange = true;
-      } else {
-        this.Serchchange = false;
-      }
-      if (this.$route.query.navBall) {
-        this.getMatchData(
-          this.$ports.match.matchState,
-          this.game_code,
-          "",
-          this.leagueID,
-          getActivity,
-          "",
-          matchDate,
-          val
-        );
-      } else {
-        this.getMatchData(
-          this.$ports.match.matchDetails,
-          this.game_code,
-          this.leagueID,
-          "",
-          "",
-          matchDate,
-          val
-        );
-      }
-    },
-
-    /*--------------------------------------------------------------------------------*/
-    // 清空输入
-    delinputvalue() {
-      this.SerchValue = "";
-      this.Serchchange = false;
-      let matchDate = this.$route.query.matchDate;
-      if (this.$route.query.navBall) {
-        this.getMatchData(
-          this.$ports.match.matchState,
-          this.game_code,
-          "",
-          this.leagueID,
-          this.$store.getters.getActivity,
-          "",
-          matchDate,
-          ""
-        );
-      } else {
-        this.getMatchData(
-          this.$ports.match.matchDetails,
-          this.game_code,
-          this.leagueID,
-          "",
-          "",
-          matchDate,
-          ""
-        );
-      }
-    },
-
-    /*--------------------------------------------------------------------------------*/
-    // 添加、删除vuex投注数据公共方法
-    AddDelete:function(id,home,guest,name,odds,condition){
-      let isAdd = true;
-      let bettingInfo = {
-        id,
-        home_team:home,
-        guest_team:guest,
-        name,
-        odds,
-        condition,
-        ganame:'concede_size',
-        score:this.score,
-        bettingTime:'',
-
-      }
-      let matchList = this.$store.getters.getBetting;
-      if (this.thisNum != 10000) {
-        //删除vuex投注数据
-          matchList[this.thisNum].data.forEach((res, index) => {
-            if (res.id == id) {
-              matchList[this.thisNum].data.splice(index, 1);
-              this.$store.dispatch("BETTING",matchList)
-              isAdd = false;
-            }
-          });
-          //添加vuex投注数据
-          if (isAdd) {
-            matchList[this.thisNum].data.push(bettingInfo);
-            this.$store.dispatch("BETTING",[])
-            this.$store.dispatch("BETTING",matchList)
-            if(this.$store.getters.getIsBetting) return false
-            this.$store.dispatch("ISBETTING",true)
-          }
-      } else {
-        //添加新的玩法赔率数据
-        let obj = {
-            title:'concede_size',
-            data: [bettingInfo]
-          };
-          //判断vuex有误其它玩法数据
-        if(matchList){
-          matchList.push(obj);
-        }else{
-          this.$store.dispatch("BETTING",[obj])
-        }
-      }
-      console.log(this.$store.getters.getIsBetting);
-      if(this.$store.getters.getIsBetting) return false
-      this.$store.dispatch("ISBETTING",true)
-    },
-
-    /*--------------------------------------------------------------------------------*/
-    //修改当前页面样式公共方法
-    modifyStyle:function(id,type){
-      console.log(id,type);
-      this.data.matchData.every(e => {
-        let ret = false;
-        if(type == "homeOdds"){
-          e.oddsData.homeOdds.every((res, index) => {
-            if (res.id == id) {
-                this.$set( e.oddsData.homeOdds[index],"isTrue",res.isTrue ? false : true);
-                ret = true;
-                return false;
-              }
-              return true;
-          });
-        }else if(type == "guestOdds"){
-            e.oddsData.guestOdds.every((res, index) => {
-              if (res.id == id) {
-                  this.$set( e.oddsData.guestOdds[index],"isTrue",res.isTrue ? false : true);
-                  ret = true;
-                  return false;
-                }
-                return true;
-            });
-        }
-        if (ret) {
-          return false;
-        } else {
-          return true;
-        }
-      });
-    
-    },
-    /*--------------------------------------------------------------------------------*/
-    // 修改投注样式
-    isBetting(id,home,guest,name,odds,condition,type) {
-      // console.log(id, type)
-      if (this.data) {
-        //处理vuex里面数据
-        this.AddDelete(id,home,guest,name,odds,condition);
-        //处理当前页面样式
-        this.modifyStyle(id, type);
-      }
-    },
-
-    /*--------------------------------------------------------------------------------*/
-    //跳转到赛事详情
-    matchInfo: function(id) {
-      this.$router.push({
-        path: "/StRollBallBettingPage",
-        query: { gameCode: this.game_code, home: 1 }
-      });
-      this.$store.dispatch("MACTH_ID", id);
-    },
-
-    /*--------------------------------------------------------------------------------*/
-     // url : 地址, game_code 球类 leagueID lg_id 	联赛id   type_code 状态 matchDate match_date 赛事日期 search 搜索 str_type 选项类型
-    //获取联赛比赛列表
-    getMatchData: function(
-      url,
-      game_code,
-      leagueID,
-      lg_id,
-      type_code,
-      matchDate,
-      match_date,
-      search,
-      str_type,
-      // code
-    ) {
-      //“concede_home”: 主队全场让球,“concede_guest”: 客队全场让球,“size_home”: 主队大小,“size_guest”: 客队大小
-      this.$http
-        .get(url, {
-          game_code,
-          leagueID,
-          lg_id,
-          type_code,
-          matchDate,
-          match_date,
-          search,
-          str_type,
-          // code
-        })
-        .then(res => {
-          this.codeShow = true;
-          if (res.data.status == 1 && res.data.data != null) {
-            if((this.$store.getters.getActivity == "StStringScene" && this.$route.query.strType == 2) || (this.$store.getters.getActivity == "StChampion" && this.$route.query.strType != undefined)){
-              this.ChampionData = res.data.data;
-              console.log('data',this.ChampionData);
-              // 处理冠军数据
-              let champion = {},arrays=[],title='';
-              title = Object.keys(res.data.data);
-              champion.title = title[0];
-              let val = Object.values(res.data.data)
-              let name = Object.keys(val[0]);
-              let data = Object.values(val[0]);
-              data.forEach((e,index)=>{
-                  arrays.push({   
-                    name:name[index],
-                    data:e
-                  });
-              })
-              champion.dataList = arrays;
-              this.ChampionData = champion;
-              // champion.leaguename = championKey;
-              // if()
-              // console.log('0', championKey
-
-            }else if(this.$route.query.champion != undefined){
-                console.log('冠军截断')
-            }
-            if (res.data.data.matchData && res.data.data.matchData.length < 1) {
-             
-              this.isShow = false;
-              this.noData = true;
-            } else if(res.data.data.matchData &&  res.data.data.matchData.length > 0) {
-              this.isShow = true;
-              this.noData = false;
-              this.dataGroup(res.data.data);
-              //
-            }
-          }
-        });
-    },
-
-    /*--------------------------------------------------------------------------------*/
-    // 赛事赔率玩法数据组合方法
-  
-    dataGroup: function(data) {
-      let homeOdds = [],
-        guestOdds = [];
-      let A, B, C, D;
-      data.matchData.forEach((column, index) => {
-        if (column.oddsData == null || column.oddsData.length == 0) {
-          column.oddsData = {
-            homeOdds: [{ status: -1 }, { status: -1 }],
-            guestOdds: [{ status: -1 }, { status: -1 }]
-          };
-        } else {
-          column.oddsData.forEach(val => {
-            if (this.betting != 10000) {
-              this.betting.forEach(e => {
-
-                if (val.id == e.id) {
-                  val.isTrue = true;
-                  //this.$set(val,'isTrue',true);
-                } 
-              });
-            }
-            if (val.odds_code == "concede_home") {
-              A = val;
-            } else if (val.odds_code == "size_home") {
-              B = val;
-            } else if (val.odds_code == "concede_guest") {
-              C = val;
-            } else if (val.odds_code == "size_guest") {
-              D = val;
-            }
-          });
-          column.oddsData = {};
-          column.oddsData.homeOdds = [];
-          column.oddsData.homeOdds.push(A);
-          column.oddsData.homeOdds.push(B);
-          column.oddsData.guestOdds = [];
-          column.oddsData.guestOdds.push(C);
-          column.oddsData.guestOdds.push(D);
-        }
-      });
-      this.data = data;
-      console.log(this.data);
-    }
-  },
-
-
-  /**
-   * 计算属性
-   */
-  computed: {
-    getBetting() {
-      return this.$store.getters.getBetting;
-    },
-    IsWindow() {
-      return this.$store.getters.getIsBetting;
-    },
-         //获取投注框删除的投注信息
-    getDeleteType(){
-      return this.$store.getters.getDeleteType;
-    },
-  },
-  /**
-   * 监听器
-   */
-  watch: {
-     getDeleteType(val){
-       let flag=true;
-      this.data.matchData.forEach(e =>{
-          if(val =='all'){
-                e.oddsData.guestOdds.forEach(data=>{
-                    this.$set(data, "isTrue", false);
-                })
-                e.oddsData.homeOdds.forEach(data=>{
-                    this.$set(data, "isTrue", false);
-                })
-          
-          }else{
-            let showData =true;
-                e.oddsData.guestOdds.forEach(data=>{
-                    if(data.id == val){
-                      this.$set(data, "isTrue", false);
-                      showData =false;
-                    }
-                })
-                if(showData){
-                  e.oddsData.homeOdds.forEach(data=>{
-                      if(data.id == val){
-                        this.$set(data, "isTrue", false);
-                      }
-                  })
-                }
-    
-          }
-      })
-    },
-    /*--------------------------------------------------------------------------------*/
-    //获取已投注信息
-    getBetting(val) {
-      //获取vuex玩法已投注相对应的数据
-      if (val) {
-        val.forEach((e, index) => {
-          if ("concede_size" == e.title) {
-            this.thisNum = index;
-            this.betting = e.data;
-          }
-        });
-      }
-    },
-
-    /*--------------------------------------------------------------------------------*/
-    // 监听投注框开关
-    IsWindow(val) {
-      this.isWindow = val;
-    },
-  },
-  /***
-   * 页面加载完成触发事件
-   */
-  mounted() {
-
-    //是否展示投注框
-    if(this.$store.getters.getIsBetting){
-      this.isWindow = true;
-    }
-    //获取vuex玩法已投注相对应的数据
-    let getBetting = this.$store.getters.getBetting;
-    if (getBetting) {
-      getBetting.forEach((e, index) => {
-        if ("concede_size" == e.title) {
-          this.thisNum = index;
-          this.betting = e.data;
-        }
-      });
-    }
-    let { game_code, leagueID, name } = this.$route.query;
-    this.title = name;
-    this.game_code = game_code;
-
-    if (
-       this.$route.query.navBall &&
-      this.$route.query.strType != undefined &&
-      this.$route.query.code != undefined
-    ) {
-      if (this.$store.getters.getActivity == "StChampion") {
-        this.championShow = true;
-      } else {
-        this.championShow = false;
-      }
-      this.getMatchData(
-        this.$ports.match.matchState,
-        game_code,
-        "",
-        leagueID,
-        this.$store.getters.getActivity,
-        "",
-        this.$route.query.matchDate
-      );
-    } else if (this.$route.query.strType != undefined) {
-      if (this.$store.getters.getActivity != "StChampion") {
-        if (this.$route.query.strType == 2) {
-          this.championShow = true;
-        } else {
-          this.championShow = false;
-        }
-        this.getMatchData(
-          this.$ports.match.matchState,
-          this.$store.getters.getBallId,
-          "",
-          leagueID,
-          this.$store.getters.getActivity,
-          "",
-          this.$route.query.matchDate,
-          "",
-          this.$route.query.strType
-        );
-      } else {
-        this.championShow = true;
-        this.getMatchData(
-          this.$ports.match.matchState,
-          game_code,
-          "",
-          leagueID,
-          this.$store.getters.getActivity,
-          "",
-          this.$route.query.matchDate,
-          ""
-        );
-      }
-    }
-    // 新增
-    else if(this.$route.query.champion != undefined){
-      console.log("123")
-    this.getMatchData(
-        this.$ports.match.matchState,
-        game_code,
-        // leagueID,
-        "",
-        "",
-        "StRollBall"
-      );
-    }
-    else {
-      this.getMatchData(
-        this.$ports.match.matchDetails,
-        game_code,
-        leagueID,
-        "",
-        "",
-        this.$route.query.matchDate
-      );
-    }
-
-    // if(this.$public.getCache("box_size")){
-    //   this.isWindow=true
-    // }
-  },
- 
-};
-</script>
-
-<style scoped>
-.Serch {
-  height: 0.75rem;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  background-color: #363636;
-  color: #fd8f26;
-  font-family: "PingFang-SC-Regular";
-  padding: 0 0.32rem;
-}
-.lock {
-  background: #f4f4f4;
-}
-.Serch-box-input {
-  width: 2rem;
-  border: none;
-  position: absolute;
-  left: 0.5rem;
-  top: 0.06rem;
-}
-/* .BettingWindow{
-  z-index: 10000;
-  position:fixed;
-  top:0;
-  width: 100%;
-} */
-
-.Serch-box-img {
-  width: 0.3rem;
-  height: 0.3rem;
-  position: absolute;
-  left: 0.1rem;
-  top: 0.06rem;
-}
-.Serch-box-del {
-  width: 0.2rem;
-  height: 0.2rem;
-  position: absolute;
-  right: 0.2rem;
-}
-.Serch-box-home {
-  height: 0.44rem;
-  width: 4.73rem;
-  background: #e4e4e4;
-  border-radius: 0.2rem;
-  display: flex;
-  justify-content: space-around;
-  align-items: center;
-  padding-left: 0.1rem;
-  padding-right: 0.1rem;
-  position: relative;
-}
-.box-img {
-  width: 0.37rem;
-  height: 0.3rem;
-  margin-right: 0.18rem;
-}
-.Soccer-game-title {
-  display: flex;
-  color: #f76649;
-  align-items: center;
-  width: 1.5rem;
-  height: .75rem;
-  font-size: 0.3rem;
-}
-.Soccer-game-box {
-  display: flex;
-  left: -0.3rem;
-  top: 0.2rem;
-  background: #fff;
-  background: #626262;
-  color: #a6a6a6;
-  height: 0.7rem;
-  align-items: center;
-}
-.Soccer-game-src {
-  width: 0.25rem;
-  height: 0.25rem;
-}
-.box {
-  padding: 0 0.32rem;
-  color: #e1e1df;
-  height: 0.88rem;
-  font-size: 0.32rem;
-  background: linear-gradient(to bottom, #999999, #6a6a6b);
-}
-.Match-title-num {
-  width: 0.46rem;
-  height: 0.46rem;
-  line-height: 0.46rem;
-  text-align: center;
-  background: #f76649;
-  font-size: 0.26rem;
-  border-radius: 50%;
-  color: #f5f5f5;
-}
-
-.Match-box-top-right > span {
-  width: 1.07rem;
-  text-align: center;
-}
-.Match-box {
-  height: 2.45rem;
-}
-.name-box {
-  height: 1.76rem;
-}
-.Match-box-top {
-  height: 0.45rem;
-  line-height: 0.45rem;
-  background: #dcdcdc;
-  font-size: 0.23rem;
-  padding: 0 0.32rem;
-}
-.Match-box-top-num {
-  width: 0.64rem !important;
-  height: 0.45rem;
-  background: #ebebeb;
-  font-size: 0.24rem;
-}
-.Match-box {
-  background: #f8f8f8;
-}
-.Match-bottom-right {
-  height: 2rem;
-  padding: 0.1rem 0.1rem 0 0.14rem;
-}
-.Match-list-left div {
-  width: 1.07rem;
-  height: 0.76rem;
-  border: 1px solid #e4e4e4;
-  border-radius: 0.1rem;
-  padding: 0.1rem;
-  margin: 0.06rem 0.08rem;
-}
-.Match-list-right div {
-  width: 1.07rem;
-  height: 0.76rem;
-  border: 1px solid #e4e4e4;
-  border-radius: 0.1rem;
-  margin: 0.06rem 0.08rem;
-}
-.active {
-  background: #f76649;
-  border: none;
-  color: #e1e1df !important;
-}
-/* 冠军 */
-.champion .title {
-  height: 1rem;
-  padding: 0.15rem 0.2rem;
-  background-color: #626262;
-}
-.champion .title span {
-  font-size: 0.28rem;
-  font-weight: bold;
-  color: #e1e1df;
-}
-.champion .title .time span:nth-child(2) {
-  color: #f76649;
-}
-.chmpTit {
-  height: 0.7rem;
-  line-height: 0.7rem;
-  padding: 0 0.2rem;
-  background: #e4e4e4;
-}
-.champion .list {
-  height: 1rem;
-  line-height: 0.6rem;
-  padding: 0.1rem 0.2rem;
-  width: 100%;
-  display: -webkit-box;
-  display: -ms-flexbox;
-  display: flex;
-  -webkit-box-pack: justify;
-  -ms-flex-pack: justify;
-  justify-content: space-between;
-  border-bottom: 1px solid #aaa;
-  font-size: 0.28rem;
-  background: #ffffff;
-}
-.champion .list span:nth-child(1) {
-  margin-top: 0.1rem;
-}
-.champion .list .num {
-  width: 1.07rem;
-  height: 0.76rem;
-  border: 1px solid #e4e4e4;
-  border-radius: 0.1rem;
-  padding: 0.1rem;
-  text-align: center;
-}
-</style>

+ 481 - 0
vue_sports/.svn/pristine/af/af119b63f3af006113b0c0973b44b7b420ba6c50.svn-base

@@ -0,0 +1,481 @@
+<template>
+  <div>
+    <div class="box">
+      <div class="row allAlignment center head_on_box">
+        <p
+          class="logo"
+          style="font-size:.6rem;color:#E1E1DF;font-family:  'Franklin Gothic Medium'"
+        >
+          <i style="color:#F76649;">HX</i>669
+        </p>
+        <p style="color:#fffffe;font-size:.36rem">盈亏记录</p>
+        <!-- <img class="log" src="../assets/st-imges/indexlogo.png" alt=""> -->
+        <div class="row allAlignment center">
+          <yd-button type="primary" bgcolor="rgba(0,0,0,0)" @click.native="isshow()">
+            <img class="user-ion" src="@/assets/st-imges/user.png" alt>
+          </yd-button>
+          <!-- <div v-if="nameShow" class="row allAlignment center username">
+              {{name}}
+          </div>-->
+          <img
+            style="margin-left: 0.44rem;"
+            class="user-ion"
+            src="@/assets/st-imges/contact.png"
+            alt
+          >
+        </div>
+      </div>
+    </div>
+    <div class="box row">
+      <div id="NavSlide">
+        <nav>
+          <p v-for="(item,index) in arr" @click="getdates(item.start,item.end,index)" :key="index">
+            <span :class="{active:index==active}">{{item.title}}</span>
+          </p>
+        </nav>
+      </div>
+      <div class="date row center">
+        <yd-button-group>
+          <yd-button size="large" bgcolor="rgba(0,0,0,0)" @click.native="open">
+            <img :src="img" style="width:.3rem;height:.3rem">日历
+          </yd-button>
+        </yd-button-group>
+      </div>
+    </div>
+    <div class="row classify average">
+      <div
+        v-for="(item,index) in list"
+        :class="item.id==classifynum?'classifyactive':''"
+        :key="index"
+        @click="classifyclick(index)"
+      >{{item.title}}</div>
+    </div>
+    <div
+      class="row center"
+      style="height:.88rem;color:#333;font-size:.32rem;"
+      v-if="data.status=='2001'"
+    >对不起,您当前没有登录,请前往登录</div>
+    <div>
+      <div class="datalist">
+        <div class="datalistbox row allAlignment">
+          <yd-infinitescroll :callback="loadList" ref="infinitescrollDemo">
+            <yd-list theme="1" slot="list">
+              <div v-for="(item,index) in data.list" :key="index">
+                <div
+                  v-if="item.money_type==1"
+                  :style="classifynum==0?'':'display:none'"
+                  class="datalist-box row allAlignment"
+                >
+                  <p>{{item.money_time}}</p>
+                  <p>+{{item.money}}</p>
+                </div>
+                <div
+                  v-if="item.money_type==2"
+                  :style="classifynum==1?'':'display:none'"
+                  class="datalist-box row allAlignment"
+                >
+                  <p>{{item.money_time}}</p>
+                  <p>-{{item.money}}</p>
+                </div>
+              </div>
+            </yd-list>
+
+            <!-- 数据全部加载完毕显示 -->
+            <span slot="doneTip">啦啦啦,啦啦啦,没有数据啦~~</span>
+
+            <!-- 加载中提示,不指定,将显示默认加载中图标 -->
+            <img slot="loadingTip" src="http://static.ydcss.com/uploads/ydui/loading/loading10.svg">
+          </yd-infinitescroll>
+        </div>
+      </div>
+    </div>
+    <yd-cell-group style="display:none;">
+      <yd-cell-item arrow>
+        <yd-datetime
+          type="date"
+          ref="datetime"
+          start-year="2014"
+          :end-date="endyear"
+          v-model="datetime"
+          slot="right"
+        ></yd-datetime>
+      </yd-cell-item>
+    </yd-cell-group>
+    <Login v-if="isShow"/>
+  </div>
+</template>
+<script>
+import "@/css/index.css";
+import Login from "@/pages/Login/index/StLogin";
+import register from "@/pages/Login/index/register";
+export default {
+  name: "BettingRecord",
+  data() {
+    return {
+      isShow: true,
+      img: require("@/assets/st-imges/date.png"),
+      img1: require("@/assets/st-imges/home.png"),
+      img2: require("@/assets/st-imges/gengduo-1.png"),
+      timearr: [],
+      arr: [],
+      active: 0,
+      // 是否继续请求
+      ajaxto: true,
+
+      data: "",
+      datetime: "2017-05-11",
+      //   查询开始结束时间
+      startTime: "",
+      endTime: "",
+      startyear: "",
+      endyear: "",
+      list: [{ title: "本月已盈利", id: 0 }, { title: "本月已亏损", id: 1 }],
+      classifynum: 0,
+      // 分页
+      page: 1,
+      pageSize: 15,
+      PageList: []
+    };
+  },
+  computed: {
+    Isshow: function() {
+      return this.$store.state.isShow;
+    }
+  },
+  components: {
+    Login
+  },
+  created() {
+    this.fun_date();
+    if(this.ajaxto){
+      this.loadList();
+    } 
+  },
+  methods: {
+    //   分页查询时间
+    getdates(start, end, index) {
+      this.active = index;
+      this.startTime = start;
+      this.endTime = end;
+      if(this.ajaxto){
+         this.loadList();
+      }
+    },
+    loadList(ispage) {
+      let date = new Date(),
+        date2 = new Date(date);
+      this.startTime = `${date2.getFullYear()}-${
+        date2.getMonth() + 1 < 10
+          ? "0" + (date2.getMonth() + 1)
+          : date2.getMonth() + 1
+      }-${
+        date2.getDate() - 7 < 10
+          ? "0" + date2.getDate() - 7
+          : date2.getDate() - 7
+      } 00:00:00`;
+      this.endTime = `${date2.getFullYear()}-${
+        date2.getMonth() + 1 < 10
+          ? "0" + (date2.getMonth() + 1)
+          : date2.getMonth() + 1
+      }-${
+        date2.getDate() - 7 < 10
+          ? "0" + date2.getDate() - 7
+          : date2.getDate() - 7
+      } ${date2.getHours() < 10 ? "0" + date2.getHours() : date2.getHours()}:${
+        date2.getMinutes() < 10 ? "0" + date2.getMinutes() : date2.getMinutes()
+      }:${
+        date2.getSeconds() < 10 ? "0" + date2.getSeconds() : date2.getSeconds()
+      }`;
+      this.$http
+        .post(this.$ports.login.ProfitAndLossRecord, {
+          currentPage: this.page,
+          pageSize: this.pageSize,
+          token: "Ym0dZz15559259655cbd8bcdbd7ef" //localStorage.getItem("token")
+        })
+        .then(res => {
+          if (res) {
+            this.data = res.data.data;
+            console.log(res.data.data)
+            if(res.data.data.list.length<this.pageSize){
+                this.ajaxto=false
+            }
+          }
+
+          /* 单次请求数据完毕 */
+          this.$refs.infinitescrollDemo.$emit("ydui.infinitescroll.finishLoad");
+          //   判断是否需要页码加一
+          if (ispage) {
+            this.page++;
+          }
+        });
+    },
+    classifyclick(i) {
+      this.classifynum = i;
+    },
+    open() {
+      this.$refs.datetime.open();
+    },
+    isshow() {
+      let isShow = true;
+      this.$store.dispatch("GET_ISSHOW", isShow);
+    },
+    //设置一周赛事
+    fun_date: function() {
+      let date = new Date();
+      this.endyear = this.endyear + date.getFullYear() + "/";
+      this.endyear =
+        this.endyear +
+        (date.getMonth() < 10
+          ? "0" + (date.getMonth() + 1)
+          : date.getMonth() + 1) +
+        "/";
+      this.endyear =
+        this.endyear +
+        (date.getDate() < 10 ? "0" + date.getDate() : date.getDate());
+      let date2 = new Date(date);
+      let newday = new Date();
+      let endmonth = newday.getMonth() + 1;
+      newday.setDate(0);
+      let daynum = newday.getDate();
+      let num = 0,
+        org,
+        str;
+      for (let i = daynum; i >= 1; i--) {
+        date2.setDate(date2.getDate() - 1);
+        org = date2.getDay();
+        switch (org) {
+          case 0:
+            str = "星期日";
+            break;
+          case 1:
+            str = "星期一";
+            break;
+          case 2:
+            str = "星期二";
+            break;
+          case 3:
+            str = "星期三";
+            break;
+          case 4:
+            str = "星期四";
+            break;
+          case 5:
+            str = "星期五";
+            break;
+          case 6:
+            str = "星期六";
+            break;
+        }
+        let years = date2.getFullYear();
+
+        let month =
+          date2.getMonth() + 1 < 10
+            ? "0" + (date2.getMonth() + 1)
+            : date2.getMonth() + 1;
+        let day =
+          date2.getDate() < 10 ? "0" + date2.getDate() : date2.getDate();
+        let time2 = {};
+        time2.id = num;
+        if (i == daynum) {
+          time2.title = month + "-" + day + "今天";
+          time2.start = `${date.getFullYear()}-${month}-${day} 00:00:00`;
+          time2.end = `${date.getFullYear()}-${month}-${day} ${
+            date2.getHours() < 10 ? "0" + date2.getHours() : date2.getHours()
+          }:${
+            date2.getMinutes() < 10
+              ? "0" + date2.getMinutes()
+              : date2.getMinutes()
+          }:${
+            date2.getSeconds() < 10
+              ? "0" + date2.getSeconds()
+              : date2.getSeconds()
+          }`;
+        } else if (i == daynum - 1) {
+          time2.title = month + "-" + day + "昨天";
+          time2.start = `${date2.getFullYear()}-${month}-${day} 00:00:00`;
+          time2.end = `${date2.getFullYear()}-${month}-${day} 23:59:59`;
+        } else if (i == daynum - 2) {
+          time2.title = month + "-" + day + "前天";
+          time2.start = `${date2.getFullYear()}-${month}-${day} 00:00:00`;
+          time2.end = `${date2.getFullYear()}-${month}-${day} 23:59:59`;
+        } else {
+          time2.title = month + "-" + day + str;
+          time2.start = `${date2.getFullYear()}-${month}-${day} 00:00:00`;
+          time2.end = `${date2.getFullYear()}-${month}-${day} 23:59:59`;
+        }
+        this.arr.push(time2);
+        num++;
+      }
+    }
+  },
+  watch: {
+    Isshow(val) {
+      this.isShow = val;
+    }
+  },
+  mounted() {}
+};
+</script>
+<style  scoped>
+.datalist-box p {
+  height: 0.88rem;
+  display: flex;
+  align-items: center;
+}
+.datalistbox div {
+  width: 100%;
+}
+.datalist-box {
+  width: 100%;
+  height: 0.88rem;
+}
+.paging {
+  width: 100%;
+  height: 0.88rem;
+  position: absolute;
+  bottom: 0;
+}
+.paging p {
+  width: 0.6rem;
+  height: 0.6rem;
+  margin-left: 0.05rem;
+  border-radius: 0.08rem;
+  background: #ccc;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  color: #363636;
+}
+.paging p input {
+  width: 0.6rem;
+  height: 0.6rem;
+  background: #ebebeb;
+  border: 2px solid #ccc;
+  border-radius: 0.08rem;
+}
+.paging p button {
+  width: 0.6rem;
+  height: 0.6rem;
+  border: none;
+  background: #555;
+  color: #efefef;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  border-radius: 0.08rem;
+}
+.paging p button:active {
+  background: rgb(126, 125, 125);
+  color: #ccc;
+}
+.datalistbox {
+  margin-top: 0.3rem;
+  background: #efefef;
+  padding: 0.2rem 0.3rem;
+  font-size: 0.28rem;
+  color: #555555;
+  line-height: 0.4rem;
+}
+.datalist {
+  position: relative;
+}
+.datalistlet {
+  background-color: #cccccc;
+}
+.datalist .active {
+  background: #f76649 !important;
+  color: #efefef !important;
+}
+.msg {
+  height: 0.88rem;
+  margin-top: 0.3rem;
+  color: #ccc;
+  background: #333;
+}
+.classifyactive {
+  color: #f76649;
+
+  border-bottom: 2px solid #f76649;
+}
+.classify {
+  height: 0.88rem;
+  font-size: 0.3rem;
+  line-height: 0.66rem;
+  font-weight: normal;
+  color: #777777;
+  background-color: #efefef;
+  padding: 0.1rem 0;
+}
+.active {
+  color: rgb(247, 102, 73) !important;
+}
+.box {
+  background: #ebebeb;
+  padding-left: 0.14rem;
+}
+.date {
+  width: 20%;
+  background: #ccc;
+  height: 0.88rem;
+}
+#NavSlide {
+  width: 100%;
+  overflow: hidden;
+}
+#NavSlide nav {
+  padding-top: 0.1rem;
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: middle;
+  -ms-flex-align: middle;
+  align-items: middle;
+  overflow: auto;
+}
+div /deep/ .yd-datetime-content,
+div /deep/ .yd-datetime-shade,
+div /deep/ .yd-datetime-indicator {
+  height: 2rem !important;
+}
+div /deep/ .yd-button {
+  padding: 0;
+  width: 100%;
+  height: 100%;
+}
+div /deep/ .yd-button button {
+  margin: 0;
+  border-radius: 0;
+}
+#NavSlide p {
+  text-align: center;
+  font-size: 0.28rem;
+  -ms-flex-negative: 0;
+  flex-shrink: 0;
+  padding: 0 0.1rem;
+  color: #b8b8b8;
+}
+/* #NavSlide p a{
+	color: #E5E5E5;
+	text-decoration: none;
+} */
+#NavSlide p span.active {
+  color: #363636;
+}
+
+.head_on_box {
+  padding: 0 0.32rem;
+}
+.box {
+  height: 0.88rem;
+  background: linear-gradient(to bottom, #999999, #6a6a6b);
+  overflow: hidden;
+}
+.user-ion {
+  width: 0.3rem;
+  height: 0.3rem;
+}
+#NavSlide p {
+  width: 1.1rem;
+}
+</style>
+

+ 0 - 471
vue_sports/.svn/pristine/b2/b29db425aca1ea54d41aba1397c46834edb0e224.svn-base

@@ -1,471 +0,0 @@
-<template>
-	<div>
-		<div class="Serch">
-			<div class="Soccer-game row center" >
-				<div class="Soccer-game-title row center" ><img class="returnimg" :src="img.searchreturn" @click="isreturn()"/>{{Regulations.title}}</div>
-				<div class="row center"  style="height:0.88rem;margin-left:0.1rem;padding:0 0.1rem;"  @click="IsSoccerGameClick(isSoccerGameClick)">
-					<img :class="isSoccerGameClick==true?'Soccer-game-src act':'Soccer-game-src return'" :src="img.Soccerimg1"  />
-				</div>
-			</div>
-			<div class="Serch-box">
-				<div class="Serch-box-home">
-					<img class="Serch-box-img" :src="img.Serchimg" />
-					<input v-model="SerchValue"  @input="serchchange(SerchValue)" class="Serch-box-input" type="text" placeholder="请输入联赛名称" />
-					<img class="Serch-box-del" @click="delinputvalue()" v-if="Serchchange==true" :src="img.Serchdel" />
-				</div>
-			</div>
-		</div>
-		<div class="Soccer-game-box row" v-if="isSoccerGameClick==true">
-				<p @click="listActive(i.id)" v-for="(i,index) in Regulations.list" :class="listnum==i.id?'active':''">
-				{{i.name}}
-				</p>
-		</div>
-		<div v-if="this.$route.query.id =='zq'&&  this.isTrue == true " class="box">
-			<div id="NavSlide">
-				<nav>
-					<p v-for="(item,$index) in arr" @click="toggle($index,item.id)">
-						<span :class="{active:$index==active}">{{item.title}}</span>
-					</p>
-				</nav>
-			</div>
-		</div>
-		<div class="match" v-if="entryShow">
-			<yd-accordion  accordion >
-			<div class="matchBox"  v-for="items in data" :key = "items.id">
-				<yd-accordion-item :title= items.region open>
-					<div class="list">
-						<div v-for="item in items.league_count" :key="item.lg_id" @click="goMatchInfo(item.lg_id )">
-							<span>{{item.league}}</span>
-							<span class="num">{{item.count}}</span>
-						</div>
-					</div>
-				</yd-accordion-item>
-			</div>
-			</yd-accordion>
-		</div>
-		<div v-if="noData">
-			<NotOpend :title="this.info"/>
-		</div>
-		<!-- 参赛表 -->
-		<div v-if="!entryShow" class="entry">
-			<div class="list" v-for="item in entryList.info" :key="item.id"  @click="goMatchInfo(item.lg_id,item.code )">
-				<span>{{item.name}}</span>
-				<span class="num">{{item.count}}</span>
-			</div>
-		</div>
-
-  </div>
-</template>
-
-<script>
-	import NotOpend from '@/components/StNotOpend';
-	import '../css/index.css'
-	export default {
-		data() {
-			return {
-				SerchValue:"",
-				data:'',//联赛列表
-				ballId:'',//球类别名
-				noData:false,//没有数据为true
-				datetimeNum:'',//赛事时间
-				active:0,
-				listnum:2,//赛事类型
-				isTrue:true,//显示日期
-				Serchchange:false,
-				info:'没有相关联赛信息',
-				isSoccerGameClick:true,
-				entryShow:false,//显示参赛表
-				entryList:'', // 参赛表数据
-				img:{
-					Soccerimg1:require("../assets/st-imges/soccer1.png"),
-					Soccerimg2:require("../assets/st-imges/soccer1.png"),
-					Serchimg:require("../assets/st-imges/sousuo.png"),
-					Serchdel:require("../assets/st-imges/del.png"),
-					searchreturn:require("../assets/st-imges/returnbox.png")
-				},
-				Regulations:{
-					title:" ",
-					list:[{id:1,name:"参赛表"},{id:2,name:"赛事"},{id:3,name:"冠军盘口"}]
-				},
-				active:0,
-        arr:[{id:'',title:'所有赛事'},{id:'today',title:"今日赛事"}]
-			}
-		},
-		components:{
-			NotOpend
-		},
-		created(){
-			this.fun_date();
-		},
-		methods: {
-			//设置一周赛事
-			fun_date:function(){
-				let date = new Date();
-				let date2 = new Date(date);
-				for(let i=1 ;i<7 ;i++){
-					date2.setDate(date.getDate()+i);
-					let years=date2.getFullYear();
-					let month = (date2.getMonth()+1) < 10 ? '0'+(date2.getMonth()+1):(date2.getMonth()+1)
-					let day = date2.getDate() < 10 ? '0'+date2.getDate() :date2.getDate();
-					let time2 ={};
-					time2.id = years+"-"+month+"-"+day;
-					time2.title = years+"-"+month+"-"+day;
-					this.arr.push(time2)
-					if(i == 6){
-						this.arr.push({id:'morning',title:'早盘'})
-					}
-				}
-			},
-			//获取数据信息
-			//game_code=球类型、search=联赛搜索关键字、datetime=日期搜索、event_type=赛事类型
-
-			getAjaxInfo:function(url,typeGame,gameType,game_code,search,datetime,event_type){
-				
-				this.$http.get(url,{typeGame,gameType,search,datetime,event_type}).then(res =>{
-				this.$store.dispatch('GETSHOW',false);
-            if(res.status == 200 && res.data.data !=[] && res.data.data != null){
-							console.log('数据',res.data)
-								if(this.listnum == 1){
-									this.entryList = res.data.data;
-									console.log('entry',this.entryList)
-								}
-              this.Regulations.title = res.data.data.type;
-						if(res.data.data.info.length > 0){
-							this.data =  res.data.data.info
-						}else{
-							this.data = '';
-							this.noData = true;
-						}
-						// this.$store.dispatch('GET_BALL_DATA',res.data);//将活动类别存入vuex里面
-					 }
-        })
-			},
-			//获取冠军盘口数据
-			getChampion:function(game_code,type_code,search){
-					this.$store.dispatch('GETSHOW',true);
-				this.$http.get(this.$ports.match.matchState,{type_code:'StChampion',game_code,search}).then(res =>{
-					console.log('res',res)
-					if(res.data.status == 1 && res.data.data.length > 0 && res.data.data != null){
-							this.data =  res.data.data;
-							console.log('res', res)
-							this.$store.dispatch('GETSHOW',false);
-					}else{
-						
-					}
-						
-				})
-			},
-			//显示隐藏赛事类型
-			IsSoccerGameClick(isclick){
-				this.isSoccerGameClick = !isclick;	
-			},
-			//获取input输入的值查询数据
-			serchchange(val){
-				if(val.length>=1){
-					this.Serchchange=true				
-				}else{
-					this.Serchchange=false
-				}
-				if(this.listnum ==2){
-					this.getAjaxInfo(this.$ports.match.matchData,'',this.$route.query.id,this.$route.query.id,val,this.datetimeNum,this.listnum);
-				}else if(this.listnum == 3){
-					this.getChampion(this.$route.query.id,val)
-				}
-			},
-			//删除搜索框数据
-			delinputvalue(){
-				this.SerchValue="";
-				this.Serchchange=false
-				if(this.listnum == 2){
-					this.getAjaxInfo(this.$ports.match.matchData,'',this.$route.query.id,this.$route.query.id,'',this.datetimeNum,this.listnum);
-				}else if(this.listnum == 3){
-					this.getChampion(this.$route.query.id)
-				}
-			},
-			//切换赛事类型	
-			listActive(id){
-				if(this.listnum == id) return false;
-				this.SerchValue = '';
-				this.listnum = id
-				
-				if(id ==2){
-					this.isTrue = true;
-					this.entryShow = true;
-					this.getAjaxInfo(this.$ports.match.matchData,'',this.$route.query.id,this.$route.query.id,'',this.datetimeNum,id);
-				}else{
-					this.isTrue = false
-					if(id == 3){
-						this.entryShow = true;
-						this.getChampion(this.$route.query.id)
-					}else if(id == 1){
-						this.entryShow = false;
-						this.getAjaxInfo(this.$ports.match.participate,this.$route.query.id);
-					}
-				}
-			},
-			//切换日期时间
-			toggle:function(index,id){
-				this.active=index;
-				this.datetimeNum = id;
-				console.log('id',this.datetimeNum)
-				this.SerchValue = '';
-				this.getAjaxInfo(this.$ports.match.matchData,'',this.$route.query.id,this.$route.query.id,'',id,this.listnum);
-			},
-			//打开联赛投注页面
-			goMatchInfo:function(sessionId,code){
-				console.log('code',code)
-				if(this.listnum == 3){
-
-					this.$router.push({path: 'StLeagueList', query:{ game_code:this.ballId,leagueID:sessionId,name:this.Regulations.title,matchDate:this.datetimeNum,code:code,champion:3}});
-				}else{
-							this.$router.push({path: 'StLeagueList', query:{ game_code:this.ballId,leagueID:sessionId,name:this.Regulations.title,matchDate:this.datetimeNum,code:code}});
-				}
-			},
-			// 返回上一层页面
-			isreturn(){
-				history.go(-1)
-			}
-		},
-		mounted() {
-			//分球的类型获取默认数据
-			this.ballId = this.$route.query.id;
-			//console.log(this.$route.query.id);
-			this.$store.dispatch('GETSHOW',true);
-			this.getAjaxInfo(this.$ports.match.matchData,'',this.$route.query.id,this.$store.getters.getBallId);
-			if(this.listnum == 2){
-				this.entryShow = true;
-			}
-		}
-	}
-</script>
-
-<style scoped>
-.act{
-	transform: rotate(180deg);
-	transition:.2s;
-}
-.return{
-	transform: rotate(0deg);
-	transition:.2s;
-}
-		.Serch{
-		height: 0.88rem;
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		background:linear-gradient(to bottom,#6a6a6a,#565656);
-		color: #F76649;
-		font-family: 'PingFang-SC-Regular';
-		padding: 0 0.33rem;
-	
-	}
-	.returnimg{
-		width: .37rem;
-		height: .3rem;
-		margin-right: .1rem;
-	}
-	.Serch-box{
-		display: flex;
-		align-items: center;
-	}
-	.Serch-box-input{
-		width: 3.8rem;
-		border: none;
-		position: absolute;
-		height: 0.44rem;
-		line-height: 0.44rem;
-		left: 0.5rem;
-		color: #aaa;
-	}
-	.Serch-box-img{
-		width: 0.3rem;
-		height: 0.3rem;
-		position: absolute;
-		left: 0.1rem;
-		top:.06rem;
-	}
-	.Serch-box-del{
-		width: 0.2rem;
-		height: 0.2rem;
-		position: absolute;
-		right: 0.2rem;
-	}
-	.Serch-box-home{
-		height: 0.45rem;
-		line-height: 0.45rem;
-		width: 4.73rem;
-		background: #e4e4e4;
-		border-radius: 0.2rem;
-		display: flex;
-		justify-content: space-around;
-		align-items: center;
-		padding-left: 0.1rem;
-		padding-right: 0.1rem;
-		position: relative;
-	}
-	.Soccer-game-title{
-		height: 0.88rem;
-		font-size: 0.3rem;
-
-	}
-	.Soccer-game-box{
-		height: 0.88rem;
-		/* padding: 0 0.32rem; */
-    	background-color:#626262;
-	}
-	.Soccer-game-box>p{
-		margin: 0.3rem;
-		color: #A6A6A6;
-	}
-	.Soccer-game-box p.active{
-		color:#F76649;
-	}
-	.Soccer-game-src{
-		width: 0.25rem;
-		height: 0.15rem;
-		/* margin-left: .3rem */
-	}
-	.box{
-		background:#EBEBEB;
-		padding:0  0.14rem;
-	}
-#NavSlide{
-    width:100% ;
-    overflow:hidden;
-}
-#NavSlide nav{
-    display: -webkit-box;
-    display: -ms-flexbox;
-    display: flex;
-    -webkit-box-align: middle;
-    -ms-flex-align: middle;
-    align-items: middle;
-    overflow: auto;
- 
-}
-#NavSlide p{
-    text-align: center;
-    font-size: 0.28rem;
-    -ms-flex-negative: 0;
-    flex-shrink: 0;
-    padding:0 0.1rem;
-    margin:0 0.05rem;
-    color: #B8B8B8;
-    height: 0.88rem;
-    line-height: 0.88rem;
-
-}
-/* #NavSlide p a{
-	color: #E5E5E5;
-	text-decoration: none;
-} */
-#NavSlide p span.active{
- 	color:#363636;
-}
-
-.yd-cell-box .yd-cell {
-  z-index: 99;
-  border-radius: 0.2rem;
-}
-.matchBox {
-	margin-bottom: .12rem;
-  background: #F9F9F9;
-  padding: 0.27rem 0.34rem 0 0.32rem;
-}
-div /deep/ .yd-accordion-head{
-		padding: 0 .13rem 0 0;
-}
-div /deep/ .yd-accordion-content:after{
-	height: 0;
-}
-.match .tit {
-  display: flex;
-  justify-content: space-between;
-  font-size: 0.32rem;
-  margin-bottom: 0.3rem;
-}
-.match .list {
-  overflow: hidden;
-  transition: all 0.3s cubic-bezier(0.4, 0.6, 0.2, 1);
-}
-.match .list div {
-  background: #dcdcdc;
-  width: 100%;
-  height: 0.88rem;
-  padding: 0.26rem 0.56rem 0.3rem .3rem;
-  display: flex;
-	align-items: center;
-  justify-content: space-between;
-  border-radius: 0.08rem;
-  margin-bottom: 0.12rem;
-}
-div /deep/ .yd-accordion-head:after{
-	height: 0;
-}
-.match .list span {
-  color: #333333;
-  font-size: 0.28rem;
-}
-.match .list .num {
-  width: 0.4rem;
-  height: 0.4rem;
-  display: inline-block;
-  line-height: 0.4rem;
-  text-align: center;
-  color: #f5f5f5;
-  border-radius: 50%;
-  font-size: 0.2rem;
-  background: #F76649;
-}
-.yd-accordion {
-  background:transparent;
-}
-.match .list div:nth-last-child(1) {
-  margin-bottom: 0.34rem;
-}
-div /deep/ .yd-accordion-head,
-div /deep/ .yd-accordion-head-content,
-div /deep/ .yd-accordion-title,
-div /deep/ .yd-accordion-title-full {
-  height: 0.3rem;
-}
-div /deep/ .yd-accordion-title {
-  min-height: 0;
-}
-div /deep/ .yd-accordion-head {
-  margin-bottom: 0.3rem;
-}
-div /deep/ .yd-accordion-head-arrow:after{
-		border:none;
-		width: 0.4rem;
-		height: 0.4rem;
-		background: url("../assets/st-imges/xiangxia.png") no-repeat;
-		background-size: 0.4rem 0.4rem;
-	}
-	/* 参赛表 */
-.entry .list{
-	height: 1rem;
-	line-height: 0.6rem;
-	padding: 0.2rem;
-	width: 100%;
-	display: flex;
-	background: #a0a0a0;
-	color: #fefefe;
-	justify-content: space-between;
-	border-bottom: 1px solid #aaa;
-	font-size: 0.28rem;
-}
-.entry .list .num{
-	margin-top: 0.1rem;
-	  width: 0.4rem;
-  height: 0.4rem;
-  display: inline-block;
-  line-height: 0.4rem;
-  text-align: center;
-  color: #f5f5f5;
-  border-radius: 50%;
-  font-size: 0.2rem;
-  background: #F76649;
-}
-
-</style>

二進制
vue_sports/.svn/pristine/b6/b66cd93d13630da74f82488b7b96e8efb2c2f17e.svn-base


+ 14 - 0
vue_sports/.svn/pristine/57/5785bc9c63958ab580b07e3cfbb7f009883374b6.svn-base → vue_sports/.svn/pristine/b7/b7386e8f770eed2a4dd01d5ba11029c5e1389e74.svn-base

@@ -16,6 +16,7 @@ const state={
     betting:JSON.parse(publicFun.getCache('betting')),//投注数据
     isBetting:publicFun.getCache('isBetting'),//是否展示投注窗口
     deleteType:'',//投注框数据删除id或类型
+    token:'',
 }
 
 /**
@@ -34,6 +35,9 @@ const getters={
     getShow(state){
         return  state.show;
     },
+    getIsShow(state){
+        return  state.isShow;
+    },
     getRgShow(state){
         return state.rgShow;
     },
@@ -48,6 +52,9 @@ const getters={
     },
     getDeleteType(state){
         return state.deleteType;
+    },
+    getToken(state){
+        return state.token;
     }
 
 }
@@ -88,6 +95,10 @@ const mutations = {
         state.isBetting = val;
         publicFun.setCache('isBetting',val);
     },
+    newToken(state,val){
+        state.token = val;
+        // publicFun.setItem('token',val);
+    },
     newDeleteType(state,val){
         state.deleteType = val;
     },
@@ -125,6 +136,9 @@ const actions={
     },
     DEL_TYPE(context,val){
         context.commit('newDeleteType',val)
+    },
+    SET_TOKEN(context,val){
+        context.commit('newToken',val)
     }
 }
 const store =new Vuex.Store({

+ 16 - 10
vue_sports/.svn/pristine/af/af75c5a7774c5ad7e08ac622960c29d2b45f76bb.svn-base → vue_sports/.svn/pristine/b8/b81728a99059658e8b173d0c540ba5982a921577.svn-base

@@ -10,8 +10,8 @@
               v-if="item.odds_code =='two_sides_single'"
               class="left_box row allAlignment"
             >
-              <div>{{item.condition == 'single'? '单':'双'}}</div>
-              <div class="ratio" :class="item.isTrue ==true ? 'col':''" @click="toggle(item.id,item.condition == 'single'? '单':'双',item.odds)">
+              <div>{{item.condition}}</div>
+              <div class="ratio" :class="item.isTrue ==true ? 'col':''" @click="toggle(item.id,item.condition,item.odds,item.odds_onlys,item.p_code,match_id)">
                 <span>{{item.odds}}</span>
               </div>
             </div>
@@ -21,8 +21,8 @@
               v-if="item.odds_code =='two_sides_double' "
               class="right_box row allAlignment"
             >
-              <div>{{item.condition == 'single'? '单':'双'}}</div>
-              <div class="ratio" :class="item.isTrue  ==true ? 'col':''" @click="toggle(item.id,item.condition == 'single'? '单':'双',item.odds)">
+              <div>{{item.condition}}</div>
+              <div class="ratio" :class="item.isTrue  ==true ? 'col':''" @click="toggle(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id)">
                 <span>{{item.odds}}</span>
               </div>
             </div>
@@ -38,8 +38,8 @@
               v-if="item.odds_code =='half_two_sides_single'"
               class="left_box row allAlignment"
             >
-              <div>{{item.condition == 'single'? '单':'双'}}</div>
-              <div class="ratio" :class="item.isTrue ==true ? 'col':''" @click="toggle(item.id,item.condition == 'single'? '单':'双',item.odds)">
+              <div>{{item.condition}}</div>
+              <div class="ratio" :class="item.isTrue ==true ? 'col':''" @click="toggle(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id)">
                 <span>{{item.odds}}</span>
               </div>
             </div>
@@ -49,8 +49,8 @@
               v-if="item.odds_code =='half_two_sides_double' "
               class="right_box row allAlignment"
             >
-              <div>{{item.condition == 'single'? '单':'双'}}</div>
-              <div class="ratio" :class="item.isTrue  ==true ? 'col':''" @click="toggle(item.id,item.condition == 'single'? '单':'双',item.odds)">
+              <div>{{item.condition}}</div>
+              <div class="ratio" :class="item.isTrue  ==true ? 'col':''" @click="toggle(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id)">
                 <span>{{item.odds}}</span>
               </div>
             </div>
@@ -71,6 +71,7 @@ export default {
       isDisplay: false,
       home_team:'',
       guest_team:'',
+      match_id:'',
       score:'0',
       data: [], //
       betting: [], //已投注倍率id集合
@@ -79,7 +80,8 @@ export default {
   },
   methods: {
     //玩法投注
-    toggle(id,name,odds) {
+    toggle(id,name,odds,odds_only,p_code,match_id) {
+      console.log(this.data)
       let _this = this;
        let bettingInfo = {
         id,
@@ -87,11 +89,14 @@ export default {
         guest_team:this.guest_team,
         name,
         odds,
+         ballId:this.$store.getters.getBallId,
         // condition,
         ganame:this.title,
         score:this.score,
         bettingTime:'',
-
+        odds_only,
+        p_code,
+        match_id
       }
       //调用玩法投注公共方法
       this.$public.bettingFunction(this.betting,bettingInfo,this.data,this.$store.getters.getBetting,this.title,this.dataNum,function(res,type){
@@ -131,6 +136,7 @@ export default {
   watch: {
     //监听vuex里面数据
     getUserIcons(val) {
+      this.match_id=val.match_id
       if (!val) return false;
       this.home_team = val.home_team;
       this.guest_team = val.guest_team;

+ 16 - 9
vue_sports/.svn/pristine/00/007e49299f4898b1d5f707283c2867dca04d0ad2.svn-base → vue_sports/.svn/pristine/bc/bcb942409e1122cbee4a93c85ea5cdfe899ff0b3.svn-base

@@ -8,7 +8,7 @@
               <div style="padding:0 0.32rem;" class="odds">
                 <div class="row allAlignment center small">
                   <span>{{item.odds_code =='concede_home' ? home_team :guest_team}}</span>
-                  <div class="ratio column center" @click="bettingBtn(item.id,item.condition,item.odds)" :class="item.isTrue ? 'col':''">
+                  <div class="ratio column center" @click="bettingBtn(item.id,item.odds_code =='concede_home' ? home_team :guest_team,item.odds,item.odds_only,item.p_code,match_id,item.condition)" :class="item.isTrue ? 'col':''">
                     <span class="score">{{item.condition}}</span>
                     <span>{{item.odds}}</span>
                   </div>
@@ -27,7 +27,7 @@
               <div style="padding:0 0.32rem;" class="odds">
                 <div class="row allAlignment center small">
                   <span>{{item.odds_code =='half_concede_home' ? home_team :guest_team}}</span>
-                  <div class="ratio column center" @click="bettingBtn(item.id,item.condition,item.odds)" :class="item.isTrue ? 'col':''">
+                  <div class="ratio column center" @click="bettingBtn(item.id,item.odds_code =='half_concede_home' ? home_team :guest_team,item.odds,item.odds_only,item.p_code,match_id,item.condition)" :class="item.isTrue ? 'col':''">
                     <span class="score">{{item.condition}}</span>
                     <span>{{item.odds}}</span>
                   </div>
@@ -54,7 +54,7 @@
                       <div
                         class="ratio column center"
                         :class="item.isTrue ? 'col':''"
-                        @click="bettingBtn(item.id,item.condition,item.odds)"
+                        @click="bettingBtn(item.id,'大',item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                       >
                         <span class="score">{{item.condition}}</span>
                         <span>{{item.odds}}</span>
@@ -71,7 +71,7 @@
                       <div
                         class="ratio column center"
                         :class="item.isTrue? 'col':''"
-                        @click="bettingBtn(item.id,item.condition,item.odds)"
+                        @click="bettingBtn(item.id,'小',item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                       >
                         <span class="score">{{item.condition}}</span>
                         <span>{{item.odds}}</span>
@@ -100,7 +100,7 @@
                       <div
                         class="ratio column center"
                         :class="item.isTrue ? 'col':''"
-                        @click="bettingBtn(item.id,item.condition,item.odds)"
+                        @click="bettingBtn(item.id,'大',item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                       >
                         <span class="score">{{item.condition}}</span>
                         <span>{{item.odds}}</span>
@@ -118,7 +118,7 @@
                       <div
                         class="ratio column center"
                         :class="item.isTrue? 'col':''"
-                        @click="bettingBtn(item.id,item.condition,item.odds)"
+                        @click="bettingBtn(item.id,'小',item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                       >
                         <span class="score">{{item.condition}}</span>
                         <span>{{item.odds}}</span>
@@ -149,13 +149,15 @@ export default {
       home_team: "",
       guest_team: "",
       data: [],
+      match_id:'',
       betting: [], //已投注倍率id集合
       dataNum: 10000 //对应的数据的下标
     };
   },
   methods: {
     //玩法投注
-    bettingBtn(id,name,odds,condition='',bettingTime='') {
+    bettingBtn(id,name,odds,odds_only,p_code,match_id,condition='',bettingTime='') {
+      console.log('大哥',this.data)
       // // 投注页面显示
       //    if(this.$store.getters.newIsBetting==true){
       //     return false
@@ -168,11 +170,14 @@ export default {
         guest_team:this.guest_team,
         name,
         odds,
+        p_code,
+        ballId:this.$store.getters.getBallId,
+        match_id,
         condition,
         ganame:this.title,
         score:this.score,
         bettingTime,
-
+        odds_only,
       }
       //调用玩法投注公共方法
       this.$public.bettingFunction(
@@ -227,7 +232,9 @@ export default {
    */
   watch: {
     getUserIcons(val) {
-      //console.log("更新数据", val);
+      this.match_id=val.match_id;
+      console.log("更新数据", val);
+      console.log(this.match_id)
       if (!val) return false;
       this.home_team = val.home_team;
       this.guest_team = val.guest_team;

+ 79 - 12
vue_sports/.svn/pristine/89/89ba63b30039079b9fa12164a546d58ad0cbadf9.svn-base → vue_sports/.svn/pristine/be/be0b04b52e309253a3a2ac1db57ee8e8ef52fd37.svn-base

@@ -1,6 +1,7 @@
 <template>
   <div>
-    <div class="Serch" v-if="headShow">
+    <div class="Serch">
+    <!-- <div class="Serch" v-if="headShow"> -->
       <div class="Soccer-game row center">
         <div class="Soccer-game-title row center" @click="isreturn()">
           <img class="returnimg" :src="img.searchreturn">
@@ -97,7 +98,8 @@
 import NotOpend from "@/components/StNotOpend";
 import "../css/index.css";
 export default {
-  props: ["name", "headShow"],
+  props: ["name"],
+  // props: ["name", "headShow"],
   data() {
     return {
       isShow: true, //如果为串场则把导航显示出来,否则不显示
@@ -136,7 +138,8 @@ export default {
         ]
       },
       active: 0,
-      arr: [] //时间条
+      arr: [], //时间条
+      timers: true
     };
   },
   components: {
@@ -161,7 +164,7 @@ export default {
         time2.title = years + "-" + month + "-" + day;
         this.arr.push(time2);
         if (i == 6) {
-          this.arr.push({ id: "morning", title: "其他早盘" });
+          this.arr.push({ id: "other", title: "其他早盘" });
         }
       }
       this.datetimeNum = this.arr[0].id;
@@ -189,10 +192,10 @@ export default {
             res.data.data.length > 0 &&
             res.data.data != null
           ) {
-            console.log("数据", res.data);
             this.Regulations.title = res.data.data.type;
             this.noData = false;
             this.data = res.data.data;
+            console.log("数据", this.data);
           } else {
             this.data = "";
             this.noData = true;
@@ -200,6 +203,7 @@ export default {
         });
     },
     //获取冠军盘口数据
+    // 暂不使用
     getChampion: function(typeGame, search) {
       console.log("冠军盘口");
       this.$store.dispatch("GETSHOW", true);
@@ -301,7 +305,20 @@ export default {
       this.datetimeNum = id;
       this.sear = id;
       this.SerchValue = "";
+      this.entryShow = true;
       this.getAjaxInfo("", "", id);
+      this.timers = false;
+      let _this = this;
+    //   if(this.$store.getters.getActivity == 'StMorningPlate'){
+    //     this.timers = true;
+    //   this.$public.ajaxTimerFun(function(timing) {
+    //   _this.getAjaxInfo("", "", id);
+    //   if (!_this.timers) {
+    //     clearInterval(timing);
+    //   }
+    // });
+    //   }
+
     },
     //打开联赛投注页面
     goMatchInfo: function(sessionId, code) {
@@ -371,6 +388,25 @@ export default {
     if (this.listnum != 1) {
       this.entryShow = true;
     }
+      let _this = this;
+    // 判断4种玩法的轮询
+    if(this.$store.getters.getActivity == 'StToday' || this.$store.getters.getActivity == 'StStringScene' || this.$store.getters.getActivity == 'StChampion'){
+    this.$public.ajaxTimerFun(function(timing) {
+      _this.getAjaxInfo();
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
+    }else  if(this.$store.getters.getActivity == 'StMorningPlate'){
+      this.$public.ajaxTimerFun(function(timing) {
+      _this.getAjaxInfo("", "",_this.datetimeNum);
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
+      }
+  
+    
   },
   computed: {
     getActivity: function() {
@@ -399,20 +435,51 @@ export default {
   },
   watch: {
     getActivity(val) {
+      this.timers = false;
+      let _this = this;
       // 判断是不是早盘,是则显示时间条
       if (this.$store.getters.getActivity == "StMorningPlate") {
+        this.timers = true;
+              this.$public.ajaxTimerFun(function(timing) {
+      _this.getAjaxInfo("", "",_this.datetimeNum);
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
         this.dayShow = true;
       } else {
         this.dayShow = false;
       }
-      //       if (this.$store.getters.getActivity == "StStringScene" || this.$store.getters.getActivity == "StChampion") {
-      //   this.str_type = true;
-
-      // } else {
-      //   this.str_type = false;
-
-      // }
+      if (this.$store.getters.getActivity != "StStringScene") {
+        this.entryShow = true;
+      }else if(this.listnum != 1){
+          this.entryShow = true;
+      } 
+      else {
+        this.entryShow = false;
+        this.timers = true;
+                this.$public.ajaxTimerFun(function(timing) {
+      _this.getAjaxInfo("", "", "", _this.listnum);
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
+           
+      }
+      // 轮询造轮子
+      if(this.$store.getters.getActivity == 'StToday' || this.$store.getters.getActivity == 'StChampion'){
+        this.timers = true;
+            this.$public.ajaxTimerFun(function(timing) {
+      _this.getAjaxInfo();
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
+      }
     }
+  },
+  beforeDestroy(){
+    this.timers = false;
   }
 };
 </script>

+ 5 - 1
vue_sports/.svn/pristine/3a/3a88a42e82b1f0cfb07174b365e9bd568cdf061b.svn-base → vue_sports/.svn/pristine/be/be84dcb55c1994c29a6cd56b72d84dcc215ed725.svn-base

@@ -18,6 +18,7 @@ axios.defaults.timeout = 10000
 // let Base = 'http://g.a.cnscbv.com/'
 // 开发
 let Base = 'http://sports.5gogo.com'
+//let Base = 'http://192.168.2.113/kaiyou-dev'
 function headerUrl (url) {
   url = Base +  url
   return url
@@ -30,6 +31,7 @@ axios.interceptors.request.use(
   config => {
     // 每次发送请求之前判断是否存在token,如果存在,则统一在http请求的header都加上token,不用每次请求都手动添加
     // 即使本地存在token,也有可能token是过期的,所以在响应拦截器中要对返回状态进行判断
+   // console.log(store);
     const token = store.state.token
     token && (config.headers.Authorization = token)
     return config
@@ -40,6 +42,7 @@ axios.interceptors.request.use(
 // response 响应拦截器
 axios.interceptors.response.use(
   response => {
+  
     if (response.status === 200) {
       return Promise.resolve(response)
     } else {
@@ -48,7 +51,8 @@ axios.interceptors.response.use(
   },
   // 服务状态码不是200的情况
   error => {
-    if (error.response.status) {
+    console.log(error.response);
+    if (error.response) {
       switch (error.response.status) {
         // 401 未登录
         // 未登录则跳转登录页面,并携带当前页面的路径

二進制
vue_sports/.svn/pristine/c0/c07b9b018086910d216bfecaa7517d2b4157d304.svn-base


+ 1 - 1
vue_sports/.svn/pristine/c0/c0de00c50e79e20d8f2e133531cbd53f7fe5ef8d.svn-base → vue_sports/.svn/pristine/c2/c24d09cce7692545e6ec09a097f76933a4353a66.svn-base

@@ -40,7 +40,7 @@ export default {
     entryForm
   },
   created(){
-        console.log('ssjsjsjsjsj',this.$route.query.code)
+        // console.log('ssjsjsjsjsj',this.$route.query.code)
       if(this.$route.query.code){
         this.entryFormShow = true;
       }else{

+ 9 - 4
vue_sports/.svn/pristine/1f/1fa556c558bcf73551b35cd5151f8b98a7cb890e.svn-base → vue_sports/.svn/pristine/c6/c6a350b765c623cd9211617a6fb6450c647baa04.svn-base

@@ -8,7 +8,7 @@
               <span class="The-club">{{ item.condition }}</span>
               <span
                 :class="item.isTrue ? 'active The-club-box' : 'The-club-box'"
-                @click="bettingBtn(item.id,item.condition,item.odds)"
+                @click="bettingBtn(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id)"
               >{{ item.odds }}</span>
             <!-- </div> -->
           </div>
@@ -21,7 +21,7 @@
               <span class="The-club">{{ item.condition }}</span>
               <span
                 :class="item.isTrue ? 'active The-club-box' : 'The-club-box'"
-                @click="bettingBtn(item.id,item.condition,item.odds)"
+                @click="bettingBtn(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id)"
               >{{ item.odds }}</span>
             <!-- </div> -->
           </div>
@@ -38,6 +38,7 @@ export default {
       title: "total_goal",
       data: [],
       home_team:'',//主队
+      match_id:'',
       guest_team:'',//客队
       score:'0,0',//比分
       isDisplay:false,//是否显示
@@ -47,7 +48,7 @@ export default {
   },
   methods: {
   //玩法投注
-		bettingBtn(id,name,odds,condition='',bettingTime='') {
+		bettingBtn(id,name,odds,odds_only,p_code,match_id,condition='',bettingTime='') {
       let _this = this;
       let bettingInfo = {
         id,
@@ -56,10 +57,13 @@ export default {
         name,
         odds,
         condition,
+         ballId:this.$store.getters.getBallId,
+        p_code,
+        match_id,
         ganame:this.title,
         score:this.score,
         bettingTime,
-
+        odds_only,
       }
 			//调用玩法投注公共方法
 			this.$public.bettingFunction(this.betting,bettingInfo,this.data,this.$store.getters.getBetting,this.title,this.dataNum,
@@ -98,6 +102,7 @@ export default {
   watch: {
     /*------------------------------------------------------------ */
     getUserIcons(val) {
+      this.match_id=val.match_id
       //console.log("更新数据", val);
       if (!val) return false;
       let _this =this;

+ 6 - 4
vue_sports/.svn/pristine/af/afe039c09661618b33e782258baef4605898fb57.svn-base → vue_sports/.svn/pristine/c6/c6c12a6c7a160f8e1df36ac551624e49acf3d97f.svn-base

@@ -135,12 +135,13 @@ export default {
 					this.$http.post(this.$ports.login.login,{account:this.account,password:this.password}).then(res=>{
 						if(res.data.status == 1){
 							this.info = '';
-							console.log('res',res)
-							localStorage.setItem('token',res.data.data[0].token)
+							//console.log('res',res)
+							this.$public.setItem('token',res.data.data[0].token)
+							this.$store.dispatch('SET_TOKEN',res.data.data[0].token)
 							localStorage.setItem('name',res.data.data[0].name)
-								this.$store.dispatch('GET_ISSHOW',false)
+							this.$store.dispatch('GET_ISSHOW',false)
 						}else{
-							console.log('resstatus',res)
+							//console.log('resstatus',res)
 							this.info = res.data.msg;
 						}
 					})
@@ -160,6 +161,7 @@ export default {
 			this.$store.dispatch('GET_ISSHOW',this.isshow)
 		},
 		register(){
+			console.log();
 			this.$store.dispatch('GET_ISSHOW',false);
 			this.$store.dispatch('GETRGSHOW', true);
 		}

+ 335 - 57
vue_sports/.svn/pristine/23/23ac19e6cd963c14589a77c1c8c3e5dbf3de8494.svn-base → vue_sports/.svn/pristine/c7/c7d841b5c97ecec11536dfd00d6a9975d1e0338f.svn-base

@@ -3,19 +3,18 @@
     <div class="baffleBox allBox" v-show="!newIsShrink">
       <div class="box">
         <div class="row allAlignment center">
-          <span style="color:#f8f8f8;font-size:0.24rem;">余额:0</span>
+          <span style="color:#f8f8f8;font-size:0.24rem;">余额:{{cash}}</span>
           <span style="font-size:0.28rem; color:#333333;font-weight:bold">投注单</span>
-          <span style="color:#33333;font-size:0.24rem;" @click="shrink()">
-            <img style="width:.25rem;height:.25rem" :src="img" alt>
-          </span>
+          <img style="width:.50rem;height:0.8rem" :src="img_size" alt  @click="shrink()">
+          <!-- style="color:#33333;font-size:0.24rem;" -->
         </div>
       </div>
 
       <!-- 数据列表 -->
       <div class="titleBox" v-for="(item,index) in dataList" :key="index" @click="activekey(index)">
         <div class="tilteMatch">
-          <div class="row item-center allAlignment" style="height:.5rem;padding:0 .32rem">
-            <span>{{item.ganame}}</span>
+          <div class="row item-center allAlignment" style="height:.5rem;padding-left:0.32rem">
+            <span :style="item.repeat? 'background: #f76649;':'' ">{{item.ganame}}</span>
             <span class="cancel" @click.stop="delarr(item.ganame,item.id)">
               <img style="width:.25rem;height:.25rem" :src="img" alt>
             </span>
@@ -42,7 +41,7 @@
             </span>
           </div>
           <div class>
-            <span v-if="bettingNumber[index]">{{(bettingNumber[index]*item.odds%100*100).toFixed(2)}}</span>
+            <span v-if="bettingNumber[index]">{{(bettingNumber[index]*item.odds).toFixed(2)}}</span>
             <span v-else>可赢额</span>
           </div>
         </div>
@@ -80,10 +79,13 @@
         <div class="bettingInput row item-center average">
           <div class="inputBox row allAlignment">
             <input type @click="go()" v-model="arrNumber" placeholder="投注额">
-            <span @click.stop="ClearData('all')">x</span>
+            <span class="cancel" @click.stop="ClearData('all')">
+              <img style="width:.2rem;height:.2rem" :src="img" alt>
+            </span>
+            <!-- <span @click.stop="ClearData('all')">x</span> -->
           </div>
           <div class>
-            <span v-if="arrNumber">{{arrNumber*3}}</span>
+            <span v-if="arrNumber">{{(datamMoney).toFixed(2)}}</span>
             <span v-else>可赢额</span>
           </div>
         </div>
@@ -104,26 +106,83 @@
               <div v-for=" n in 3" @click="updateNumber(n+6,'all')">
                 <button>{{n+6}}</button>
               </div>
-              <button @click="updateNumber('0',index)">0</button>
-              <button @click="updateNumber('00',index)">00</button>
+              <button @click="updateNumber('0','all')">0</button>
+              <button @click="updateNumber('00','all')">00</button>
               <button @click="delNumder('all')"style="background:rgb(247, 102, 73);font-size:.4rem;line-height:.86rem;">x</button>
             </div>
           </div>
         </div>
-        <div class="row allAlignment" style="padding:.1rem .2rem">
-          <span class="showNumberSpan">所有投注:</span>
-          <span style="font-size:0.24rem">0.00</span>
+      </div>
+      </div>
+
+      <!-- 过关投注  && compound.length > 0 -->
+      <div v-show="!repeat ">
+        <div class="row allAlignment center " style="height: 0.8rem;background: #ccc;padding: 0 0.2rem;">
+          <span>复式连串过关投注</span>
+          <img  style="width:.4rem;height:.4rem" src="../assets/st-imges/xiangxia.png" alt="">
         </div>
-        <div class="row allAlignment" style="padding:0 .2rem">
-          <span class="showNumberSpan">可赢金额:</span>
-          <span style="font-size:0.24rem;color:#F76649;">0.00</span>
+   
+        <div class="showNumber" v-for="(item,index) in compound"  @click.stop="activekey('through'+index)"  >
+          <span v-if="dataList" style="font-size:.3rem">{{item.title}}</span>
+          <div class="bettingInput row item-center average">
+            <div class="inputBox row allAlignment">
+              <input type @click="go()" v-model="arrNumber " placeholder="投注额">
+              <!-- <span @click.stop="ClearData('through')">x</span> -->
+              <span class="cancel" @click.stop="ClearData('sss')">
+                <img style="width:.2rem;height:.2rem" :src="img" alt>
+              </span>
+            </div>
+            <div class>
+              <span v-if="arrNumber">{{(datamMoney).toFixed(2)}}</span>
+              <span v-else>可赢额</span>
+            </div>
+          </div>
+          <div class="bottonBox" v-if="clickIndex=='through'+index">
+            <div class="bottonBox-num row allAlignment" style="padding:0 .2rem">
+              <div @click="additionFun(100,'through',index) ">+100</div>
+              <div @click="additionFun(1000,'through',index)">+1000</div>
+              <div @click="additionFun(10000,'through',index)">+10000</div>
+            </div>
+            <div style="margin-top:0.42rem;margin-bottom:0.42rem">
+              <div class="row allAlignment center">
+                <div v-for=" n in 6" @click="updateNumber(n,'through',index)">
+                  <button>{{n}}</button>
+                </div>
+              </div>
+              <div class="row allAlignment center" style="margin-top:0.17rem;">
+                <div v-for=" n in 3" @click="updateNumber(n+6,'through',index)">
+                  <button>{{n+6}}</button>
+                </div>
+                <button @click="updateNumber('0','through',index)">0</button>
+                <button @click="updateNumber('00','through',index)">00</button>
+                <button @click="delNumder('through')"style="background:rgb(247, 102, 73);font-size:.4rem;line-height:.86rem;">x</button>
+              </div>
+            </div>
+          </div>
         </div>
       </div>
 
+      <div v-show="repeat" class="row  center">
+        <span>红色选项不可以结合进行过关投注</span>
+      </div>
 
-        <!-- <span>红色选项不可以结合进行过关投注<span> -->
-        <div class="btn" style="background:#F76649;">
-          <span>投注</span>
+      <!-- 总数据展示 -->
+      <div class="row allAlignment" style="padding:.1rem .2rem">
+          <span v-if="dataNum" class="showNumberSpan">所有投注({{dataNum}}):</span>
+          <span v-else class="showNumberSpan">所有投注:</span>
+          <span v-if="dataNumbe" style="font-size:0.24rem">{{(dataNumbe)}}</span>
+          <span v-else style="font-size:0.24rem">0.00</span>
+        </div>
+        <div class="row allAlignment" style="padding:0 .2rem">
+          <span class="showNumberSpan">可赢金额:</span>
+          <span v-if="datamMoney" style="font-size:0.24rem;color:#F76649;">{{(datamMoney).toFixed(2)}}</span>
+          <span v-else style="font-size:0.24rem;color:#F76649;">0.00</span>
+        </div>
+        <div class="btn" style="background:#F76649;" @click="betOrder" v-if="isLogin">
+          <span> 确认投注</span>
+        </div>
+        <div class="btn" style="background:#F76649;" @click="loginReg" v-else>
+          <span >登陆/注册</span>
         </div>
         <div class="btn" style="background:#A1A1A1;">
           <span>添加更多的选择</span>
@@ -132,27 +191,31 @@
           <span>全删除</span>
         </div>
       </div>
-    </div>
+    
+
+    <!-- <div class="loading_box row center" >
+        <div class="weui-loading"></div>
+    </div> -->
     <div class="shrink" :style="newIsShrink?'':'display:none'" @click="show()">
       投注单--选项
       <span class="num">{{dataList?dataList.length:'0'}}</span>
     </div>
+
+    <div v-if="isshow" class="login"><Login></Login></div>
+    <div v-else-if="rgShow"  class="login" ><register></register></div>
   </div>
 </template>
 <script>
 import "../css/index.css";
+import Login from "@/pages/Login/index/StLogin";
+import register from "@/pages/Login/index/register";
 export default {
   data() {
     return {
       img: require("../assets/st-imges/del.png"),
+      img_size: require("../assets/st-imges/narrow.png"),
       bettingNumber:[],
-      //余额
-      balance: "",
-      // 全部可赢金额
-      allmoney: "",
-      // 全部投注金额
-      allbetmoney: "",
-      // 参与投注的项目数目
+      balance: "",//余额
       bettingquantity: "",
       // 投注信息
       betting: "",
@@ -162,10 +225,24 @@ export default {
       isshrink: false,
       //小键盘显示位
       clickIndex:0,
-      money:0,//可赢金额
+      // money:0,//可赢金额
       arrNumber:'',//单注数量
+      dataNum:0,//已投注数量
+      dataNumbe:0,//总投数
+      datamMoney:0,//可赢总金额
+      isThrough:false,//触发过关玩法
+      cash:0.00,//余额
+      compound:[],//复合玩法
+      repeat:false,//判断比赛数据是否有相同赛事
+      isLogin:false,//是否登陆
+      isshow:false,//登陆显示/隐藏
+      rgShow:false,//注册显示/隐藏
     };
   },
+  components:{
+    Login,
+    register
+  },
   methods: {
     
     /*---------------------------------- */
@@ -179,18 +256,24 @@ export default {
     updateNumber: function(val,index) {
       // console.log(index);
       let temporaryData = '';
+      let numbers = 0;
       this.dataList.forEach((e,i)=>{
         if(index !='all'){
           if(index==i){
             temporaryData = this.bettingNumber[index]*1 ? this.bettingNumber[index]+(val+''): val+'';
             this.bettingNumber.splice(index,1,temporaryData);
+            console.log( this.bettingNumber[i]);
           }
         }else{  
-          temporaryData = this.bettingNumber[index]*1 ? this.bettingNumber[index]+(val+''): val+'';
-          this.bettingNumber.splice(index,1,temporaryData);
+          temporaryData = this.bettingNumber[i]*1 ? this.bettingNumber[i]+(val+''): val+'';
+          this.bettingNumber.splice(i,1,temporaryData);
+          //numbers += 
+
           this.arrNumber = temporaryData
         }
       })
+      console.log(this.bettingNumber);
+      //this.profitFun()
     },
 
     /*---------------------------------------------*/
@@ -204,32 +287,38 @@ export default {
             this.bettingNumber.splice(index,1,data);
           }
         }else{
-          console.log(index);
+          let dataAdd  = 0;
           data = this.bettingNumber[i]*1 ? (this.bettingNumber[i]*1+val)+'': val+'';
+          dataAdd +=data*1;
           this.bettingNumber.splice(i,1,data);
           this.arrNumber = data
         }
       })
+      this.profitFun()
     },
 
     /*---------------------------------- */
-    //删除投注数的一位数
+    //删除投注数的一位数
     delNumder: function(index) {
       let Str = this.bettingNumber;
       let strVal='';
-      Str.forEach((e,i)=>{
-        if(index !='all'){
+      if(index !='all'){
+        Str.forEach((e,i)=>{
           if(i==index){
             strVal  = e;
             e= strVal.substring(0, strVal.length - 1);
             this.bettingNumber.splice(index,1,e);
           }
-        }else{
+        })
+      }else{
+        Str.forEach((e,i)=>{
           strVal= e.substring(0, e.length - 1);
+          console.log(strVal);
           this.bettingNumber.splice(i,1,strVal);
-          this.arrNumber = strVal ;
-        }
-      })
+        })
+        this.arrNumber = this.arrNumber.substring(0, this.arrNumber.length - 1) ;
+      }
+      this.profitFun()  
     },
 
     /*---------------------------------- */
@@ -245,12 +334,13 @@ export default {
           this.arrNumber = '';
         }
       })
+      this.profitFun()
     },
 
     /*---------------------------------- */
     // 删除所有投注
     alldel() {
-    let betting = this.$store.getters.getBetting;
+      let betting = this.$store.getters.getBetting;
       betting.forEach(e=>{
         e.data=[]
       })
@@ -260,6 +350,7 @@ export default {
       this.$public.setCache("box_size", 2);
       this.$store.dispatch("ISBETTING", false);
       this.$store.dispatch('DEL_TYPE','all');
+      this.profitFun();
     },
 
     /*---------------------------------- */
@@ -269,12 +360,13 @@ export default {
     },
 
     /*---------------------------------- */
-    // 删除指定的投注
+    // 删除指定的投注数据
     delarr(name, numid) {
       let betting = this.$store.getters.getBetting;
       betting.forEach(res => {
         if (res.title == name) {
           res.data.forEach((e, index) => {
+
             if (e.id == numid) {
               res.data.splice(index, 1);
               //删除数据也要删除想对应的值
@@ -285,7 +377,8 @@ export default {
         this.$store.dispatch("BETTING", []);
         this.$store.dispatch("BETTING", betting);
       });
-       this.$store.dispatch('DEL_TYPE',numid)
+      this.$store.dispatch('DEL_TYPE',numid)
+      this.profitFun() 
     },
 
     /*---------------------------------- */
@@ -294,6 +387,24 @@ export default {
       this.isshrink = true;
       this.$public.setCache("box_size", 1);
     },
+    
+    /*---------------------------------- */
+    //计算可赢金额(总额)
+    profitFun(){
+      let dataNum = 0;
+      let dataNumbe = 0;
+      let datamMoney = 0;
+      this.bettingNumber.forEach((e,i)=> {
+        if(e){
+          dataNum ++;
+          dataNumbe += e*1 ;
+          datamMoney += e*1*this.dataList[i].odds
+        }
+      })
+      this.dataNum = dataNum;
+      this.dataNumbe = dataNumbe+'';
+      this.datamMoney = datamMoney;
+    },
 
     /*---------------------------------- */
     //投注窗口缩小
@@ -301,47 +412,208 @@ export default {
       this.isshrink = false;
       this.$public.setCache("box_size", 2);
     },
-  },
-  computed: {
-    //获取vuex投注数据
-    getBetting: function() {
-      let betting = this.$store.getters.getBetting;
+
+    /*---------------------------------- */
+    //登陆
+    loginReg(){
+      let isShow = true;
+      this.isshow =true;
+      this.$store.dispatch("GET_ISSHOW",isShow);
+      console.log( this.$store.getters.getIsShow);
+    },
+    /*------------------------------- */
+    //投注确认提交
+    betOrder(){
+      let list = [],obj ={};
+      console.log(this.bettingNumber);
+      //
+   
+      this.dataList.forEach((res,index)=>{
+        //console.log(res);
+        if(this.bettingNumber[index]){
+          obj ={
+            type:'1',
+            index:index,
+            // odds_id :res.id,
+            // odds : res.odds,
+            // odds_only : res.odds_only,
+            // odds_code:res.p_code,
+            // condition : res.condition,
+            bet_amount :this.bettingNumber[index],
+            // match_id:res.match_id,
+            // game_code:res.ballId,
+          }
+          list.push(obj);
+        }
+      })
+        this.compound.forEach(e=>{
+          obj ={
+            type:e.title,
+            odds:e.odds,
+            bet_amount :'50',//e.amount
+          }
+          list.push(obj);
+        })
+      console.log(this.compound);
+        if(this.compound.length > 0){
+          list.push(this.dataList);
+        }
+
+      console.log(list);
+      if(list.length >= 1){
+        this.$http.post(this.$ports.betOrder.Bet,{data:list,token:this.$public.getItem('token')}).then(res=>{
+            console.log('数据',res.data);
+          if(res.data.status ==1){
+            this.alldel();
+            // this.cash = (this.cash - obj.bet_amount).toFixed(2);
+            // let betting = this.$store.getters.getBetting;
+            // betting.forEach(res => {
+            //   res.data = []
+            // })
+            // this.dataList = [];
+            // this.$store.dispatch("BETTING", []);
+            // this.$store.dispatch("BETTING", betting);
+            // this.$store.dispatch("ISBETTING", false);
+          }
+        })
+      }else{
+        alert('你还未进行投注');
+      }
+     
+    },
+
+
+    /*---------------------------------- */
+    //投注页面数据处理
+    getDataList:function(val){
       let arrays = [];
-      if (betting) {
-        betting.forEach(e => {
-          e.data.forEach(res => {
-            this.bettingNumber.push('');
+      this.dataList=[];
+      if (val) {
+        val.forEach(e => {
+          e.data.forEach((res,index )=> {
+            if(this.bettingNumber.length < e.data.length){
+              this.bettingNumber.push('');
+            }
+            res.repeat =false;
+            this.repeat =false;
             arrays.push(res);
+            //判断比赛数据是否相同赛事
+            if(arrays.length > 1){
+              arrays.forEach((data,i)=>{
+                if(res.match_id == data.match_id && index!= i){
+                  arrays[i].repeat =true;
+                  arrays[index].repeat =true;
+                  this.repeat =true;
+                }
+              })
+            }
           });
         });
-        this.dataList = arrays
+        this.dataList = arrays;
+  
       // 查看是否还有数据确定是否要关闭窗口
       }
       if(this.dataList.length == 0){
         this.$public.setCache("box_size", 2);
         this.$store.dispatch("ISBETTING", false);
       }
+      //console.log('处理完成的数据',this.dataList);
+
+      //判断是否有过关玩法
+      if(this.dataList.length >= 3){
+        this.compound.splice(0,this.compound.length);
+        this.isThrough = true;
+        this.dataList.forEach((res,index) =>{
+          if(index  >= 2){
+            //this.$public.betPlay(index+1,this.dataList)
+            this.compound.push(this.$public.betPlay(index+1,this.dataList));
+          }
+        })
+      }else{
+        this.compound.splice(0,this.compound.length)
+      }
     },
 
+    /*---------------------------------- */
+    //获取用户个人信息
+    getUserInfo(){
+      this.$http.post(this.$ports.login.getAgent,{token:this.$public.getItem('token')}).then(res=>{
+        //console.log(res);
+        if(res.data.status == 1 &&  res.data.data != null){
+          this.cash = res.data.data.cash;
+          this.isLogin =true;
+        }
+      })
+    }
+  },
+  /**
+   * 
+   */
+  computed: {
+    //获取vuex投注数据
+    getBetting: function() {
+      return  this.$store.getters.getBetting;
+    },
     /*------------------------------*/
     //获取投注框放大缩小状态
-
     newIsShrink() {
       return this.isshrink;
+    },
+    getRgShow(){
+      return this.$store.getters.getRgShow;
+    },
+    getIsShow(){
+       return this.$store.getters.getIsShow; 
+    },
+    getToken(){
+      return this.$store.getters.getToken;
     }
   },
+  /**
+   * 
+   */
   watch: {
-    Isshow(obj) {},
-    getBetting(val) {}
+    getIsShow(val) {
+      this.isshow = val
+    },
+    getBetting(val) {
+      console.log('数据变法没有',val);
+      this.getDataList(val);
+    },
+    //显示注册页面
+    getRgShow(val){
+      this.rgShow = val;
+      this.isshow  = val ? false :true;
+      console.log(this.rgShow);
+    },
+    getToken(val){
+      this.isLogin = true
+    }
   },
+
+  /**
+   * 页面初始化完成进行挂载
+   */
   mounted() {
     if (this.$public.getCache("box_size") == 1) {
       this.isshrink = true;
     }
+    this.getDataList(this.$store.getters.getBetting);
+    this.getUserInfo();
+      //console.log('token',this.$public.getItem('token'));
+    if(this.$public.getItem('token')){
+      this.isLogin = true
+    }
   }
+  
 };
 </script>
 <style scoped>
+.login{
+  z-index: 999999;
+  position: fixed;
+  top: 0;
+}
 .num {
   display: inline-block;
   width: 0.46rem;
@@ -401,6 +673,7 @@ export default {
 }
 .titleBox {
   padding: 0.21rem 0.07rem;
+  border-bottom: 1px solid #ebebeb;
 }
 .bettingInput {
   height: 0.9rem;
@@ -448,8 +721,8 @@ button {
   margin-left: 0.2rem;
 }
 .showNumber {
-  margin-top: 0.36rem;
-  border-top: 1px solid #ebebeb;
+  /* margin-top: 0.36rem; */
+  border-bottom: 1px solid #ebebeb;
   padding-top: 0.2rem;
   padding: 0.21rem 0.2rem;
 }
@@ -477,6 +750,11 @@ button {
   text-align: center;
   font-size: 0.3rem;
 }
+.loading_box{
+  width: 3rem;
+  height: 3rem;
+  background:#ebebeb;
+}
 </style>
 
 

+ 0 - 153
vue_sports/.svn/pristine/ca/cac8122214ae67bb989204d115885500293e7a77.svn-base

@@ -1,153 +0,0 @@
-<template>
-  <div>
-    <div v-if="tennisShow">
-    <h3 style="color:#F76649;">{{title}}</h3>
-    <div class="tennis">
-
-    <div class="tennis-dtl" v-for="(item,index) in dat" :key="item.id">
-      <div class="teamName">
-        <span>{{item.host_player_name}}</span>
-        <div>vs</div>
-        <span>{{item.guest_player_name}}</span>
-      </div>
-      <div class="frequency">
-        <div :class = "item.match_process == 1? 'status':''">
-          <span>第一盘</span>
-          <span>{{item.first_inning_score}}</span>
-        </div>
-        <div  :class = "item.match_process == 2? 'status':''">
-          <span>第二盘</span>
-          <span>{{item.second_inning_score}}</span>
-        </div>
-        <div :class = "item.match_process == 3? 'status':''">
-          <span>第三盘</span>
-          <span>{{item.third_inning_score}}</span>
-        </div>
-      </div>
-    </div>
-    
-  </div>
-  <div class="ballBtn">
-      <rollingBall :name="name" :index="ball.index" :id="ball.id" :ballName = "ball.name" :gameCode = "gameCode"></rollingBall>
-    </div>
-  </div>
-  </div>
-</template>
-<script>
-import rollingBall from "@/components/StRollingBall";
-export default {
-  data() {
-    return {
-      title: "网球",
-      tennisShow:true,
-      selection: true,
-      ballName:'',
-      name:'',//球类名称传值
-      ball: {
-        name: "所有网球滚球",
-        index: "8",
-        id: 1003
-      },
-       gameCode:'',//球类别名
-      dat: []
-    };
-  },
-  components: { rollingBall },
-  mounted() {
-    this.$http.get(this.$ports.home.wqrollingBall).then(res => {
-      console.log(res.data.data.matchData.length)
-      if (res.status == 200 && res.data != [] && res.data.data.matchData.length != 0) {
-        console.log('网球',res)
-        this.dat = res.data.data.matchData;
-        this.title = res.data.data.gameName;
-        this.ball.index = this.dat.length;
-       this.name = this.title;
-          this.ball.name = "所有" + this.title + "滚球";
-            this.gameCode = res.data.data.game_code;
-      }else{
-        console.log("!23")
-        this.tennisShow = false
-        console.log(' this.tennisShow', this.tennisShow)
-      }
-    });
-  }
-};
-</script>
-<style scoped>
-.tennis {
-  margin-top: 0.13rem;
-  width: 100%;
-   border-radius: .08rem;
-  /* height: 6.42rem; */
-  background: #dcdcdc;
-  /* padding: 0 0.3rem 0 0.35rem; */
-
-  margin-bottom: 0.2rem;
-  padding: .3rem;
-}
- h3 {
-  text-align: left;
-  font-size: 0.3rem;
-  color: #000000;
-  padding: 0.25rem 0 0.05rem;
-  font-weight: 500;
-}
-.tennis-dtl {
-  width: 100%;
-  background: #dcdcdc;
-  border-bottom: 1px solid #E4E4E4;
-  margin-top: 0.2rem;
-  /* height: 1.89rem; */
-  height: auto;
-  padding: 0.24rem 0.89rem 0.25rem 0.31rem;
-  position: relative;
-  display: flex;
-  justify-content: space-between;
-  /* align-items: center; */
-}
-
-.teamName {
-  color: #333333;
-  font-size: 0.28rem;
-  width: 2.7rem;
-  text-align: left;
-}
-.frequency {
-  width: 1.57rem;
-  vertical-align: middle;
-  /* 垂直对齐 */
-  display: flex;
-  flex-direction: column;
-  justify-content: space-between;
-}
-.frequency div {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  font-size: 0.24rem;
-  color: #333333;
-}
-.frequency div:nth-last-child(1) {
-  margin-bottom: 0;
-}
-.frequency .status {
-  color: #F76649;
-}
-.tennis-dtl .icon {
-  width: 0.08rem;
-  height: 0.08rem;
-  position: absolute;
-  top: 0.8rem;
-  right: 0.33rem;
-}
-.tennis-dtl .icon i {
-  display: inline-block;
-  background: #000000;
-  width: 0.08rem;
-  height: 0.08rem;
-}
-.ballBtn {
-  padding-top: 0.41rem;
-  padding-bottom: 0.46rem;
-}
-</style>

+ 10 - 4
vue_sports/.svn/pristine/3b/3bf308973ab338cf0b96ce033b0174e09e5b1126.svn-base → vue_sports/.svn/pristine/cf/cfcfb16cb695a7a355d118762014c8bf6cff168f.svn-base

@@ -14,7 +14,7 @@
                 <div
                   class="The-club-box row center"
                   :class="item.isTrue== true ? 'active' : ''"
-                  @click="bettingBtn(item.id,item.condition,item.odds)"
+                  @click="bettingBtn(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id)"
                 >
                   <span>{{item.odds}}</span>
                 </div>
@@ -34,7 +34,7 @@
                 <div
                   class="The-club-box row center"
                   :class="item.isTrue== true ? 'active' : ''"
-                  @click="bettingBtn(item.id,item.condition,item.odds)"
+                  @click="bettingBtn(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id)"
                 >
                   <span>{{item.odds}}</span>
                 </div>
@@ -56,6 +56,7 @@ export default {
       title: "first_last_ball",
       home_team: "",
       guest_team: "",
+      match_id:'',
       data: [], //数据源
 	  isDisplay: "" ,//是否显示
 	  betting: [], //已投注倍率id集合
@@ -64,7 +65,8 @@ export default {
   },
   methods: {
     //玩法投注
-    bettingBtn(id,name,odds,condition='',bettingTime='') {
+    bettingBtn(id,name,odds,odds_only,p_code,match_id,condition='',bettingTime='') {
+      console.log(this.data)
     let _this = this;
      let bettingInfo = {
         id,
@@ -72,11 +74,14 @@ export default {
         guest_team:this.guest_team,
         name,
         odds,
+        p_code,
+        match_id,
         condition,
         ganame:this.title,
         score:this.score,
         bettingTime,
-
+        odds_only,
+         ballId:this.$store.getters.getBallId,
       }
       //调用玩法投注公共方法
       this.$public.bettingFunction(this.betting,bettingInfo,this.data,this.$store.getters.getBetting,this.title,this.dataNum,function(res,type){
@@ -116,6 +121,7 @@ export default {
   watch: {
     //监听vuex里面数据
     getUserIcons(val) {
+      this.match_id=val.match_id
 	    if(!val) return false;
       //console.log('先进/后进',val);
         this.home_team = val.home_team;

二進制
vue_sports/.svn/pristine/d1/d123b40ff3b41b986240f7dfea6a5716326ef825.svn-base


二進制
vue_sports/.svn/pristine/d5/d50d213b5a5941d9c62b37192b997d1eaadbf1ff.svn-base


+ 0 - 430
vue_sports/.svn/pristine/d8/d89b10bf0483d0a8eefe6769534a3c4039a152b8.svn-base

@@ -1,430 +0,0 @@
-<template>
-  <div class="head" :class="newIsShrink ?'hiddenbox':'bgcolor'">
-    <div class="baffleBox allBox" v-show="!newIsShrink">
-      <div class="box">
-        <div class="row allAlignment center">
-          <span style="color:#f8f8f8;font-size:0.24rem;">余额:0</span>
-          <span style="font-size:0.28rem; color:#333333;font-weight:bold">投注单</span>
-          <span style="color:#33333;font-size:0.24rem;" @click="shrink()">
-            <img style="width:.25rem;height:.25rem" :src="img" alt>
-          </span>
-        </div>
-      </div>
-
-      <div
-        class="titleBox"
-        v-for="(item,index) in dataList"
-        :key="index"
-         @click="activekey(index)"
-      >
-        <div class="tilteMatch">
-          <div class="row item-center allAlignment" style="height:.5rem;padding:0 .32rem">
-            <span style="font-size:.24rem">{{item.ganame}}</span>
-            <span class="cancel" @click.stop="delarr(item.ganame,item.id)">
-              <img style="width:.25rem;height:.25rem" :src="img" alt>
-            </span>
-          </div>
-          <div class="tilteMatchDiv" style="height:1rem;padding:0 .32rem;font-size:.26rem">
-            <div class="row item-center" style="height:50%">
-              <span>{{item.name}}</span>&emsp;
-              <span>{{item.condition}}</span>@
-              <span>{{item.odds}}</span>
-            </div>
-            <div class="row item-center" style="height:50%;font-size:.24rem">
-              <span>{{item.home_team}}</span>
-              <span style="color:#F76649">vs</span>
-              <span>{{item.guest_team}}</span>
-            </div>
-          </div>
-        </div>
-
-        <div class="bettingInput row item-center average" @click="activekey(index)" >
-          <div class="inputBox row allAlignment">
-            <input type @click.stop="go()" v-bind:value="bettingNumberMgs" placeholder="投注额" @click="activekey(index)">
-            <span @click="ClearData">
-              <img style="width:.2rem;height:.2rem" :src="img" alt>
-            </span>
-          </div>
-          <div class>
-            <span>可赢额</span>
-          </div>
-        </div>
-
-        <div class="bottonBox" v-show="item.isclick==true">
-          <div class="bottonBox-num row allAlignment" style="padding:0 .2rem">
-            <div>+100</div>
-            <div>+1000</div>
-            <div>+10000</div>
-          </div>
-          <div style="margin-top:0.42rem;margin-bottom:0.42rem">
-            <div class="row allAlignment center">
-              <div v-for=" n in 6" @click="updateNumber(n)">
-                <button>{{n}}</button>
-              </div>
-            </div>
-
-            <div class="row allAlignment center" style="margin-top:0.17rem;">
-              <div v-for=" n in 3" @click="updateNumber(n+6)">
-                <button>{{n+6}}</button>
-              </div>
-              <button @click="updateNumber('0')">0</button>
-              <button @click="updateNumber('00')">00</button>
-              <button
-                @click="delNumder()"
-                style="background:rgb(247, 102, 73);font-size:.4rem;line-height:.86rem;"
-              >x</button>
-            </div>
-          </div>
-        </div>
-      </div>
-     
-      <div class="showNumber" @click.stop="ISclick()">
-      <div v-if="dataList.length>1">
-        <span v-if="dataList" style="font-size:.3rem">单注</span>
-        <div class="bettingInput row item-center average" v-if="dataList">
-          <div class="inputBox row allAlignment">
-            <input type @click="go()" v-bind:value="bettingNumberMgs" placeholder="投注额">
-            <span @click="ClearData">x</span>
-          </div>
-          <div class>
-            <span>可赢额</span>
-          </div>
-        </div>
-        <div class="bottonBox" v-if="Isclick">
-          <div class="bottonBox-num row allAlignment" style="padding:0 .2rem">
-            <div>+100</div>
-            <div>+1000</div>
-            <div>+10000</div>
-          </div>
-          <div style="margin-top:0.42rem;margin-bottom:0.42rem">
-            <div class="row allAlignment center">
-              <div v-for=" n in 6" @click="updateNumber(n)">
-                <button>{{n}}</button>
-              </div>
-            </div>
-
-            <div class="row allAlignment center" style="margin-top:0.17rem;">
-              <div v-for=" n in 3" @click="updateNumber(n+6)">
-                <button>{{n+6}}</button>
-              </div>
-              <button @click="updateNumber('0')">0</button>
-              <button @click="updateNumber('00')">00</button>
-              <button
-                @click="delNumder()"
-                style="background:rgb(247, 102, 73);font-size:.4rem;line-height:.86rem;"
-              >x</button>
-            </div>
-          </div>
-        </div>
-        <div class="row allAlignment" style="padding:.1rem .2rem">
-          <span class="showNumberSpan">所有投注:</span>
-          <span style="font-size:0.24rem">0.00</span>
-        </div>
-        <div class="row allAlignment" style="padding:0 .2rem">
-          <span class="showNumberSpan">可赢金额:</span>
-          <span style="font-size:0.24rem;color:#F76649;">0.00</span>
-        </div>
-      </div>
-        <!-- <span>红色选项不可以结合进行过关投注<span> -->
-        <div class="btn" style="background:#F76649;">
-          <span>投注</span>
-        </div>
-        <div class="btn" style="background:#A1A1A1;">
-          <span>添加更多的选择</span>
-        </div>
-        <div class="btn" style="background:#333;margin-bottom:.5rem;" @click.stop="alldel()">
-          <span>全删除</span>
-        </div>
-      </div>
-    </div>
-    <div class="shrink" :style="newIsShrink?'':'display:none'" @click="show()">
-      投注单--选项
-      <span class="num">{{dataList?dataList.length:'0'}}</span>
-    </div>
-  </div>
-</template>
-<script>
-import "../css/index.css";
-export default {
-  data() {
-    return {
-      img: require("../assets/st-imges/del.png"),
-      bettingNumber: "",
-      //余额
-      balance: "",
-      // 全部可赢金额
-      allmoney: "",
-      // 全部投注金额
-      allbetmoney: "",
-      // 参与投注的项目数目
-      bettingquantity: "",
-      // 投注信息
-      betting: "",
-      dataList: [],
-      arr: [],
-      // 是否缩小
-      isshrink: false,
-      Isclick: false
-    };
-  },
-  methods: {
-    /*---------------------------------- */
-    go: function() {
-      document.activeElement.blur();
-    },
-    /*---------------------------------- */
-    updateNumber: function(val) {
-      this.bettingNumber += val;
-    },
-    /*---------------------------------- */
-    delNumder: function() {
-      let Str = this.bettingNumber;
-      this.bettingNumber = Str.substring(0, Str.length - 1);
-    },
-    /*---------------------------------- */
-    ClearData: function() {
-      this.bettingNumber = "";
-    },
-    /*---------------------------------- */
-    // 删除所有投注
-    alldel() {
-      let betting = this.$store.getters.getBetting;
-      betting.forEach(e=>{
-        e.data=[]
-      })
-      this.$store.dispatch("BETTING", []);
-      this.$store.dispatch("BETTING", betting);
-      this.$public.setCache("box_size", 2);
-      this.$store.dispatch("ISBETTING", false);
-      this.$store.dispatch('DEL_TYPE','all');
-    },
-    /*---------------------------------- */
-    // 激活投注框的小键盘
-    activekey(index) {
-         this.dataList.forEach((e,i)=>{
-              this.Isclick=false
-              this.$set(this.dataList[i],'isclick',false)  
-         })
-          this.$set(this.dataList[index],'isclick',true)      
-    },
-    /*---------------------------------- */
-    // 删除指定的投注
-    delarr(name, numid) {
-      let betting = this.$store.getters.getBetting;
-      betting.forEach(res => {
-        if (res.title == name) {
-          res.data.forEach((e, index) => {
-            if (e.id == numid) {
-              res.data.splice(index, 1);
-            }
-          });
-        }
-        this.$store.dispatch("BETTING", []);
-        this.$store.dispatch("BETTING", betting);
-      });
-       this.$store.dispatch('DEL_TYPE',numid)
-    },
-    /*---------------------------------- */
-    //投注窗口放大
-    shrink() {
-      this.isshrink = true;
-      this.$public.setCache("box_size", 1);
-    },
-    /*---------------------------------- */
-    //投注窗口缩小
-    show() {
-      this.isshrink = false;
-      this.$public.setCache("box_size", 2);
-    },
-
-    /*---------------------------------- */
-    //激活单注的小键盘
-    ISclick() {
-        this.dataList.forEach((e,i)=>{
-              this.Isclick=false
-              this.$set(this.dataList[i],'isclick',false)  
-         })
-        this.Isclick = true;
-    
-    }
-  },
-  computed: {
-    //获取vuex投注数据
-    getBetting: function() {
-      let betting = this.$store.getters.getBetting;
-      let array = [];
-      if (betting) {
-        betting.forEach(e => {
-          e.data.forEach(res => {
-            array.push(res);
-          });
-        });
-        this.dataList = array;
-        // 查看是否还有数据确定是否要关闭窗口
-      }
-      if(array==false){
-             this.$public.setCache("box_size", 2);
-              this.$store.dispatch("ISBETTING", false);
-      }
-      return this.dataList;
-    },
-    //获取投注金额
-    bettingNumberMgs: function() {
-      return this.bettingNumber;
-    },
-
-    /*------------------------------*/
-    //获取投注框放大缩小状态
-
-    newIsShrink() {
-      return this.isshrink;
-    }
-  },
-  watch: {
-    Isshow(obj) {},
-    getBetting(val) {}
-  },
-  mounted() {
-    if (this.$public.getCache("box_size") == 1) {
-      this.isshrink = true;
-    }
-  }
-};
-</script>
-<style scoped>
-.num {
-  display: inline-block;
-  width: 0.46rem;
-  height: 0.46rem;
-  background: #dcdcdc;
-  border-radius: 50%;
-  line-height: 0.46rem;
-  text-align: center;
-  color: #f76649;
-}
-.bgcolor {
-  background: rgba(40, 40, 40, 0.75);
-  height: 55rem;
-}
-.hiddenbox {
-  height: 1rem;
-}
-.head {
-  position: relative;
-  display: flex;
-  justify-content: center;
-  position: fixed;
-  top: 0;
-  width: 100%;
-  z-index: 1000000;
-}
-.baffleBox {
-  position: fixed;
-  overflow-y: scroll;
-  top: 0;
-  left: 0.4rem;
-  width: 100%;
-  height: 100%;
-  -webkit-overflow-scrolling: touch;
-  z-index: 29;
-  box-sizing: border-box;
-}
-.allBox {
-  margin-top: 1.04rem;
-  width: 90%;
-  height: 11.5rem;
-  overflow-y: auto;
-  background: #f8f8f8;
-  border-radius: 0.1rem 0.1rem;
-}
-.box {
-  background: #f76649;
-  border-radius: 0.1rem 0.1rem 0 0;
-  height: 1rem;
-  line-height: 1rem;
-  padding: 0 0.32rem 0 0.22rem;
-}
-.bottonBox {
-  margin-top: 0.1rem;
-  padding: 0.22rem;
-  background: #ccc;
-}
-.titleBox {
-  padding: 0.21rem 0.07rem;
-}
-.bettingInput {
-  height: 0.9rem;
-  margin-top: 0.1rem;
-}
-.inputBox {
-  width: 4.31rem;
-  height: 0.8rem;
-  border: 1px solid #f76649;
-  border-radius: 0.1rem;
-  line-height: 0.8rem;
-  padding: 0 0.22rem;
-}
-input {
-  border: 0;
-}
-.tilteMatch {
-  height: 1.52rem;
-  background: #ebebeb;
-}
-.tilteMatchDiv {
-  margin-left: 0.13rem;
-}
-.cancel {
-  padding: 0 0.25rem;
-}
-button {
-  width: 0.96rem;
-  height: 0.88rem;
-  border: 0;
-  background: #a1a1a1;
-  border-radius: 0.1rem;
-  color: #f8f8f8;
-}
-.bottonBox-num > div {
-  display: flex;
-  justify-content: space-around;
-  align-items: center;
-  width: 1.8rem;
-  height: 0.8rem;
-  border-radius: 0.2rem;
-  color: #ebebeb;
-  background: #a1a1a1;
-}
-.showNumber {
-  margin-top: 0.36rem;
-  border-top: 1px solid #ebebeb;
-  padding-top: 0.2rem;
-  padding: 0.21rem 0.2rem;
-}
-.btn {
-  width: 100%;
-  height: 0.94rem;
-  border-radius: 0.1rem;
-  line-height: 0.94rem;
-  color: #f8f8f8;
-  text-align: center;
-  margin-top: 0.2rem;
-}
-.showNumberSpan {
-  color: #363636;
-  font-size: 0.28rem;
-}
-.shrink {
-  height: 1rem;
-  width: 100%;
-  background: #f76649;
-  color: #dcdcdc;
-  position: fixed;
-  bottom: 0rem;
-  line-height: 1rem;
-  text-align: center;
-  font-size: 0.3rem;
-}
-</style>
-
-

+ 18 - 0
vue_sports/.svn/pristine/1c/1c6f478fb6e7ec4d94f9ac115c205b1e3b12b983.svn-base → vue_sports/.svn/pristine/d8/d8c96903a07f0c1a11cc068f53859f627d885901.svn-base

@@ -41,9 +41,23 @@ export default {
       list:'',
        noData: false,
       info: "暂无相关特色赛事",
+      timers: true
     }
   },
   mounted() {
+     let _this =this;
+    this.$public.ajaxTimerFun(function(timing){
+       _this.getAjax();
+      if (!_this.timers){
+      clearInterval(timing);
+    }
+    })
+    this.getAjax();
+      
+  },
+  methods:{
+
+    getAjax:function(){
      this.$store.dispatch('GETSHOW',true);
     this.$http.get(this.$ports.home.highMatch).then(res =>{
       console.log('highMatch',res)
@@ -58,7 +72,11 @@ export default {
           this.$store.dispatch('GETSHOW',false);
       }
     })
+    }
   },
+  beforeDestroy(){
+    this.timers = false;
+  }
 };
 </script>
 <style scoped lang=""> 

+ 63 - 15
vue_sports/.svn/pristine/38/38ccdeb02822d3eaf2f5ccf4bb0f69dd1aa8a79a.svn-base → vue_sports/.svn/pristine/d9/d952938c7c4fa057c5ad467ab4a28640b863c8a9.svn-base

@@ -5,6 +5,16 @@
     </div>
     <div>
       <SportsHead></SportsHead>
+          <div class="Serch">
+
+      <div class="Soccer-game row center">
+        <div class="Soccer-game-title row center" @click="isreturn()">
+          <img class="returnimg" :src="searchreturn">
+        
+          {{name}}
+        </div>
+        </div>
+      </div>
       <div class="gambling">
         <div class="leagueMatch">
           <yd-button size="large" @click.native="show = true"></yd-button>
@@ -90,7 +100,7 @@
         <NotOpend :title="tipsTitle"></NotOpend>
       </div>
       <StLinkFooter></StLinkFooter>
-      <BettingWindow v-if="isWindow" />
+      <BettingWindow v-if="isWindow"/>
     </div>
   </div>
 </template>
@@ -109,12 +119,14 @@ import FullHalf from "@/components/dedicated/StFullHalf";
 import TeamGoalSize from "@/components/dedicated/StTeamGoalSize";
 import GoalSingleAndDouble from "@/components/dedicated/StGoalSingleAndDouble";
 import Corner from "@/components/dedicated/StCorner";
-import BettingWindow from "@/components/StBettingWindow"
+import BettingWindow from "@/components/StBettingWindow";
 export default {
   data() {
     return {
+      name:this.$route.query.name, // 球名
+      searchreturn: require("@/assets/st-imges/returnbox.png"),
       gameCode: this.$route.query.gameCode, //别名
-      match_id:'',
+      match_id: "",
       list: [], //数据
       key: [], //存储key值进行判定
       isShow: "", //更具数据是否显示
@@ -122,13 +134,14 @@ export default {
       tipsTitle: "暂无相关数据信息",
       active: 0,
       // 投注页是否打开
-      isWindow:false,
+      isWindow: false,
       // isIphone: false,//是否ios
       // isAndroid: false,//是否Android
       show: false, //是否显示模态框
       satatus: true,
       isAll: true,
-      Single: ""
+      Single: "",
+      timers : true
     };
   },
   methods: {
@@ -152,22 +165,22 @@ export default {
               return false;
             }
             this.list = res.data.data;
-            let arrayData =[];
+            let arrayData = [];
             let key = Object.keys(res.data.data.p_code_array);
             let values = Object.values(res.data.data.p_code_array);
             this.isShow = true;
             this.key = ["所有盘口"];
             key.forEach((e, index) => {
               this.key.push(values[index]);
-              let stripData=[] ;
-              res.data.data.oddsData.forEach((data) => {
-                if(data.p_code == e){
+              let stripData = [];
+              res.data.data.oddsData.forEach(data => {
+                if (data.p_code == e) {
                   stripData.push(data);
                 }
                 arrayData[index] = stripData;
               });
             });
-            this.list.oddsData =arrayData
+            this.list.oddsData = arrayData;
             this.$store.dispatch("GETGAMERATIO", this.list);
             console.log("数据源", arrayData);
           }
@@ -180,7 +193,7 @@ export default {
     check(index, match_id) {
       this.show = false;
       if (this.list.match_id == match_id) return false;
-      this.$store.dispatch("MACTH_ID",match_id);
+      this.$store.dispatch("MACTH_ID", match_id);
       this.getAjax(this.gameCode, match_id);
     },
     /**
@@ -228,7 +241,7 @@ export default {
    * 计算属性
    */
   computed: {
-     IsWindow() {
+    IsWindow() {
       return this.$store.getters.getIsBetting;
     }
   },
@@ -243,12 +256,22 @@ export default {
   },
 
   mounted() {
+    let _this = this;
+    this.$public.ajaxTimerFun(function(timing) {
+      _this.getAjax(_this.gameCode, _this.match_id);
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
     this.match_id = this.$store.getters.getMatchId;
     this.getAjax(this.gameCode, this.match_id);
-     if(this.$store.getters.getIsBetting){
-      this.isWindow=true
+    if (this.$store.getters.getIsBetting) {
+      this.isWindow = true;
     }
   },
+  beforeDestroy() {
+    this.timers = false;
+  },
   components: {
     Corner,
     Goal,
@@ -269,6 +292,31 @@ export default {
 </script>
 
 <style scoped>
+/* 头部 */
+.Serch {
+  height: 0.88rem;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  background: linear-gradient(to bottom, #6a6a6a, #565656);
+  color: #f76649;
+  font-family: "PingFang-SC-Regular";
+  padding: 0 0.33rem;
+}
+.returnimg {
+  width: 0.37rem;
+  height: 0.3rem;
+  margin-right: 0.1rem;
+}
+.Soccer-game-title {
+  height: 0.88rem;
+  font-size: 0.3rem;
+}
+.Soccer-game-box {
+  height: 0.88rem;
+  /* padding: 0 0.32rem; */
+  background-color: #626262;
+}
 .gambling {
   background: #f8f8f8;
 }
@@ -280,7 +328,7 @@ export default {
   align-items: center;
   flex-wrap: nowrap;
   border-bottom: 1px solid #e4e4e4;
-  background: linear-gradient(to top, #FFE9C9, #FFF3E2);
+  background: linear-gradient(to top, #ffe9c9, #fff3e2);
 }
 .leagueMatch div {
   font-size: 0.28rem;

二進制
vue_sports/.svn/pristine/dd/dd774e626ba5e641b5c457b1b5c68083977f640e.svn-base


+ 31 - 18
vue_sports/.svn/pristine/9b/9b8e0cb9da34de48363d862dd8403386d4743adf.svn-base → vue_sports/.svn/pristine/e4/e4e522cb7b21ed8b33cc3c7a9ef35c0c52b0e865.svn-base

@@ -43,7 +43,8 @@ export default {
       zqCondition: false,
       bqCondition: false,
       wqCondition: false,
-      lqCondition: false
+      lqCondition: false,
+      timers : true // 定时器开关
     };
   },
   methods: {
@@ -67,22 +68,14 @@ export default {
         this.noData = false;
     
       }
-    }
-  },
-  components: {
-    BasketballBlock,
-    Tennis,
-    Loading,
-    NotOpend
-  },
-  mounted() {
-    //   获取条数。。
-
+    },
+    getAjax(){
+      
     this.$http.get(this.$ports.home.trollingBall).then(res => {
       console.log("zq", res);
       if (
-        res.data.status == 200 &&
-        res.data.data.length > 0 &&
+        res.data.status == 1 &&
+       res.data.data != null &&
         res.data.data.matchData.length > 0
       ) {
         this.index += res.data.data.matchData.length;
@@ -91,7 +84,6 @@ export default {
           this.index = 0;
         }
       } else {
-      
         this.zqCondition = true;
         this.noDataShow();
       }
@@ -99,7 +91,7 @@ export default {
     this.$http.get(this.$ports.home.rollingBall).then(res => {
       if (
         res.data.status == 1 &&
-        res.data.data.length > 0 &&
+       res.data.data != null &&
         res.data.data.matchData.length > 0
       ) {
         this.index += res.data.data.matchData.length;
@@ -113,7 +105,7 @@ export default {
     this.$http.get(this.$ports.home.wqrollingBall).then(res => {
       if (
         res.data.status == 1 &&
-        res.data.data.length > 0 &&
+        res.data.data != null  &&
         res.data.data.matchData.length > 0
       ) {
         this.index += res.data.data.matchData.length;
@@ -130,7 +122,7 @@ export default {
     this.$http.get(this.$ports.home.bqrollingBall).then(res => {
       if (
         res.data.status == 1 &&
-        res.data.data.length > 0 &&
+        res.data.data != null &&
         res.data.data.matchData.length > 0
       ) {
         this.index += res.data.data.matchData.length;
@@ -144,6 +136,27 @@ export default {
      
       }
     });
+    }
+  },
+  components: {
+    BasketballBlock,
+    Tennis,
+    Loading,
+    NotOpend
+  },
+  mounted() {
+    //   获取条数。。
+    this.getAjax();
+    let _this = this;
+        this.$public.ajaxTimerFun(function(timing){
+       _this.getAjax();
+      if (!_this.timers){
+      clearInterval(timing);
+    }
+    })
+  },
+  beforeDestroy(){
+    this.timers = false;
   }
 };
 </script>

+ 17 - 8
vue_sports/.svn/pristine/8f/8f507ab1cd2499eeec44584b2b811d5ae3b26291.svn-base → vue_sports/.svn/pristine/e8/e8a2ba0ad29b6130fb572e36356fefdaea8e6164.svn-base

@@ -11,7 +11,7 @@
                   <div
                     class="The-club-box row center"
                     :class="item.isTrue== true ? 'active' : ''"
-                    @click="bettingBtn(item.id,item.condition,item.odds)"
+                    @click="bettingBtn(item.id,home_team,item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                   >
                     <span>{{item.odds}}</span>
                   </div>
@@ -23,7 +23,7 @@
                   <div
                     class="The-club-box row center"
                     :class="item.isTrue== true ? 'active ' : ''"
-                    @click="bettingBtn(item.id,item.condition,item.odds)"
+                    @click="bettingBtn(item.id,guest_team,item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                   >
                     <span>{{item.odds}}</span>
                   </div>
@@ -35,7 +35,7 @@
                   <div
                     class="The-club-box row center"
                     :class="item.isTrue== true ? 'active' : ''"
-                    @click="bettingBtn(item.id,item.condition,item.odds)"
+                    @click="bettingBtn(item.id,'和局',item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                   >
                     <span>{{item.odds}}</span>
                   </div>
@@ -56,7 +56,7 @@
                   <div
                     class="The-club-box row center"
                     :class="item.isTrue== true ? 'active' : ''"
-                    @click="bettingBtn(item.id,item.condition,item.odds)"
+                    @click="bettingBtn(item.id,home_team,item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                   >
                     <span>{{item.odds}}</span>
                   </div>
@@ -68,7 +68,7 @@
                   <div
                     class="The-club-box row center"
                     :class="item.isTrue== true ? 'active ' : ''"
-                    @click="bettingBtn(item.id,item.condition,item.odds)"
+                    @click="bettingBtn(item.id,guest_team,item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                   >
                     <span>{{item.odds}}</span>
                   </div>
@@ -80,7 +80,7 @@
                   <div
                     class="The-club-box row center"
                     :class="item.isTrue== true ? 'active' : ''"
-                    @click="bettingBtn(item.id,item.condition,item.odds)"
+                    @click="bettingBtn(item.id,'和局',item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                   >
                     <span>{{item.odds}}</span>
                   </div>
@@ -101,6 +101,7 @@ export default {
     return {
       title: "capot",
       home_team: " ",
+      match_id:'',
       guest_team: " ",
       data: [],
       isDisplay: "", //是否显示
@@ -110,7 +111,8 @@ export default {
   },
   methods: {
     //玩法投注
-    bettingBtn(id, name, odds, condition = "", bettingTime = "") {
+    bettingBtn(id, name, odds,odds_only,p_code,match_id,condition = "", bettingTime = "") {
+      console.log(this.data)
       let _this = this;
       let bettingInfo = {
         id,
@@ -118,10 +120,14 @@ export default {
         guest_team: this.guest_team,
         name,
         odds,
+         ballId:this.$store.getters.getBallId,
         condition,
         ganame: this.title,
         score: this.score,
-        bettingTime
+        bettingTime,
+        odds_only,
+        p_code,
+        match_id,
       };
       //调用玩法投注公共方法
       this.$public.bettingFunction(
@@ -168,7 +174,10 @@ export default {
   },
   watch: {
     getUserIcons(val) {
+      this.match_id=val.match_id
+       console.log(val,'val')
       if (!val) return false;
+     
       this.home_team = val.home_team;
       this.guest_team = val.guest_team;
       val.oddsData.forEach(res => {

二進制
vue_sports/.svn/pristine/eb/eb1c409330d9b8d8b26521d24dd976be51c7d053.svn-base


二進制
vue_sports/.svn/pristine/ee/ee30baedad4744a4c4810d2f28ba1b20ff117c6e.svn-base


+ 20 - 2
vue_sports/.svn/pristine/1e/1e452285fb75ad50fc96cd23b55d39ae5b01ab0e.svn-base → vue_sports/.svn/pristine/f0/f0a5cee4834b60eb6ef7ea1e1eadb080891de773.svn-base

@@ -121,7 +121,8 @@ export default {
       thisNum: 10000,
       info: "没有相关联赛信息",
       noData: false, //没有数据为true
-      betting: 10000 //vuex里面玩法投注数据
+      betting: 10000, //vuex里面玩法投注数据
+      timers : true
     };
   },
   components: {
@@ -196,6 +197,7 @@ export default {
         name,
         odds,
         condition,
+        ballId:this.$store.getters.getBallId,
         ganame: "concede_size",
         score: this.score,
         bettingTime: ""
@@ -307,7 +309,9 @@ export default {
             if (this.betting != 10000) {
               this.betting.forEach(e => {
                 if (val.id == e.id) {
-                  val.isTrue = true;
+                  this.$set(val,'isTrue',true)
+                  console.log('我要的值',val)
+                  // val.isTrue = true;
                   //this.$set(val,'isTrue',true);
                 }
               });
@@ -358,15 +362,18 @@ export default {
     },
     // 监听删除投注
     getDeleteType(val) {
+      console.log('删除',val)
       let flag = true;
       this.data.forEach(e => {
         if (val == "all") {
           e.match_info.forEach(data => {
             data.oddsData.forEach((k, i) => {
+              console.log('123')
               this.$set(k, "isTrue", false);
             });
           });
         } else {
+          console.log('aaaaa')
           e.match_info.forEach((res, index) => {
             res.oddsData.every((k, i) => {
               if (k.id == val) {
@@ -405,9 +412,20 @@ export default {
         }
       });
     }
+    let _this = this;
+    
+          this.$public.ajaxTimerFun(function(timing) {
+     _this.getmatchInfo("");
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
     console.log("data", this.data);
     /*-----------------------*/
     this.getmatchInfo("");
+  },
+  beforeDestroy(){
+    this.timers = false;
   }
 };
 </script>

+ 46 - 33
vue_sports/.svn/pristine/12/121285f46911f0098e1c6c253d8ed3839ebcf9fc.svn-base → vue_sports/.svn/pristine/f2/f290f80e76d92fd9a65673c14a67404146da4273.svn-base

@@ -65,7 +65,7 @@ export default {
   name: "SportsHead",
   data() {
     return {
-      show: this.$store.state.isShow,
+      show: false,
       indeximg: this.$route.query.home ? false : true,
       img1: require("../assets/st-imges/home.png"),
       img2: require("../assets/st-imges/gengduo-1.png"),
@@ -73,15 +73,47 @@ export default {
       active: this.$route.query.number,
       init: true,
       nameShow:false, //展示登录组件或者是名字
+      timers:true, //定时器清理
     };
   },
   methods: {
     isshow() {
       let isShow = true;
       this.$store.dispatch("GET_ISSHOW", isShow);
-      
       console.log('这是我要的结果',this.$store.state.isShow)
     },
+    // 数据封装
+    getAjax(){
+          this.$store.dispatch("GETSHOW", true);
+    this.$http.get(this.$ports.home.navTypeList).then(res => {
+      console.log('res',res)
+      if (res.data.status == 1) {
+        this.title = res.data.data;
+       
+        for(var i = 0; i < this.title.length; i++){
+          if(sessionStorage.getItem('activity')){
+            if(sessionStorage.getItem('activity') == this.title[i][0].type_code){
+  
+              if(this.indeximg == true){
+                // console.log("!")
+                 this.active = this.$route.query.number
+              }else if(this.$route.query.hmsts){
+                this.active = 0;
+                // console.log("2")
+              }else if(this.$route.query.scroll){
+                // console.log("scroll")
+              }
+              else{
+                 this.active = i;
+              }
+   
+            }
+          }
+        }
+         this.$store.dispatch("GETSHOW", false);
+      }
+    });
+    },
     /**
      * 头部导航
      */
@@ -122,38 +154,19 @@ export default {
     }else{
       this.nameShow = false;
     }
-    this.$store.dispatch("GETSHOW", true);
-    this.$http.get(this.$ports.home.navTypeList).then(res => {
-      console.log('res',res)
-      if (res.data.status == 1) {
-        this.title = res.data.data;
-       
-        for(var i = 0; i < this.title.length; i++){
-          if(sessionStorage.getItem('activity')){
-            if(sessionStorage.getItem('activity') == this.title[i][0].type_code){
-  
-              if(this.indeximg == true){
-                // console.log("!")
-                 this.active = this.$route.query.number
-              }else if(this.$route.query.hmsts){
-                this.active = 0;
-                // console.log("2")
-              }else if(this.$route.query.scroll){
-                // console.log("scroll")
-              }
-              else{
-                 this.active = i;
-              }
-   
-            }
-          }
-        }
-         this.$store.dispatch("GETSHOW", false);
-      }
-    });
-
+    this.getAjax();
+    let _this =this;
+    this.$public.ajaxTimerFun(function(timing){
+     _this.getAjax();
+      if (!_this.timers){
+      clearInterval(timing);
+    }
+    })
   },
-
+  
+  beforeDestroy(){
+    this.timers = false;
+  }
 };
 </script>
 <style  scoped>

+ 1022 - 0
vue_sports/.svn/pristine/f3/f3258ab4ec5a62f0e802c91815ff41f6eae7514b.svn-base

@@ -0,0 +1,1022 @@
+<template>
+  <div>
+    <div v-if="noData">
+      <NotOpend :title="this.info"/>
+    </div>
+    <!-- 让球&大小 -->
+    <div class="match" v-if="isShow && rShow">
+      <div v-for="(items,$index) in letBallData" :key="items.id" class="mg">
+        <!-- <div v-for="items in list[index]" :key="items.id"> -->
+        <div class="row allAlignment haderBox center">
+          <span>{{items.leagueName}}</span>
+          <div class="row Match-title-num">
+            <span>{{items.matchNum}}</span>
+          </div>
+        </div>
+        <div class="Match-box">
+          <div
+            v-for="(itemList,index) in items.matchData"
+            :key="itemList.id"
+            @click="matchInfo(itemList.match_id)"
+          >
+            <div class="row allAlignment Match-box-top">
+              <div class="Match-box-top-left">
+                <span>{{itemList.match_process}}</span>
+                <span class="texttop" v-if="activity == 'StRollBall'">{{itemList.a_time}}</span>
+                <span class="texttop" v-if="activity == 'StSoon'">{{itemList.wait_time}}分钟</span>
+              </div>
+              <div class="Match-box-top-right row">
+                <span style="margin-right: .1rem;" class="Match-box-top-num">{{itemList.tag}}</span>
+                <span style="margin-right: .1rem;">让球</span>
+                <span style="margin-right: .1rem;">大小</span>
+              </div>
+            </div>
+            <div class="row allAlignment center listbox">
+              <div class="column average name-box">
+                <div class="box noBox row item-center main-box">
+                  <span
+                    v-if="itemList.home_score == '0' || itemList.home_score"
+                    class="num-box"
+                    style="color:#eb921e"
+                  >{{itemList.home_score}}</span>
+                  <span v-else style="color:#eb921e">{{itemList.home_score}}</span>
+
+                  &nbsp;&nbsp;{{itemList.home_team}}
+                </div>
+                <div class="box noBox row item-center main-box">
+                  <span
+                    v-if="itemList.guest_score"
+                    class="num-box"
+                    style="color:#eb921e"
+                  >{{itemList.guest_score}}</span>
+                  <span v-else style="color:#eb921e">{{itemList.guest_score}}</span>
+                  &nbsp;&nbsp;{{itemList.guest_team}}
+                </div>
+              </div>
+              <div class="Match-list-box row item-center average">
+                <!-- <div v-for="(odds,i) in itemList.oddsData[0]" :key="odds.id" class="match-list">
+                    <div
+                      @click.stop="isclick(index,i)"
+                      class="column center"
+                      :class="items.istrue == i ?'active':''"
+                    >
+                      <span style="color:#FD8F26">{{odds.condition}}</span>
+                      <span>{{odds.odds}}</span>
+                    </div>
+                </div>-->
+                <div class="Match-bottom-right">
+                  <!-- 主队 -->
+                  <div class="row">
+                    <div
+                      class="Match-list-left"
+                      v-for="(items,indexs) in itemList.oddsData[0].homeOdds"
+                      :key="indexs"
+                      @click.stop="isBetting($index,items.id,itemList.home_team,itemList.guest_team,itemList.home_team,items.odds,items.condition,items.odds_only,'homeOdds')"
+                    >
+                      <div :class="{ 'active' : items.isTrue == true}" class="column center">
+                        <span style="color:#FD8F26">{{items.condition}}</span>
+                        <span>{{items.odds}}</span>
+                      </div>
+                    </div>
+                  </div>
+                  <!-- 客队 -->
+                  <div class="row">
+                    <div
+                      class="Match-list-right row"
+                      v-for="(items,indexs) in itemList.oddsData[0].guestOdds"
+                      :key="indexs"
+                      @click.stop="isBetting($index,items.id,itemList.home_team,itemList.guest_team,itemList.guest_team,items.odds,items.condition,items.odds_only,'guestOdds')"
+                    >
+                      <div :class="{'active':items.isTrue==true}" class="column center">
+                        <span>
+                          <i style="color:#FD8F26">{{items.condition}}</i>
+                        </span>
+                        <span>{{items.odds}}</span>
+                      </div>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <!-- 1x2 -->
+    <div v-if="!isShow && !ishow && rShow">
+      <div v-for="(item,index) in letBallData" :key="item.id" @click="bettingChange()">
+        <div class="row allAlignment haderBox center">
+          <span>{{item.leagueName}}</span>
+          <div class="Match-title-num">
+            <span>{{item.matchNum}}</span>
+          </div>
+        </div>
+        <div
+          v-for="(itemList,$index) in item.matchData"
+          :key="itemList.id"
+          @click="matchInfo(itemList.match_id)"
+        >
+          <div class="box noPd">
+            <div class="row allAlignment item-center top-box">
+              <span>
+                <i>{{itemList.match_process}}</i>
+                 <span class="texttop" v-if="activity == 'StRollBall'">{{itemList.a_time}}</span>
+                <span class="texttop" v-if="activity == 'StSoon'">{{itemList.wait_time}}分钟</span>
+                <!-- <b style="color:#F76649;font-weight: normal;">{{itemList.a_time}}</b> -->
+              </span>
+              <span class="top-num">{{itemList.tag}}</span>
+            </div>
+          </div>
+          <div class="box-bottom">
+            <div class="box row item-center main-box">
+              <span
+                v-if="itemList.home_score == '0' || itemList.home_score"
+                class="num-box"
+                style="color:#eb921e"
+              >{{itemList.home_score}}</span>
+              <span v-else style="color:#eb921e">{{itemList.home_score}}</span>
+              &nbsp;&nbsp;{{itemList.home_team}}
+            </div>
+            <div class="box row item-center main-box">
+              <span
+                v-if="itemList.guest_score"
+                class="num-box"
+                style="color:#eb921e"
+              >{{itemList.guest_score}}</span>
+              <span v-else style="color:#eb921e">{{itemList.guest_score}}</span>
+              &nbsp;&nbsp;{{itemList.guest_team}}
+            </div>
+            <div class="footBox">
+              <div
+                class="box row allAlignment bottom-box center"
+                v-for="(odds,idx) in itemList.oddsData[1]"
+                :key="odds.id"
+              >
+                <div
+                  class="item-center bottom-num"
+                  :class="item.istrueA==true?'active':''"
+                  @click.stop="isClick(idx,1)"
+                >
+                  <p style="color:#eb921e">{{odds.condition}}</p>
+                  <p>{{odds.odds}}</p>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <!-- 独赢盘 -->
+    <div class="match" v-if="!isShow && ishow && rShow">
+      <div v-for="(items,index) in letBallData" :key="items.id" class="mg">
+        <!-- <div v-for="items in list[index]" :key="items.id"> -->
+        <div class="row allAlignment letBallBox center">
+          <span>{{items.leagueName}}</span>
+          <div class="row Match-title-num">
+            <span>{{items.matchNum}}</span>
+          </div>
+        </div>
+        <div class="Match-box">
+          <div
+            v-for="(itemList,index) in items.matchData"
+            :key="itemList.id"
+            class="Match-box"
+            @click="matchInfo(itemList.match_id)"
+          >
+            <div class="row allAlignment Match-box-top">
+              <div class="Match-box-top-left">
+                <!-- <span>{{itemList.match_date}}</span>
+                <span class="texttop">{{itemList.match_time}}</span> -->
+                 <span class="texttop" v-if="activity == 'StRollBall'">{{itemList.a_time}}</span>
+                <span class="texttop" v-if="activity == 'StSoon'">{{itemList.wait_time}}分钟</span>
+              </div>
+              <div class="Match-box-top-right row">
+                <span style="margin-right: .1rem;" class="Match-box-top-num">{{itemList.tag}}</span>
+                <!-- <span style="margin-right: .1rem;">让球</span> -->
+                <span style="margin-right: .1rem;">独赢盘</span>
+              </div>
+            </div>
+            <div class="row allAlignment center listbox">
+              <div class="column average name-box">
+                <div>{{itemList.home_team}}</div>
+                <div>{{itemList.guest_team}}</div>
+              </div>
+              <div class="Match-list-box row item-center average">
+                <div v-for="(odds,i) in itemList.oddsData[0]" :key="odds.id" class="match-list">
+                  <div
+                    @click.stop="isclick(index,i)"
+                    class="column center"
+                    :class="items.istrue==i?'active':''"
+                  >
+                    <span style="color:#FD8F26">{{odds.condition}}</span>
+                    <span>{{odds.odds}}</span>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <!-- 如过是网球则显示 -->
+    <div class="match" v-if="isShow && !rShow">
+      <div v-for="(items,index) in letBallData" :key="items.id" class="mg">
+        <!-- <div v-for="items in list[index]" :key="items.id"> -->
+        <div class="row allAlignment letBallBox center">
+          <span>{{items.leagueName}}</span>
+          <div class="row Match-title-num">
+            <span>{{items.matchNum}}</span>
+          </div>
+        </div>
+        <div class="Match-box">
+          <div
+            v-for="(itemList,index) in items.matchData"
+            :key="itemList.id"
+            class="Match-box"
+            @click="matchInfo(itemList.match_id)"
+          >
+            <div class="row allAlignment Match-box-top">
+              <div class="Match-box-top-left">
+                <!-- <span>{{itemList.match_date}}</span> -->
+                <!-- <span class="texttop">{{itemList.wait_time}}分钟</span> -->
+                 <span class="texttop" v-if="activity == 'StRollBall'">{{itemList.a_time}}</span>
+                <span class="texttop" v-if="activity == 'StSoon'">{{itemList.wait_time}}分钟</span>
+              </div>
+              <div class="Match-box-top-right row">
+                <span style="margin-right: .1rem;" class="Match-box-top-num">{{itemList.tag}}</span>
+                <span style="margin-right: .1rem;">独赢盘</span>
+                <span style="margin-right: .1rem;">让盘</span>
+              </div>
+            </div>
+            <div class="row allAlignment center listbox">
+              <div class="column average name-box">
+                <div>{{itemList.home_team}}</div>
+                <div>{{itemList.guest_team}}</div>
+              </div>
+              <div class="Match-list-box row item-center average">
+                <div v-for="(odds,i) in itemList.oddsData[0]" :key="odds.id" class="match-list">
+                  <div
+                    @click.stop="isclick(index,i)"
+                    class="column center"
+                    :class="items.istrue ? 'active':''"
+                  >
+                    <span style="color:#FD8F26">{{odds.condition}}</span>
+                    <span>{{odds.odds}}</span>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="BettingWindow" v-if="isWindow">
+      <BettingWindow/>
+    </div>
+  </div>
+</template>
+<script>
+import Bus from "../assets/bus.js";
+import NotOpend from "@/components/StNotOpend";
+import BettingWindow from "@/components/StBettingWindow";
+export default {
+  props: ["gameCode", "name", "ishow"],
+  components: { NotOpend, BettingWindow },
+  data() {
+    return {
+      show: false, //暂时状态
+      isShow: true,
+      noData: true, //显示暂无数据
+      rShow: true, //是否为棒球与网球,是则不显示
+      info: "没有相关比赛信息",
+      status: false,
+      isWindow: false, //投注组件隐藏
+      isAjax: false, //开关
+      list: [],
+      letBallData: [], //让球大小和1X2数据
+      timers: true,
+      activity:'',
+      betting: 10000, //vuex里面玩法投注数据
+      thisNum: 10000, //vuex里面
+      index: '',
+    };
+  },
+  /**
+   * 函数方法
+   */
+  methods: {
+    matchInfo(id) {
+      this.$router.push({
+        path: "/StRollBallBettingPage",
+        query: {
+          gameCode: this.$store.getters.getBallId,
+          number: 1,
+          home: true,
+          name:this.name
+        }
+      });
+      this.$store.dispatch("MACTH_ID", id);
+    },
+    //打开联赛投注页面
+    goMatchInfo: function(leagueId, sessionId) {
+      //console.log(leagueId, sessionId);
+      this.$store.dispatch("GETSHOW", true);
+      Bus.$on("show", data => {
+        this.isShow = data;
+      });
+    },
+    getAjax: function(game_code, type_code) {
+      this.$store.dispatch("GETSHOW", true);
+      if (!game_code || !type_code) return false;
+      this.$http
+        .get(this.$ports.match.matchState, {
+          game_code,
+          type_code
+        })
+        .then(res => {
+          this.isAjax = true;
+          if (
+            res.data.status == 1 &&
+            res.data.data.length > 0 &&
+            res.data != null
+          ) {
+            this.letBallData = res.data.data;
+            // console.log('  this.letBallData', res)
+            this.noData = false;
+            for (var i = 0; i < res.data.data.length; i++) {
+      
+
+              if (
+                res.data.data[i].matchData &&
+                res.data.data[i].matchData.length < 1
+              ) {
+              } else if (
+                res.data.data[i].matchData &&
+                res.data.data[i].matchData.length > 0
+              ) {
+                this.dataGroup(res.data.data[i], i);
+              }
+              //
+            }
+          } else {
+            //  是否显示组件
+            this.noData = true;
+            //console.log('data',this.noData)
+            // 每次更新数据没有数据时则置空。
+            this.letBallData = [];
+          }
+          // 状态值数据更改
+          this.$store.dispatch("GETSHOW", false);
+        
+        });
+        if(this.activity == 'StRollBall'){
+          let _this = this;
+           console.log('111',this.letBallData)
+          _this.letBallData.forEach(val => {
+            console.log('val',val)
+            val.matchData.forEach(e =>{
+            console.log('110', e.a_time)
+                 let [f, s] = e.a_time.split(":");
+              if (e.a_time != "") {
+              let [f, s] = e.a_time.split(":");
+              this.$public.timer(f, s, function(f, s) {
+                e.a_time = f + ":" + s;
+              });
+            }
+            })
+            
+          });
+     
+        }
+    },
+    /*--------------------------------------------------------------------------------*/
+    // 添加、删除vuex投注数据公共方法
+    AddDelete: function(id, home, guest, name, odds, condition, odds_only) {
+      let isAdd = true;
+      let bettingInfo = {
+        id,
+        home_team: home,
+        guest_team: guest,
+        name,
+        odds,
+        condition,
+        ganame: "concede_size",
+        score: this.score,
+        bettingTime: "",
+        odds_only
+      };
+      let matchList = this.$store.getters.getBetting;
+      if (this.thisNum != 10000) {
+        //删除vuex投注数据
+        matchList[this.thisNum].data.forEach((res, index) => {
+          if (res.id == id) {
+            matchList[this.thisNum].data.splice(index, 1);
+            this.$store.dispatch("BETTING", matchList);
+            isAdd = false;
+          }
+        });
+        //添加vuex投注数据
+        if (isAdd) {
+          matchList[this.thisNum].data.push(bettingInfo);
+          this.$store.dispatch("BETTING", []);
+          this.$store.dispatch("BETTING", matchList);
+          if (this.$store.getters.getIsBetting) return false;
+          this.$store.dispatch("ISBETTING", true);
+        }
+      } else {
+        //添加新的玩法赔率数据
+        let obj = {
+          title: "concede_size",
+          data: [bettingInfo]
+        };
+        //判断vuex有误其它玩法数据
+        if (matchList) {
+          matchList.push(obj);
+        } else {
+          this.$store.dispatch("BETTING", [obj]);
+        }
+      }
+      // console.log(this.$store.getters.getIsBetting);
+      if (this.$store.getters.getIsBetting) return false;
+      this.$store.dispatch("ISBETTING", true);
+    },
+
+    /*--------------------------------------------------------------------------------*/
+    //修改当前页面样式公共方法
+    modifyStyle: function($index,id, type) {
+      // console.log(id, type);
+      this.letBallData[$index].matchData.every(e => {
+        let ret = false;
+        if (type == "homeOdds") {
+          e.oddsData[0].homeOdds.every((res, index) => {
+            if (res.id == id) {
+              this.$set(
+                e.oddsData.homeOdds[index],
+                "isTrue",
+                res.isTrue ? false : true
+              );
+              ret = true;
+              return false;
+            }
+            return true;
+          });
+        } else if (type == "guestOdds") {
+          e.oddsData[0].guestOdds.every((res, index) => {
+            if (res.id == id) {
+              this.$set(
+                e.oddsData[0].guestOdds[index],
+                "isTrue",
+                res.isTrue ? false : true
+              );
+              ret = true;
+              return false;
+            }
+            return true;
+          });
+        }
+        if (ret) {
+          return false;
+        } else {
+          return true;
+        }
+      });
+    },
+    /*--------------------------------------------------------------------------------*/
+    // 修改投注样式
+    isBetting($index,id, home, guest, name, odds, condition, odds_only, type) {
+      this.index = $index;
+      console.log(this.letBallData);
+      if (this.letBallData) {
+        //处理vuex里面数据
+        this.AddDelete(id, home, guest, name, odds, condition, odds_only);
+        //处理当前页面样式
+        this.modifyStyle($index,id, type);
+      }
+    },
+
+    dataGroup: function(data, i) {
+      let homeOdds = [],
+        guestOdds = [];
+      let A, B, C, D;
+      // console.log('aaaaaa',data)
+      data.matchData.forEach((column, index) => {
+        if (column.oddsData[0] == null || column.oddsData[0].length == 0) {
+          column.oddsData[0] = {
+            homeOdds: [{ status: -1 }, { status: -1 }],
+            guestOdds: [{ status: -1 }, { status: -1 }]
+          };
+        } else {
+          column.oddsData[0].forEach(val => {
+            if (this.betting != 10000) {
+              this.betting.forEach(e => {
+                if (val.id == e.id) {
+                  val.isTrue = true;
+                  //this.$set(val,'isTrue',true);
+                }
+              });
+            }
+            if (val.odds_code == "concede_home") {
+              A = val;
+            } else if (val.odds_code == "size_home") {
+              B = val;
+            } else if (val.odds_code == "concede_guest") {
+              C = val;
+            } else if (val.odds_code == "size_guest") {
+              D = val;
+            }
+          });
+          column.oddsData[0] = {};
+          column.oddsData[0].homeOdds = [];
+          column.oddsData[0].homeOdds.push(A);
+          column.oddsData[0].homeOdds.push(B);
+          column.oddsData[0].guestOdds = [];
+          column.oddsData[0].guestOdds.push(C);
+          column.oddsData[0].guestOdds.push(D);
+        }
+      });
+
+      this.letBallData[i] = data;
+      // console.log("data", this.letBallData);
+    },
+    isClick() {
+      if (this.$store.getters.getIsBetting == true) {
+        return false;
+      }
+
+      this.$store.dispatch("ISBETTING", true);
+      // this.$set(this.letBallData.matchData[1].oddsData[1][i], "istrue", (this.letBallData.list[i].istrue = num));
+    },
+    bettingChange() {
+      this.isWindow = true;
+    },
+    // 点击事件确认选中
+    isclick(index, num) {
+      console.log(this.letBallData);
+      if (this.$store.getters.getIsBetting == true) {
+        return false;
+      }
+
+      this.$store.dispatch("ISBETTING", true);
+    }
+  },
+  /**
+   * 计算属性
+   */
+  computed: {
+    getInfo: function() {
+      // 监听vuex状态值的改变
+      this.goMatchInfo();
+
+      return {
+        game_code: this.$store.getters.getBallId,
+        type_code: this.$store.getters.getActivity
+      };
+    },
+    IsWindow: function() {
+      return this.$store.getters.getIsBetting;
+    },
+    // 获取滚动状态
+    getscorllcode() {
+      return this.$public.getCache("box_size");
+    },
+    getBetting() {
+      return this.$store.getters.getBetting;
+    },
+    //获取投注框删除的投注信息
+    getDeleteType() {
+      return this.$store.getters.getDeleteType;
+    },
+    getActivity:function(){
+      return  this.$store.getters.getActivity;
+    }
+  },
+  watch: {
+    getActivity(val){
+      this.activity = val;  
+    },
+    getInfo(obj) {
+      if (
+        this.$store.getters.getActivity == "StSoon" ||
+        this.$store.getters.getActivity == "StRollBall"
+      ) {
+        if (this.isAjax) {
+          this.getAjax(obj.game_code, obj.type_code);
+        }
+      }
+      if (obj.game_code == "wq") {
+        this.rShow = false;
+      } else {
+        this.rShow = true;
+      }
+    },
+    /*--------------------------------------------------------------------------------*/
+    // 监听投注框开关
+    IsWindow(val) {
+      console.log(val);
+      this.isWindow = val;
+    },
+    // 监听滚动状态变化赋值滚动
+    getscorllcode(val) {
+      this.scorll = val;
+    },
+    getDeleteType(val) {
+      let flag = true;
+      // 下标问题
+      this.letBallData.matchData.forEach(e => {
+        if (val == "all") {
+          e.oddsData.guestOdds.forEach(data => {
+            this.$set(data, "isTrue", false);
+          });
+          e.oddsData.homeOdds.forEach(data => {
+            this.$set(data, "isTrue", false);
+          });
+        } else {
+          let showData = true;
+          e.oddsData.guestOdds.forEach(data => {
+            if (data.id == val) {
+              this.$set(data, "isTrue", false);
+              showData = false;
+            }
+          });
+          if (showData) {
+            e.oddsData.homeOdds.forEach(data => {
+              if (data.id == val) {
+                this.$set(data, "isTrue", false);
+              }
+            });
+          }
+        }
+      });
+    },
+    /*--------------------------------------------------------------------------------*/
+    //获取已投注信息
+    getBetting(val) {
+      //获取vuex玩法已投注相对应的数据
+      if (val) {
+        val.forEach((e, index) => {
+          if ("concede_size" == e.title) {
+            this.thisNum = index;
+            this.betting = e.data;
+          }
+        });
+      }
+    },
+
+    /*--------------------------------------------------------------------------------*/
+  },
+  mounted() {
+    this.activity =  this.$store.getters.getActivity;
+    let _this = this;
+      // 获取是否滑动信息
+    if (this.$public.getCache("box_size") == 1) {
+      this.isshrink = true;
+    }
+    //是否展示投注框
+    if (this.$store.getters.getIsBetting) {
+      this.isWindow = true;
+    }
+    //获取vuex玩法已投注相对应的数据
+    let getBetting = this.$store.getters.getBetting;
+    if (getBetting) {
+      getBetting.forEach((e, index) => {
+        if ("concede_size" == e.title) {
+          this.thisNum = index;
+          this.betting = e.data;
+        }
+      });
+    }
+
+
+
+    this.$public.ajaxTimerFun(function(timing) {
+      _this.getAjax(
+        _this.$store.getters.getBallId,
+        _this.$store.getters.getActivity
+      );
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
+    this.getAjax(
+      this.$store.getters.getBallId,
+      this.$store.getters.getActivity
+    );
+  },
+  beforeDestroy() {
+    this.timers = false;
+  }
+};
+</script>
+<style scoped>
+.yd-cell-box .yd-cell {
+  z-index: 99;
+  border-radius: 0.2rem;
+}
+.matchBox {
+  background: #f9f9f9;
+  padding: 0.27rem 0.34rem 0 0.32rem;
+}
+.match .tit {
+  display: flex;
+  justify-content: space-between;
+  font-size: 0.32rem;
+  margin-bottom: 0.3rem;
+}
+.match .list {
+  overflow: hidden;
+  transition: all 0.3s cubic-bezier(0.4, 0.6, 0.2, 1);
+}
+.match .list div {
+  background: #dcdcdc;
+  width: 100%;
+  height: 0.88rem;
+  padding: 0.26rem 0.56rem 0.3rem 0.3rem;
+  display: flex;
+  justify-content: space-between;
+  border-radius: 0.08rem;
+  margin-bottom: 0.12rem;
+}
+.match .list span {
+  color: #333333;
+  font-size: 0.28rem;
+}
+.match .list .num {
+  width: 0.4rem;
+  height: 0.4rem;
+  display: inline-block;
+  line-height: 0.4rem;
+  text-align: center;
+  color: #f5f5f5;
+  border-radius: 50%;
+  font-size: 0.2rem;
+  background: #f76649;
+}
+.yd-accordion {
+  background: transparent;
+}
+.match .list div:nth-last-child(1) {
+  margin-bottom: 0.34rem;
+}
+div /deep/ .yd-accordion-head,
+div /deep/ .yd-accordion-head-content,
+div /deep/ .yd-accordion-title,
+div /deep/ .yd-accordion-title-full {
+  height: 0.3rem;
+}
+div /deep/ .yd-accordion-title {
+  min-height: 0;
+  font-size: 0.28rem;
+}
+div /deep/ .yd-accordion-head {
+  margin-bottom: 0.3rem;
+  border: none;
+}
+.list-box {
+  border: 2px solid #cecece;
+  border-radius: 0.2rem;
+}
+div /deep/ .yd-accordion-head:after {
+  height: 0px;
+}
+div /deep/ .yd-accordion-head-arrow:after {
+  border: none;
+  width: 0.4rem;
+  height: 0.4rem;
+  background: url("../assets/st-imges/xiangxia.png") no-repeat;
+  background-size: 0.4rem 0.4rem;
+}
+/* 1x2 */
+.top-box {
+  height: 0.44rem;
+  /* font-size: 0.24rem;
+  background: #fff; */
+  border-bottom: 1px solid #e4e4e4;
+  padding: 0 0.32rem;
+  line-height: 0.44rem;
+  background: #dcdcdc;
+  font-size: 0.23rem;
+}
+.box-bottom {
+  /* height: 2.9rem;  */
+}
+.top-num {
+  display: inline-block;
+  width: 0.64rem;
+  height: 0.44rem;
+  line-height: 0.44rem;
+  color: #000000;
+  text-align: center;
+  background: #ebebeb;
+  font-size: 0.24rem;
+}
+.box {
+  padding: 0 0.32rem;
+  background: #fff;
+}
+.noPd {
+  padding: 0;
+}
+.noBox {
+  padding: 0;
+  background: #f8f8f8;
+}
+.Match-title-num {
+  width: 0.46rem;
+  height: 0.46rem;
+  line-height: 0.46rem;
+  text-align: center;
+  background: #f76649;
+  font-size: 0.26rem;
+  border-radius: 50%;
+  color: #e4e4e4;
+}
+.haderBox {
+  padding: 0 0.32rem;
+  height: 0.88rem;
+  font-size: 0.32rem;
+  background: #f8f8f8;
+}
+.main-box {
+  height: 0.9rem;
+  /* background: #fff; */
+  font-size: 0.28rem;
+}
+.bottom-box {
+  height: 1.1rem;
+  background: #fff;
+  font-size: 0.24rem;
+}
+.bottom-box div {
+  width: 1.07rem;
+  height: 0.76rem;
+  border: 2px solid #cecece;
+  border-radius: 0.1rem;
+  font-size: 0.24rem;
+}
+.bottom-num {
+  padding: 0.1rem;
+  text-align: center;
+}
+.active {
+  background: #f76649;
+  border: 2px solid #f76649 !important;
+}
+.active > p {
+  color: #e4e4e4 !important;
+}
+.num-box {
+  width: 0.66rem;
+  height: 0.34rem;
+  background: #f76649;
+  border-radius: 0.17rem;
+  color: #f5f5f5 !important;
+  line-height: 0.34rem;
+  text-align: center;
+}
+.footBox {
+  display: flex;
+  flex-wrap: wrap;
+  align-items: center;
+}
+.footBox .box {
+  width: 33%;
+  text-align: center;
+}
+/* 让球&大小 */
+.letBallBox {
+  padding: 0 0.32rem;
+  height: 0.88rem;
+  font-size: 0.28rem;
+  background: #f4f4f4;
+}
+
+.mg {
+  margin-bottom: 0.1rem;
+}
+.Match-title-num {
+  width: 0.46rem;
+  height: 0.46rem;
+  align-items: center;
+  justify-content: center;
+  line-height: 0.46rem;
+  text-align: center;
+  background: #f76649;
+  font-size: 0.2rem;
+  border-radius: 50%;
+  color: #f5f5f5;
+}
+
+.Match-box-top-right > span {
+  width: 1.07rem;
+  text-align: center;
+}
+.listbox {
+  padding: 0 0.32rem;
+}
+.name-box {
+  height: 1.76rem;
+  width: 3.8rem;
+}
+.Match-box-top {
+  height: 0.44rem;
+  padding: 0 0.32rem;
+  line-height: 0.44rem;
+  background: #dcdcdc;
+  font-size: 0.23rem;
+}
+.Match-box-top-num {
+  width: 0.64rem !important;
+
+  height: 0.44rem;
+  background: #ebebeb;
+  font-size: 0.24rem;
+}
+.texttop {
+  color: #f76649;
+}
+.Match-box {
+  padding-top: 0.12rem;
+  background: #f8f8f8;
+}
+.Match-list-box {
+  width: 35%;
+  height: 1.76rem;
+  flex-wrap: wrap;
+}
+.Match-list-box .match-list div {
+  width: 1.07rem;
+  height: 0.8rem;
+  border: 2px solid #cecece;
+  border-radius: 0.1rem;
+  flex-wrap: wrap;
+}
+.active {
+  background: #e4e4e4;
+}
+/* 模态框样式 */
+.BettingWindow {
+  z-index: 10000;
+  position: fixed;
+  top: 0;
+  width: 100%;
+}
+/* 后加 */
+.Match-title-num {
+  width: 0.46rem;
+  height: 0.46rem;
+  line-height: 0.46rem;
+  text-align: center;
+  background: #f76649;
+  font-size: 0.26rem;
+  border-radius: 50%;
+  color: #f5f5f5;
+}
+
+.Match-box-top-right > span {
+  width: 1.07rem;
+  text-align: center;
+}
+.name-box {
+  height: 1.76rem;
+}
+.Match-box-top {
+  height: 0.45rem;
+  line-height: 0.45rem;
+  background: #dcdcdc;
+  font-size: 0.23rem;
+  padding: 0 0.32rem;
+}
+.Match-box-top-num {
+  width: 0.64rem !important;
+  height: 0.45rem;
+  background: #ebebeb;
+  font-size: 0.24rem;
+}
+.Match-box {
+  background: #f8f8f8;
+}
+.Match-bottom-right {
+  height: 2rem;
+  padding: 0.1rem 0.1rem 0 0.14rem;
+}
+.Match-list-left div {
+  width: 1.07rem;
+  height: 0.76rem;
+  border: 1px solid #e4e4e4;
+  border-radius: 0.1rem;
+  padding: 0.1rem;
+  margin: 0.06rem 0.08rem;
+}
+.Match-list-right div {
+  width: 1.07rem;
+  height: 0.76rem;
+  border: 1px solid #e4e4e4;
+  border-radius: 0.1rem;
+  margin: 0.06rem 0.08rem;
+}
+.active {
+  background: #f76649;
+  border: none;
+  color: #e1e1df !important;
+}
+</style>

二進制
vue_sports/.svn/wc.db


+ 5 - 1
vue_sports/src/api/http.js

@@ -18,6 +18,7 @@ axios.defaults.timeout = 10000
 // let Base = 'http://g.a.cnscbv.com/'
 // 开发
 let Base = 'http://sports.5gogo.com'
+//let Base = 'http://192.168.2.113/kaiyou-dev'
 function headerUrl (url) {
   url = Base +  url
   return url
@@ -30,6 +31,7 @@ axios.interceptors.request.use(
   config => {
     // 每次发送请求之前判断是否存在token,如果存在,则统一在http请求的header都加上token,不用每次请求都手动添加
     // 即使本地存在token,也有可能token是过期的,所以在响应拦截器中要对返回状态进行判断
+   // console.log(store);
     const token = store.state.token
     token && (config.headers.Authorization = token)
     return config
@@ -40,6 +42,7 @@ axios.interceptors.request.use(
 // response 响应拦截器
 axios.interceptors.response.use(
   response => {
+  
     if (response.status === 200) {
       return Promise.resolve(response)
     } else {
@@ -48,7 +51,8 @@ axios.interceptors.response.use(
   },
   // 服务状态码不是200的情况
   error => {
-    if (error.response.status) {
+    console.log(error.response);
+    if (error.response) {
       switch (error.response.status) {
         // 401 未登录
         // 未登录则跳转登录页面,并携带当前页面的路径

+ 19 - 1
vue_sports/src/api/ports.js

@@ -31,6 +31,8 @@ export default {
       participateDtl:'/Sports/MatchList/participate_details',
       //球类比赛列表
       matchDetails:'/sports/MatchList/matchDetails',
+      // 冠军接口
+      ChampionsCup:'/Sports/MatchList/getUEFAChampions',
       //球类冠军盘口
       first:'/Sports/MatchList/first',
       // 获取赛事数据
@@ -48,7 +50,23 @@ export default {
     },
     login:{
       login:'/api/Account/login',
-      reg:'/api/Account/enroll'
+      reg:'/api/Account/enroll',
+      getAgent:'/api/Account/getAgent',
+      // 盈亏接口
+      ProfitAndLossRecord:'/api/UserBuy/moneyRecord',
+      // 中奖接口
+      prizeRecord:'/api/UserBuy/prizeRecord',
+      // 转账记录
+      getdata:'/InApi-index/getdata',
+      // 充值记录
+      rechargeRecord:'/api/UserBuy/rechargeRecord',
+      // 投注记录
+      bettingRecord:'/api/UserBuy/bettingRecord'
+
+    },
+    //玩法投注
+    betOrder:{
+      Bet:'/Api/Betorder/Bet'
     }
     
   }

+ 71 - 4
vue_sports/src/assets/publicFunction.js

@@ -1,7 +1,7 @@
 import { type } from "os";
 
 export default {
-  //数据存放到缓存
+  //数据存放到sessionStorage缓存
   setCache: function (key, val) {
     if (val instanceof Array) {
       let str = JSON.stringify(val);
@@ -11,10 +11,18 @@ export default {
     }
 
   },
-  //获取缓存数据
+  //获取缓存sessionStorage数据
   getCache: function (key) {
     return window.sessionStorage.getItem(key);
   },
+  //获取缓存localStorage数据
+  setItem: function (key,val) {
+    return localStorage.setItem(key,val);
+  },
+  //获取缓存localStorage数据
+  getItem: function (key) {
+    return localStorage.getItem(key);
+  },
 
   /**
    * 比赛时间计时器
@@ -108,7 +116,66 @@ export default {
         }
       });
     }
-  }
+  },
+  /**
+   * 接口轮询定时器
+   * @param {function} callback 定时器回调方法
+   */
+  ajaxTimerFun(callback){
+    //到计时
+    let  timing = setInterval(function(){
+      callback && callback(timing)
+    },43200000);
+    // },5000);
+  },
+
 
+  /**
+   * 复合算法
+   * @param {int} data  第几场赛事
+   * @param {array} dataList 投注赛事列表
+   */
+  betPlay(data,dataList){
+    let listLenth = dataList.length;
+
+    //赔率算法
+    let addSum =1;
+    dataList.forEach((res,index )=>{
+      //if(data >= index+1){
+        let add = addSum *(1+res.odds*1);
+        addSum =add
+      //}
+    })
+
+    //组合算法分母
+    function denominator (num){
+      let group =1;
+      for(let i = listLenth ; i >(listLenth -num);i--){
+        let add = group*i
+        group  =  add;
+      }
+      return group;
+    }
+
+    //组合算法分子
+    function molecule (num){
+      let son =1;
+      for(let i = num ; i >1;i--){
+        let add = son*i;
+        son  =  add;
+      }
+      return son;
+    }
+
+    //组合算法
+    function algorithm(data) {
+      return {
+        title:`${data}串1`,//algorithm
+        index:denominator(data)/molecule(data),
+        odds:addSum-1,
+      };
+    }    
+    return algorithm(data);
+  }
+}
 
-}

二進制
vue_sports/src/assets/st-imges/Moreandmore.png


二進制
vue_sports/src/assets/st-imges/Personalstatements.png


二進制
vue_sports/src/assets/st-imges/Securitycenter.png


二進制
vue_sports/src/assets/st-imges/Thedetail.png


二進制
vue_sports/src/assets/st-imges/Themessage.png


二進制
vue_sports/src/assets/st-imges/Thepersonaldata.png


二進制
vue_sports/src/assets/st-imges/Thereport.png


二進制
vue_sports/src/assets/st-imges/date.png


二進制
vue_sports/src/assets/st-imges/deposit.png


二進制
vue_sports/src/assets/st-imges/narrow.png


二進制
vue_sports/src/assets/st-imges/touxiang.jpg


二進制
vue_sports/src/assets/st-imges/withdrawals.png


+ 31 - 18
vue_sports/src/components/StBallDisc.vue

@@ -43,7 +43,8 @@ export default {
       zqCondition: false,
       bqCondition: false,
       wqCondition: false,
-      lqCondition: false
+      lqCondition: false,
+      timers : true // 定时器开关
     };
   },
   methods: {
@@ -67,22 +68,14 @@ export default {
         this.noData = false;
     
       }
-    }
-  },
-  components: {
-    BasketballBlock,
-    Tennis,
-    Loading,
-    NotOpend
-  },
-  mounted() {
-    //   获取条数。。
-
+    },
+    getAjax(){
+      
     this.$http.get(this.$ports.home.trollingBall).then(res => {
       console.log("zq", res);
       if (
-        res.data.status == 200 &&
-        res.data.data.length > 0 &&
+        res.data.status == 1 &&
+       res.data.data != null &&
         res.data.data.matchData.length > 0
       ) {
         this.index += res.data.data.matchData.length;
@@ -91,7 +84,6 @@ export default {
           this.index = 0;
         }
       } else {
-      
         this.zqCondition = true;
         this.noDataShow();
       }
@@ -99,7 +91,7 @@ export default {
     this.$http.get(this.$ports.home.rollingBall).then(res => {
       if (
         res.data.status == 1 &&
-        res.data.data.length > 0 &&
+       res.data.data != null &&
         res.data.data.matchData.length > 0
       ) {
         this.index += res.data.data.matchData.length;
@@ -113,7 +105,7 @@ export default {
     this.$http.get(this.$ports.home.wqrollingBall).then(res => {
       if (
         res.data.status == 1 &&
-        res.data.data.length > 0 &&
+        res.data.data != null  &&
         res.data.data.matchData.length > 0
       ) {
         this.index += res.data.data.matchData.length;
@@ -130,7 +122,7 @@ export default {
     this.$http.get(this.$ports.home.bqrollingBall).then(res => {
       if (
         res.data.status == 1 &&
-        res.data.data.length > 0 &&
+        res.data.data != null &&
         res.data.data.matchData.length > 0
       ) {
         this.index += res.data.data.matchData.length;
@@ -144,6 +136,27 @@ export default {
      
       }
     });
+    }
+  },
+  components: {
+    BasketballBlock,
+    Tennis,
+    Loading,
+    NotOpend
+  },
+  mounted() {
+    //   获取条数。。
+    this.getAjax();
+    let _this = this;
+        this.$public.ajaxTimerFun(function(timing){
+       _this.getAjax();
+      if (!_this.timers){
+      clearInterval(timing);
+    }
+    })
+  },
+  beforeDestroy(){
+    this.timers = false;
   }
 };
 </script>

+ 16 - 21
vue_sports/src/components/StBasketballBlock.vue

@@ -58,7 +58,8 @@ export default {
         name: "",
         index: ""
       },
-      data: ""
+      data: "",
+      timers:true // 定时器
     };
   },
   components: {
@@ -81,8 +82,8 @@ export default {
       this.$http.get(this.$ports.home.trollingBall).then(res => {
         console.log("这是足球",res)
           // this.sssd();
-        if (res.data.status == 1 && res.data.data.length > 0 && res.data.data.matchData.length > 0) {
-             this.isShow = true;
+        if (res.data.status == 1 && res.data.data != null && res.data.data.matchData.length > 0) {
+            this.isShow = true;
           console.log('res', res.data)
           this.data = res.data.data.matchData;
           this.titel = res.data.data.gameName;
@@ -109,7 +110,7 @@ export default {
     } else if (this.type == 2) {
       this.$store.dispatch('GETSHOW',true);
       this.$http.get(this.$ports.home.rollingBall).then(res => {
-        if (res.data.status == 1 && res.data.data.length > 0 && res.data.data.matchData.length > 0) {
+        if (res.data.status == 1 && res.data.data != null && res.data.data.matchData.length > 0) {
              this.isShow = true;
             
           
@@ -127,7 +128,7 @@ export default {
     } else if (this.type == 3) {
         this.$store.dispatch('GETSHOW',true);
       this.$http.get(this.$ports.home.bqrollingBall).then(res => {
-        if (res.data.status == 1 && res.data.data.length > 0 && res.data.data.matchData.length > 0) {
+        if (res.data.status == 1 && res.data.data != null && res.data.data.matchData.length > 0) {
              this.isShow = true;
         
           this.data = res.data.data.matchData;
@@ -143,26 +144,20 @@ export default {
         }
       });
     }
-  
-
     },
-    // sssd:function(){
-        // let time=setInterval(function (params) {
-        // console.log('可爱多'); 
-        // this.$http.get(this.$ports.home.trollingBall).then(res=>{
-        // if(res.data.status==="1"&&res.data.msg==="成功"){
-        //     // 代码
-        //   console.log('计时器',res)
-        // }else{
-        //     console.log("请求失败")
-        // }
-      // })
-    //  },5000)
-    // }
   },
   mounted() {
-   
+    let _this =this;
+    this.$public.ajaxTimerFun(function(timing){
+       _this.getAjax();
+      if (!_this.timers){
+      clearInterval(timing);
+    }
+    })
     this.getAjax();
+  },
+  beforeDestroy(){
+    this.timers = false;
   }
 };
 </script>

+ 335 - 57
vue_sports/src/components/StBettingWindow.vue

@@ -3,19 +3,18 @@
     <div class="baffleBox allBox" v-show="!newIsShrink">
       <div class="box">
         <div class="row allAlignment center">
-          <span style="color:#f8f8f8;font-size:0.24rem;">余额:0</span>
+          <span style="color:#f8f8f8;font-size:0.24rem;">余额:{{cash}}</span>
           <span style="font-size:0.28rem; color:#333333;font-weight:bold">投注单</span>
-          <span style="color:#33333;font-size:0.24rem;" @click="shrink()">
-            <img style="width:.25rem;height:.25rem" :src="img" alt>
-          </span>
+          <img style="width:.50rem;height:0.8rem" :src="img_size" alt  @click="shrink()">
+          <!-- style="color:#33333;font-size:0.24rem;" -->
         </div>
       </div>
 
       <!-- 数据列表 -->
       <div class="titleBox" v-for="(item,index) in dataList" :key="index" @click="activekey(index)">
         <div class="tilteMatch">
-          <div class="row item-center allAlignment" style="height:.5rem;padding:0 .32rem">
-            <span>{{item.ganame}}</span>
+          <div class="row item-center allAlignment" style="height:.5rem;padding-left:0.32rem">
+            <span :style="item.repeat? 'background: #f76649;':'' ">{{item.ganame}}</span>
             <span class="cancel" @click.stop="delarr(item.ganame,item.id)">
               <img style="width:.25rem;height:.25rem" :src="img" alt>
             </span>
@@ -42,7 +41,7 @@
             </span>
           </div>
           <div class>
-            <span v-if="bettingNumber[index]">{{(bettingNumber[index]*item.odds%100*100).toFixed(2)}}</span>
+            <span v-if="bettingNumber[index]">{{(bettingNumber[index]*item.odds).toFixed(2)}}</span>
             <span v-else>可赢额</span>
           </div>
         </div>
@@ -80,10 +79,13 @@
         <div class="bettingInput row item-center average">
           <div class="inputBox row allAlignment">
             <input type @click="go()" v-model="arrNumber" placeholder="投注额">
-            <span @click.stop="ClearData('all')">x</span>
+            <span class="cancel" @click.stop="ClearData('all')">
+              <img style="width:.2rem;height:.2rem" :src="img" alt>
+            </span>
+            <!-- <span @click.stop="ClearData('all')">x</span> -->
           </div>
           <div class>
-            <span v-if="arrNumber">{{arrNumber*3}}</span>
+            <span v-if="arrNumber">{{(datamMoney).toFixed(2)}}</span>
             <span v-else>可赢额</span>
           </div>
         </div>
@@ -104,26 +106,83 @@
               <div v-for=" n in 3" @click="updateNumber(n+6,'all')">
                 <button>{{n+6}}</button>
               </div>
-              <button @click="updateNumber('0',index)">0</button>
-              <button @click="updateNumber('00',index)">00</button>
+              <button @click="updateNumber('0','all')">0</button>
+              <button @click="updateNumber('00','all')">00</button>
               <button @click="delNumder('all')"style="background:rgb(247, 102, 73);font-size:.4rem;line-height:.86rem;">x</button>
             </div>
           </div>
         </div>
-        <div class="row allAlignment" style="padding:.1rem .2rem">
-          <span class="showNumberSpan">所有投注:</span>
-          <span style="font-size:0.24rem">0.00</span>
+      </div>
+      </div>
+
+      <!-- 过关投注  && compound.length > 0 -->
+      <div v-show="!repeat ">
+        <div class="row allAlignment center " style="height: 0.8rem;background: #ccc;padding: 0 0.2rem;">
+          <span>复式连串过关投注</span>
+          <img  style="width:.4rem;height:.4rem" src="../assets/st-imges/xiangxia.png" alt="">
         </div>
-        <div class="row allAlignment" style="padding:0 .2rem">
-          <span class="showNumberSpan">可赢金额:</span>
-          <span style="font-size:0.24rem;color:#F76649;">0.00</span>
+   
+        <div class="showNumber" v-for="(item,index) in compound"  @click.stop="activekey('through'+index)"  >
+          <span v-if="dataList" style="font-size:.3rem">{{item.title}}</span>
+          <div class="bettingInput row item-center average">
+            <div class="inputBox row allAlignment">
+              <input type @click="go()" v-model="arrNumber " placeholder="投注额">
+              <!-- <span @click.stop="ClearData('through')">x</span> -->
+              <span class="cancel" @click.stop="ClearData('sss')">
+                <img style="width:.2rem;height:.2rem" :src="img" alt>
+              </span>
+            </div>
+            <div class>
+              <span v-if="arrNumber">{{(datamMoney).toFixed(2)}}</span>
+              <span v-else>可赢额</span>
+            </div>
+          </div>
+          <div class="bottonBox" v-if="clickIndex=='through'+index">
+            <div class="bottonBox-num row allAlignment" style="padding:0 .2rem">
+              <div @click="additionFun(100,'through',index) ">+100</div>
+              <div @click="additionFun(1000,'through',index)">+1000</div>
+              <div @click="additionFun(10000,'through',index)">+10000</div>
+            </div>
+            <div style="margin-top:0.42rem;margin-bottom:0.42rem">
+              <div class="row allAlignment center">
+                <div v-for=" n in 6" @click="updateNumber(n,'through',index)">
+                  <button>{{n}}</button>
+                </div>
+              </div>
+              <div class="row allAlignment center" style="margin-top:0.17rem;">
+                <div v-for=" n in 3" @click="updateNumber(n+6,'through',index)">
+                  <button>{{n+6}}</button>
+                </div>
+                <button @click="updateNumber('0','through',index)">0</button>
+                <button @click="updateNumber('00','through',index)">00</button>
+                <button @click="delNumder('through')"style="background:rgb(247, 102, 73);font-size:.4rem;line-height:.86rem;">x</button>
+              </div>
+            </div>
+          </div>
         </div>
       </div>
 
+      <div v-show="repeat" class="row  center">
+        <span>红色选项不可以结合进行过关投注</span>
+      </div>
 
-        <!-- <span>红色选项不可以结合进行过关投注<span> -->
-        <div class="btn" style="background:#F76649;">
-          <span>投注</span>
+      <!-- 总数据展示 -->
+      <div class="row allAlignment" style="padding:.1rem .2rem">
+          <span v-if="dataNum" class="showNumberSpan">所有投注({{dataNum}}):</span>
+          <span v-else class="showNumberSpan">所有投注:</span>
+          <span v-if="dataNumbe" style="font-size:0.24rem">{{(dataNumbe)}}</span>
+          <span v-else style="font-size:0.24rem">0.00</span>
+        </div>
+        <div class="row allAlignment" style="padding:0 .2rem">
+          <span class="showNumberSpan">可赢金额:</span>
+          <span v-if="datamMoney" style="font-size:0.24rem;color:#F76649;">{{(datamMoney).toFixed(2)}}</span>
+          <span v-else style="font-size:0.24rem;color:#F76649;">0.00</span>
+        </div>
+        <div class="btn" style="background:#F76649;" @click="betOrder" v-if="isLogin">
+          <span> 确认投注</span>
+        </div>
+        <div class="btn" style="background:#F76649;" @click="loginReg" v-else>
+          <span >登陆/注册</span>
         </div>
         <div class="btn" style="background:#A1A1A1;">
           <span>添加更多的选择</span>
@@ -132,27 +191,31 @@
           <span>全删除</span>
         </div>
       </div>
-    </div>
+    
+
+    <!-- <div class="loading_box row center" >
+        <div class="weui-loading"></div>
+    </div> -->
     <div class="shrink" :style="newIsShrink?'':'display:none'" @click="show()">
       投注单--选项
       <span class="num">{{dataList?dataList.length:'0'}}</span>
     </div>
+
+    <div v-if="isshow" class="login"><Login></Login></div>
+    <div v-else-if="rgShow"  class="login" ><register></register></div>
   </div>
 </template>
 <script>
 import "../css/index.css";
+import Login from "@/pages/Login/index/StLogin";
+import register from "@/pages/Login/index/register";
 export default {
   data() {
     return {
       img: require("../assets/st-imges/del.png"),
+      img_size: require("../assets/st-imges/narrow.png"),
       bettingNumber:[],
-      //余额
-      balance: "",
-      // 全部可赢金额
-      allmoney: "",
-      // 全部投注金额
-      allbetmoney: "",
-      // 参与投注的项目数目
+      balance: "",//余额
       bettingquantity: "",
       // 投注信息
       betting: "",
@@ -162,10 +225,24 @@ export default {
       isshrink: false,
       //小键盘显示位
       clickIndex:0,
-      money:0,//可赢金额
+      // money:0,//可赢金额
       arrNumber:'',//单注数量
+      dataNum:0,//已投注数量
+      dataNumbe:0,//总投数
+      datamMoney:0,//可赢总金额
+      isThrough:false,//触发过关玩法
+      cash:0.00,//余额
+      compound:[],//复合玩法
+      repeat:false,//判断比赛数据是否有相同赛事
+      isLogin:false,//是否登陆
+      isshow:false,//登陆显示/隐藏
+      rgShow:false,//注册显示/隐藏
     };
   },
+  components:{
+    Login,
+    register
+  },
   methods: {
     
     /*---------------------------------- */
@@ -179,18 +256,24 @@ export default {
     updateNumber: function(val,index) {
       // console.log(index);
       let temporaryData = '';
+      let numbers = 0;
       this.dataList.forEach((e,i)=>{
         if(index !='all'){
           if(index==i){
             temporaryData = this.bettingNumber[index]*1 ? this.bettingNumber[index]+(val+''): val+'';
             this.bettingNumber.splice(index,1,temporaryData);
+            console.log( this.bettingNumber[i]);
           }
         }else{  
-          temporaryData = this.bettingNumber[index]*1 ? this.bettingNumber[index]+(val+''): val+'';
-          this.bettingNumber.splice(index,1,temporaryData);
+          temporaryData = this.bettingNumber[i]*1 ? this.bettingNumber[i]+(val+''): val+'';
+          this.bettingNumber.splice(i,1,temporaryData);
+          //numbers += 
+
           this.arrNumber = temporaryData
         }
       })
+      console.log(this.bettingNumber);
+      //this.profitFun()
     },
 
     /*---------------------------------------------*/
@@ -204,32 +287,38 @@ export default {
             this.bettingNumber.splice(index,1,data);
           }
         }else{
-          console.log(index);
+          let dataAdd  = 0;
           data = this.bettingNumber[i]*1 ? (this.bettingNumber[i]*1+val)+'': val+'';
+          dataAdd +=data*1;
           this.bettingNumber.splice(i,1,data);
           this.arrNumber = data
         }
       })
+      this.profitFun()
     },
 
     /*---------------------------------- */
-    //删除投注数的一位数
+    //删除投注数的一位数
     delNumder: function(index) {
       let Str = this.bettingNumber;
       let strVal='';
-      Str.forEach((e,i)=>{
-        if(index !='all'){
+      if(index !='all'){
+        Str.forEach((e,i)=>{
           if(i==index){
             strVal  = e;
             e= strVal.substring(0, strVal.length - 1);
             this.bettingNumber.splice(index,1,e);
           }
-        }else{
+        })
+      }else{
+        Str.forEach((e,i)=>{
           strVal= e.substring(0, e.length - 1);
+          console.log(strVal);
           this.bettingNumber.splice(i,1,strVal);
-          this.arrNumber = strVal ;
-        }
-      })
+        })
+        this.arrNumber = this.arrNumber.substring(0, this.arrNumber.length - 1) ;
+      }
+      this.profitFun()  
     },
 
     /*---------------------------------- */
@@ -245,12 +334,13 @@ export default {
           this.arrNumber = '';
         }
       })
+      this.profitFun()
     },
 
     /*---------------------------------- */
     // 删除所有投注
     alldel() {
-    let betting = this.$store.getters.getBetting;
+      let betting = this.$store.getters.getBetting;
       betting.forEach(e=>{
         e.data=[]
       })
@@ -260,6 +350,7 @@ export default {
       this.$public.setCache("box_size", 2);
       this.$store.dispatch("ISBETTING", false);
       this.$store.dispatch('DEL_TYPE','all');
+      this.profitFun();
     },
 
     /*---------------------------------- */
@@ -269,12 +360,13 @@ export default {
     },
 
     /*---------------------------------- */
-    // 删除指定的投注
+    // 删除指定的投注数据
     delarr(name, numid) {
       let betting = this.$store.getters.getBetting;
       betting.forEach(res => {
         if (res.title == name) {
           res.data.forEach((e, index) => {
+
             if (e.id == numid) {
               res.data.splice(index, 1);
               //删除数据也要删除想对应的值
@@ -285,7 +377,8 @@ export default {
         this.$store.dispatch("BETTING", []);
         this.$store.dispatch("BETTING", betting);
       });
-       this.$store.dispatch('DEL_TYPE',numid)
+      this.$store.dispatch('DEL_TYPE',numid)
+      this.profitFun() 
     },
 
     /*---------------------------------- */
@@ -294,6 +387,24 @@ export default {
       this.isshrink = true;
       this.$public.setCache("box_size", 1);
     },
+    
+    /*---------------------------------- */
+    //计算可赢金额(总额)
+    profitFun(){
+      let dataNum = 0;
+      let dataNumbe = 0;
+      let datamMoney = 0;
+      this.bettingNumber.forEach((e,i)=> {
+        if(e){
+          dataNum ++;
+          dataNumbe += e*1 ;
+          datamMoney += e*1*this.dataList[i].odds
+        }
+      })
+      this.dataNum = dataNum;
+      this.dataNumbe = dataNumbe+'';
+      this.datamMoney = datamMoney;
+    },
 
     /*---------------------------------- */
     //投注窗口缩小
@@ -301,47 +412,208 @@ export default {
       this.isshrink = false;
       this.$public.setCache("box_size", 2);
     },
-  },
-  computed: {
-    //获取vuex投注数据
-    getBetting: function() {
-      let betting = this.$store.getters.getBetting;
+
+    /*---------------------------------- */
+    //登陆
+    loginReg(){
+      let isShow = true;
+      this.isshow =true;
+      this.$store.dispatch("GET_ISSHOW",isShow);
+      console.log( this.$store.getters.getIsShow);
+    },
+    /*------------------------------- */
+    //投注确认提交
+    betOrder(){
+      let list = [],obj ={};
+      console.log(this.bettingNumber);
+      //
+   
+      this.dataList.forEach((res,index)=>{
+        //console.log(res);
+        if(this.bettingNumber[index]){
+          obj ={
+            type:'1',
+            index:index,
+            // odds_id :res.id,
+            // odds : res.odds,
+            // odds_only : res.odds_only,
+            // odds_code:res.p_code,
+            // condition : res.condition,
+            bet_amount :this.bettingNumber[index],
+            // match_id:res.match_id,
+            // game_code:res.ballId,
+          }
+          list.push(obj);
+        }
+      })
+        this.compound.forEach(e=>{
+          obj ={
+            type:e.title,
+            odds:e.odds,
+            bet_amount :'50',//e.amount
+          }
+          list.push(obj);
+        })
+      console.log(this.compound);
+        if(this.compound.length > 0){
+          list.push(this.dataList);
+        }
+
+      console.log(list);
+      if(list.length >= 1){
+        this.$http.post(this.$ports.betOrder.Bet,{data:list,token:this.$public.getItem('token')}).then(res=>{
+            console.log('数据',res.data);
+          if(res.data.status ==1){
+            this.alldel();
+            // this.cash = (this.cash - obj.bet_amount).toFixed(2);
+            // let betting = this.$store.getters.getBetting;
+            // betting.forEach(res => {
+            //   res.data = []
+            // })
+            // this.dataList = [];
+            // this.$store.dispatch("BETTING", []);
+            // this.$store.dispatch("BETTING", betting);
+            // this.$store.dispatch("ISBETTING", false);
+          }
+        })
+      }else{
+        alert('你还未进行投注');
+      }
+     
+    },
+
+
+    /*---------------------------------- */
+    //投注页面数据处理
+    getDataList:function(val){
       let arrays = [];
-      if (betting) {
-        betting.forEach(e => {
-          e.data.forEach(res => {
-            this.bettingNumber.push('');
+      this.dataList=[];
+      if (val) {
+        val.forEach(e => {
+          e.data.forEach((res,index )=> {
+            if(this.bettingNumber.length < e.data.length){
+              this.bettingNumber.push('');
+            }
+            res.repeat =false;
+            this.repeat =false;
             arrays.push(res);
+            //判断比赛数据是否相同赛事
+            if(arrays.length > 1){
+              arrays.forEach((data,i)=>{
+                if(res.match_id == data.match_id && index!= i){
+                  arrays[i].repeat =true;
+                  arrays[index].repeat =true;
+                  this.repeat =true;
+                }
+              })
+            }
           });
         });
-        this.dataList = arrays
+        this.dataList = arrays;
+  
       // 查看是否还有数据确定是否要关闭窗口
       }
       if(this.dataList.length == 0){
         this.$public.setCache("box_size", 2);
         this.$store.dispatch("ISBETTING", false);
       }
+      //console.log('处理完成的数据',this.dataList);
+
+      //判断是否有过关玩法
+      if(this.dataList.length >= 3){
+        this.compound.splice(0,this.compound.length);
+        this.isThrough = true;
+        this.dataList.forEach((res,index) =>{
+          if(index  >= 2){
+            //this.$public.betPlay(index+1,this.dataList)
+            this.compound.push(this.$public.betPlay(index+1,this.dataList));
+          }
+        })
+      }else{
+        this.compound.splice(0,this.compound.length)
+      }
     },
 
+    /*---------------------------------- */
+    //获取用户个人信息
+    getUserInfo(){
+      this.$http.post(this.$ports.login.getAgent,{token:this.$public.getItem('token')}).then(res=>{
+        //console.log(res);
+        if(res.data.status == 1 &&  res.data.data != null){
+          this.cash = res.data.data.cash;
+          this.isLogin =true;
+        }
+      })
+    }
+  },
+  /**
+   * 
+   */
+  computed: {
+    //获取vuex投注数据
+    getBetting: function() {
+      return  this.$store.getters.getBetting;
+    },
     /*------------------------------*/
     //获取投注框放大缩小状态
-
     newIsShrink() {
       return this.isshrink;
+    },
+    getRgShow(){
+      return this.$store.getters.getRgShow;
+    },
+    getIsShow(){
+       return this.$store.getters.getIsShow; 
+    },
+    getToken(){
+      return this.$store.getters.getToken;
     }
   },
+  /**
+   * 
+   */
   watch: {
-    Isshow(obj) {},
-    getBetting(val) {}
+    getIsShow(val) {
+      this.isshow = val
+    },
+    getBetting(val) {
+      console.log('数据变法没有',val);
+      this.getDataList(val);
+    },
+    //显示注册页面
+    getRgShow(val){
+      this.rgShow = val;
+      this.isshow  = val ? false :true;
+      console.log(this.rgShow);
+    },
+    getToken(val){
+      this.isLogin = true
+    }
   },
+
+  /**
+   * 页面初始化完成进行挂载
+   */
   mounted() {
     if (this.$public.getCache("box_size") == 1) {
       this.isshrink = true;
     }
+    this.getDataList(this.$store.getters.getBetting);
+    this.getUserInfo();
+      //console.log('token',this.$public.getItem('token'));
+    if(this.$public.getItem('token')){
+      this.isLogin = true
+    }
   }
+  
 };
 </script>
 <style scoped>
+.login{
+  z-index: 999999;
+  position: fixed;
+  top: 0;
+}
 .num {
   display: inline-block;
   width: 0.46rem;
@@ -401,6 +673,7 @@ export default {
 }
 .titleBox {
   padding: 0.21rem 0.07rem;
+  border-bottom: 1px solid #ebebeb;
 }
 .bettingInput {
   height: 0.9rem;
@@ -448,8 +721,8 @@ button {
   margin-left: 0.2rem;
 }
 .showNumber {
-  margin-top: 0.36rem;
-  border-top: 1px solid #ebebeb;
+  /* margin-top: 0.36rem; */
+  border-bottom: 1px solid #ebebeb;
   padding-top: 0.2rem;
   padding: 0.21rem 0.2rem;
 }
@@ -477,6 +750,11 @@ button {
   text-align: center;
   font-size: 0.3rem;
 }
+.loading_box{
+  width: 3rem;
+  height: 3rem;
+  background:#ebebeb;
+}
 </style>
 
 

+ 25 - 11
vue_sports/src/components/StCapot.vue

@@ -117,7 +117,8 @@ export default {
       data: {},
       data2: [],
       info: "没有相关比赛信息",
-      noData: false
+      noData: false,
+      timers:true
     };
   },
   components: {
@@ -148,16 +149,9 @@ export default {
           this.data2[index].istrueC == true ? false : true
         );
       }
-    }
-  },
-  mounted() {
-    this.$store.dispatch("GETSHOW", true);
-    // 接收头部传过来的状态
-    Bus.$on("show", data => {
-      console.log("data", data);
-      this.isShow = data;
-    });
-    this.$http
+    },
+    getAjax(){
+          this.$http
       .get(this.$ports.match.matchState, {
         game_code: this.gameCode,
         type_code: "StRollBall"
@@ -174,6 +168,26 @@ export default {
         }
       })
       .catch(res => {});
+    }
+  },
+  mounted() {
+    this.$store.dispatch("GETSHOW", true);
+    // 接收头部传过来的状态
+    Bus.$on("show", data => {
+      console.log("data", data);
+      this.isShow = data;
+    });
+  this.getAjax();
+  let _this = this;
+      this.$public.ajaxTimerFun(function(timing) {
+      _this.getAjax();
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
+  },
+  beforeDestroy(){
+    this.timers = false;
   }
 };
 </script>

+ 899 - 0
vue_sports/src/components/StChampionsCup.vue

@@ -0,0 +1,899 @@
+<template>
+  <div>
+    <div class="Serch">
+      <div class="Soccer-game row center">
+        <div class="Soccer-game-title row center">
+          <img class="returnimg" :src="img.searchreturn" @click="isreturn()">
+          <span class="tit">{{title}}</span>
+          
+        </div>
+        <div
+          class="row center"
+          style="height:0.88rem;padding-left:0.1rem;"
+          @click="IsSoccerGameClick(isSoccerGameClick)"
+        >
+          <img
+            :class="isSoccerGameClick==true?'Soccer-game-src act':'Soccer-game-src return'"
+            :src="img.Soccerimg1"
+          >
+        </div>
+      </div>
+      <div class="Serch-box">
+        <div class="Serch-box-home">
+          <img class="Serch-box-img" :src="img.Serchimg">
+          <input
+            v-model="SerchValue"
+            @input="serchchange(SerchValue)"
+            class="Serch-box-input"
+            type="text"
+            placeholder="请输入联赛名称"
+          >
+          <img
+            class="Serch-box-del"
+            @click="delinputvalue()"
+            v-if="Serchchange==true"
+            :src="img.Serchdel"
+          >
+        </div>
+      </div>
+    </div>
+    <div class="Soccer-game-box row" v-if="isSoccerGameClick==true">
+      <p
+        class="row item-center"
+        v-for="(i,index) in Regulations.list"
+        @click="listActive(i.id,i.name,i.num)"
+        :key="index"
+        :class="listnum==i.id?'active':''"
+      >
+        {{i.name}}
+        <span
+          class="Soccer-game-num"
+          v-if="i.name!='冠军盘口'"
+          :class="listnum==i.id?'active':''"
+        >
+          <!--Soccer 导航数字  -->
+          {{i.num}}
+        </span>
+      </p>
+    </div>
+    <div
+      v-if="isShow"
+      class="event_prompt row item-center"
+    >目前暂无可适用的{{event_prompt_name==''?'':event_prompt_name}}赛事</div>
+    <div v-else class='ChampionsCup_content' >
+      <div v-if="listnum==1">
+            
+      </div>
+      <div v-if="listnum==2">
+
+      </div>
+      <div v-if="listnum==3">
+        <div
+      v-for=" (item,index) in data.matchData"
+      :key="index"
+      class="Match-box"
+    >
+     
+      <div class="row allAlignment Match-box-top">
+        <div class="Match-box-top-left">
+          <span>{{item.match_date}}</span>
+          <span>{{item.match_time}}</span>
+        </div>
+        <div class="Match-box-top-right row">
+          <span style="margin-right: .15rem;" class="Match-box-top-num">{{item.tag}}</span>
+          <span style="margin-right: .15rem;">让球</span>
+          <span style="margin-right: .15rem;">大小</span>
+        </div>
+      </div>
+      <div
+        class="row allAlignment center"
+        @click="matchInfo(item.match_id);"
+        style="padding:0 .32rem"
+      >
+        <div class="column average name-box">
+          <div>{{item.home_team}}</div>
+          <div>{{item.guest_team}}</div>
+        </div>
+        <div class="Match-bottom-right">
+          <!-- 主队 -->
+          <div class="row">
+            <div
+              class="Match-list-left"
+              v-for="(items,indexs) in item.oddsData.homeOdds"
+              :key="indexs"
+              @click.stop="isBetting(items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,items.odds_only,'homeOdds')"
+            >
+              <div :class="{ 'active' : items.isTrue == true}" class="column center">
+                <span style="color:#FD8F26">{{items.condition}}</span>
+                <span>{{items.odds}}</span>
+              </div>
+            </div>
+          </div>
+          <!-- 客队 -->
+          <div class="row">
+            <div
+              class="Match-list-right row"
+              v-for="(items,indexs) in item.oddsData.guestOdds"
+              :key="indexs"
+              @click.stop="isBetting(items.id,item.home_team,item.guest_team,item.guest_team,items.odds,items.condition,items.odds_only,'guestOdds')"
+            >
+              <div :class="{'active':items.isTrue==true}" class="column center">
+                <span>
+                  <i style="color:#FD8F26">{{items.condition}}</i>
+                </span>
+                <span>{{items.odds}}</span>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+      </div>
+      <div v-show="listnum==4">
+        <!-- 冠军组件 -->
+    <div class="champion">
+      <div v-for="item in ChampionData" :key="item.id">
+        <div class="title">
+          <span>{{item.name}}</span>
+          <div class="time">
+            <!-- <span>2019年5月29日</span> -->
+            <span>{{item.last_time}}</span>
+          </div>
+        </div>
+      <div v-for="(items) in item.data" :key="items.id">
+        <div class="chmpTit">{{items.title}}</div>
+        <div v-for="itemList in items.datas" :key="itemList.id">
+          <div class="list">
+            <span class="chmName">{{itemList.team}}</span>
+            <span class="num">{{itemList.odds}}</span>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <!-- <div v-if="noData">
+      <NotOpend :title="this.info"/>
+    </div> -->
+    </div>
+      </div>
+    </div>
+        <div class="BettingWindow" v-show="isWindow">
+      <BettingWindow/>
+    </div>
+  </div>
+</template>
+
+<script>
+import "@/css/index.css";
+import BettingWindow from "@/components/StBettingWindow";
+export default {
+  name: "ChampionsCup",
+  components:{BettingWindow},
+  data() {
+    return {
+        title:'',
+      // 日期时间数组
+      arr: [],
+      // 本页面的数据
+      data: "",
+      isShow : true, //显示无数据
+      //冠军盘口提示显示隐藏
+      event_prompt: false,
+      scorll: "", //背景滚动
+      //冠军盘口提示区分盘口名
+      event_prompt_name: "",
+      isSoccerGameClick: true,
+      Serchchange: false,
+      listnum: 2, //赛事类型
+      SerchValue: "",
+      betting: 10000, //vuex里面玩法投注数据
+      thisNum: 10000, //vuex里面
+      ChampionData :'', //冠军数据
+      isWindow:false,
+      img: {
+        Soccerimg1: require("@/assets/st-imges/soccer1.png"),
+        Soccerimg2: require("@/assets/st-imges/soccer1.png"),
+        Serchimg: require("@/assets/st-imges/sousuo.png"),
+        Serchdel: require("@/assets/st-imges/del.png"),
+        searchreturn: require("@/assets/st-imges/returnbox.png")
+      },
+      Regulations: {
+        title: " ",
+        list: [
+          { id: 1, name: "滚球", num:''},
+          { id: 2, name: "今日", num:''},
+          { id: 3, name: "早盘", num:''},
+          { id: 4, name: "冠军盘口" }
+        ]
+      }
+    };
+  },
+  created() {
+    this.fun_date();
+  },
+  methods: {
+    //   获取一周赛事
+    fun_date: function() {
+      let date = new Date();
+      let date2 = new Date(date);
+      for (let i = 1; i < 7; i++) {
+        date2.setDate(date.getDate() + i);
+        let years = date2.getFullYear();
+        let month =
+          date2.getMonth() + 1 < 10
+            ? "0" + (date2.getMonth() + 1)
+            : date2.getMonth() + 1;
+        let day =
+          date2.getDate() < 10 ? "0" + date2.getDate() : date2.getDate();
+        let time2 = {};
+        time2.id = years + "-" + month + "-" + day;
+        time2.title = years + "-" + month + "-" + day;
+        this.arr.push(time2);
+        if (i == 6) {
+          this.arr.push({ id: "morning", title: "早盘" });
+        }
+      }
+    },
+    //切换赛事类型
+    listActive(id, name, num) {
+      let time;
+      this.listnum = id;
+      this.event_prompt_name = name;
+      if (num == 0) {
+        this.event_prompt = true;
+        time = setTimeout(() => {
+          this.event_prompt = false;
+          clearTimeout(time);
+        }, 1500);
+      }
+      clearTimeout(time);
+      if (this.listnum == id) return false;
+      this.SerchValue = "";
+      this.listnum = id;
+    },
+    //删除搜索框数据
+    delinputvalue() {
+      this.SerchValue = "";
+      this.Serchchange = false;
+    },
+    toggle: function(index, id) {
+      this.active = index;
+      this.datetimeNum = id;
+      console.log("id", this.datetimeNum);
+      this.SerchValue = "";
+    },
+    // 返回上一层页面
+    isreturn() {
+      history.go(-1);
+    },
+    //获取input输入的值查询数据
+    serchchange(val) {
+      if (val.length >= 1) {
+        this.Serchchange = true;
+      } else {
+        this.Serchchange = false;
+      }
+    },
+    //显示隐藏赛事类型
+    IsSoccerGameClick(isclick) {
+      this.isSoccerGameClick = !isclick;
+    },
+    
+    getAjax(){
+      this.$store.dispatch('GETSHOW',true);
+       this.$http.get(this.$ports.match.ChampionsCup).then(res => {
+      if (res.data.data && res.data.status == 1) {
+        console.log('res', res.data.data.StMorningPlate)
+        this.Regulations.list.forEach(e => {
+          if (e.id == 1) {
+            this.$set(e, "name", res.data.data.StRollBall.typeName);
+            this.$set(e, "num", res.data.data.StRollBall.matchNum);
+          } else if (e.id == 2) {
+            this.$set(e, "name", res.data.data.StToday.typeName);
+            this.$set(e, "num", (e.num = res.data.data.StToday.matchNum));
+          } else if (e.id == 3) {
+            this.$set(e, "name", res.data.data.StMorningPlate.typeName);
+            this.$set(e, "num", res.data.data.StMorningPlate.matchNum);
+          } else if (e.id == 4) {
+            this.$set(e, "name", res.data.data.StChampion.typeName);
+            this.$set(e, "num", res.data.data.StChampion.matchNum);
+          }
+        });
+        console.log('list',this.Regulations)
+        if(this.listnum == 1){
+            this.data = res.data.data.StRollBall;
+        }else if(this.listnum == 2){
+            this.data = res.data.data.StToday;
+        }else if(this.listnum == 3){
+            this.data = res.data.data.StMorningPlate;
+        }else {
+           this.data = res.data.data.StChampion;
+            let champion = {},
+                title = "",
+                stiTime='',
+                //matchData = [],
+                chamData = [];
+              title = Object.keys(this.data.matchData);
+              let val = Object.values(this.data.matchData);
+              title.forEach((e,index) =>{
+                  chamData.push({
+                    name:e,
+                    data:val[index],
+                  })
+                
+              })
+              chamData.forEach((res)=>{
+                res.last_time =res.data.last_time;
+                let resData =  Object.values(res.data);
+                let resTitle =  Object.keys(res.data);
+                res.data = [];
+                resTitle.forEach((e,index)=>{
+                  if(e !=='last_time'){
+                   res.data.push({
+                      title:e,
+                      datas:resData[index]
+                    })
+                  }
+                })
+              })
+                    this.ChampionData =chamData;
+               console.log(this.ChampionData);
+        }
+        // 取值出来进行判定
+        if(this.data.matchData && this.data.matchData.length < 1){
+              this.isShow = true;
+            }else if (
+              this.data.matchData &&
+              this.data.matchData.length > 0
+            ){
+              this.isShow = false;
+              // console.log('dtaa',this.data)
+               console.log('找不到',this.data)
+                 this.dataGroup(this.data);
+            }
+            if(this.listnum == 4){
+                if(this.data.matchData == null){
+              this.isShow = true;
+            }else {
+              this.isShow = false;
+            }
+            }
+          
+      }
+      this.title=res.data.data.leagueName
+      this.$store.dispatch('GETSHOW',false);
+     
+    });
+    },
+       /*--------------------------------------------------------------------------------*/
+    // 添加、删除vuex投注数据公共方法
+    AddDelete: function(id, home, guest, name, odds, condition, odds_only) {
+      let isAdd = true;
+      let bettingInfo = {
+        id,
+        home_team: home,
+        guest_team: guest,
+        name,
+        odds,
+        condition,
+        ganame: "concede_size",
+        score: this.score,
+        bettingTime: "",
+        odds_only
+      };
+      let matchList = this.$store.getters.getBetting;
+      if (this.thisNum != 10000) {
+        //删除vuex投注数据
+        matchList[this.thisNum].data.forEach((res, index) => {
+          if (res.id == id) {
+            matchList[this.thisNum].data.splice(index, 1);
+            this.$store.dispatch("BETTING", matchList);
+            isAdd = false;
+          }
+        });
+        //添加vuex投注数据
+        if (isAdd) {
+          matchList[this.thisNum].data.push(bettingInfo);
+          this.$store.dispatch("BETTING", []);
+          this.$store.dispatch("BETTING", matchList);
+          if (this.$store.getters.getIsBetting) return false;
+          this.$store.dispatch("ISBETTING", true);
+        }
+      } else {
+        //添加新的玩法赔率数据
+        let obj = {
+          title: "concede_size",
+          data: [bettingInfo]
+        };
+        //判断vuex有误其它玩法数据
+        if (matchList) {
+          matchList.push(obj);
+        } else {
+          this.$store.dispatch("BETTING", [obj]);
+        }
+      }
+      // console.log(this.$store.getters.getIsBetting);
+      if (this.$store.getters.getIsBetting) return false;
+      this.$store.dispatch("ISBETTING", true);
+    },
+        /*--------------------------------------------------------------------------------*/
+    // 添加、删除vuex投注数据公共方法
+    AddDelete: function(id, home, guest, name, odds, condition, odds_only) {
+      let isAdd = true;
+      let bettingInfo = {
+        id,
+        home_team: home,
+        guest_team: guest,
+        name,
+        odds,
+        condition,
+        ganame: "concede_size",
+        score: this.score,
+        bettingTime: "",
+        odds_only
+      };
+      let matchList = this.$store.getters.getBetting;
+      if (this.thisNum != 10000) {
+        //删除vuex投注数据
+        matchList[this.thisNum].data.forEach((res, index) => {
+          if (res.id == id) {
+            matchList[this.thisNum].data.splice(index, 1);
+            this.$store.dispatch("BETTING", matchList);
+            isAdd = false;
+          }
+        });
+        //添加vuex投注数据
+        if (isAdd) {
+          matchList[this.thisNum].data.push(bettingInfo);
+          this.$store.dispatch("BETTING", []);
+          this.$store.dispatch("BETTING", matchList);
+          if (this.$store.getters.getIsBetting) return false;
+          this.$store.dispatch("ISBETTING", true);
+        }
+      } else {
+        //添加新的玩法赔率数据
+        let obj = {
+          title: "concede_size",
+          data: [bettingInfo]
+        };
+        //判断vuex有误其它玩法数据
+        if (matchList) {
+          matchList.push(obj);
+        } else {
+          this.$store.dispatch("BETTING", [obj]);
+        }
+      }
+      // console.log(this.$store.getters.getIsBetting);
+      if (this.$store.getters.getIsBetting) return false;
+      this.$store.dispatch("ISBETTING", true);
+    },
+
+    /*--------------------------------------------------------------------------------*/
+    //修改当前页面样式公共方法
+    modifyStyle: function(id, type) {
+      console.log(id, type);
+      this.data.matchData.every(e => {
+        let ret = false;
+        if (type == "homeOdds") {
+          e.oddsData.homeOdds.every((res, index) => {
+            if (res.id == id) {
+              this.$set(
+                e.oddsData.homeOdds[index],
+                "isTrue",
+                res.isTrue ? false : true
+              );
+              ret = true;
+              return false;
+            }
+            return true;
+          });
+        } else if (type == "guestOdds") {
+          e.oddsData.guestOdds.every((res, index) => {
+            if (res.id == id) {
+              this.$set(
+                e.oddsData.guestOdds[index],
+                "isTrue",
+                res.isTrue ? false : true
+              );
+              ret = true;
+              return false;
+            }
+            return true;
+          });
+        }
+        if (ret) {
+          return false;
+        } else {
+          return true;
+        }
+      });
+    },
+       /*--------------------------------------------------------------------------------*/
+    // 修改投注样式
+    isBetting(id, home, guest, name, odds, condition, odds_only, type) {
+      console.log(this.data);
+      if (this.data) {
+        //处理vuex里面数据
+        this.AddDelete(id, home, guest, name, odds, condition, odds_only);
+        //处理当前页面样式
+        this.modifyStyle(id, type);
+      }
+    },
+      /*--------------------------------------------------------------------------------*/
+    // 赛事赔率玩法数据组合方法
+
+    dataGroup: function(data) {
+     
+      let homeOdds = [],
+        guestOdds = [];
+      let A, B, C, D;
+      data.matchData.forEach((column, index) => {
+        if (column.oddsData == null || column.oddsData.length == 0) {
+          column.oddsData = {
+            homeOdds: [{ status: -1 }, { status: -1 }],
+            guestOdds: [{ status: -1 }, { status: -1 }]
+          };
+        } else {
+          column.oddsData.forEach(val => {
+            if (this.betting != 10000) {
+              this.betting.forEach(e => {
+                if (val.id == e.id) {
+                  val.isTrue = true;
+                  //this.$set(val,'isTrue',true);
+                }
+              });
+            }else{
+                 val.isTrue = false;
+            }
+            if (val.odds_code == "concede_home") {
+              A = val;
+              
+            } else if (val.odds_code == "size_home") {
+              B = val;
+            } else if (val.odds_code == "concede_guest") {
+              C = val;
+            } else if (val.odds_code == "size_guest") {
+              D = val;
+            }
+          });
+          column.oddsData = {};
+          column.oddsData.homeOdds = [];
+          if(A != undefined){
+            column.oddsData.homeOdds.push(A);
+          }
+          if(B != undefined){
+            column.oddsData.homeOdds.push(B);
+            
+            }
+          column.oddsData.guestOdds = [];
+          if(C != undefined){
+            column.oddsData.guestOdds.push(C);
+          }
+          if(D != undefined){
+            column.oddsData.guestOdds.push(D);
+          }
+        }
+      });
+      this.data = data;
+      console.log('data`````', this.data);
+    }
+  },
+  mounted() {
+    // 默认选中数据
+    this.listnum = 3; 
+        // 获取是否滑动信息
+    if (this.$public.getCache("box_size") == 1) {
+      this.isshrink = true;
+    }
+    //是否展示投注框
+    if (this.$store.getters.getIsBetting) {
+      this.isWindow = true;
+    }
+        //获取vuex玩法已投注相对应的数据
+    let getBetting = this.$store.getters.getBetting;
+    
+    if (getBetting) {
+      getBetting.forEach((e, index) => {
+        if ("concede_size" == e.title) {
+          console.log('数据源',e);
+          this.thisNum = index;
+          if(e.data.length > 0){
+
+            this.betting = e.data;
+          }
+        }
+      });
+    }
+    this.getAjax();
+  },
+  computed:{
+    changeData:function(){
+        
+      return this.listnum
+    },
+        getBetting() {
+      return this.$store.getters.getBetting;
+    },
+    IsWindow() {
+      return this.$store.getters.getIsBetting;
+    },
+    //获取投注框删除的投注信息
+    getDeleteType() {
+      return this.$store.getters.getDeleteType;
+    }
+  },
+  watch:{
+    changeData(val){
+      console.log(val)
+      // 监听改变状态修改值。
+       this.getAjax();
+  
+    },
+      // 监听滚动状态变化赋值滚动
+    getscorllcode(val) {
+      console.log(val);
+      this.scorll = val;
+    },
+    getDeleteType(val) {
+      let flag = true;
+      this.data.matchData.forEach(e => {
+        if (val == "all") {
+          e.oddsData.guestOdds.forEach(data => {
+            this.$set(data, "isTrue", false);
+          });
+          e.oddsData.homeOdds.forEach(data => {
+            this.$set(data, "isTrue", false);
+          });
+        } else {
+          let showData = true;
+          e.oddsData.guestOdds.forEach(data => {
+            if (data.id == val) {
+              this.$set(data, "isTrue", false);
+              showData = false;
+            }
+          });
+          if (showData) {
+            e.oddsData.homeOdds.forEach(data => {
+              if (data.id == val) {
+                this.$set(data, "isTrue", false);
+              }
+            });
+          }
+        }
+      });
+    },
+    /*--------------------------------------------------------------------------------*/
+    //获取已投注信息
+    getBetting(val) {
+      //获取vuex玩法已投注相对应的数据
+      if (val) {
+        val.forEach((e, index) => {
+          if ("concede_size" == e.title) {
+            this.thisNum = index;
+            this.betting = e.data;
+          }
+        });
+      }
+    },
+        /*--------------------------------------------------------------------------------*/
+    // 监听投注框开关
+    IsWindow(val) {
+      this.isWindow = val;
+    }
+  }
+};
+</script>
+
+<style scoped>
+.event_prompt {
+  height: 0.88rem;
+  background: #737373;
+  color: #a6a6a6;
+  padding-left: 0.3rem;
+}
+.Soccer-game-num {
+  display: inline-block;
+  width: 0.4rem;
+  height: 0.4rem;
+  border-radius: 50%;
+  background: #a6a6a6;
+  color: #626262;
+  margin-left: 0.1rem;
+  line-height: 0.4rem;
+  text-align: center;
+}
+.Soccer-game-num.active {
+  background: #f76649;
+  color: #f8f8f8;
+}
+.act {
+  transform: rotate(180deg);
+  transition: 0.2s;
+}
+.return {
+  transform: rotate(0deg);
+  transition: 0.2s;
+}
+.Serch {
+  height: 0.88rem;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  background: linear-gradient(to bottom, #6a6a6a, #565656);
+  color: #f76649;
+  font-family: "PingFang-SC-Regular";
+  padding: 0 0.33rem;
+}
+.returnimg {
+  width: 0.37rem;
+  height: 0.3rem;
+  margin-right: 0.1rem;
+}
+.Serch-box {
+  display: flex;
+  align-items: center;
+}
+.Serch-box-input {
+  width: 3.8rem;
+  border: none;
+  position: absolute;
+  height: 0.44rem;
+  line-height: 0.44rem;
+  left: 0.5rem;
+  color: #aaa;
+}
+.Serch-box-img {
+  width: 0.3rem;
+  height: 0.3rem;
+  position: absolute;
+  left: 0.1rem;
+  top: 0.06rem;
+}
+.Serch-box-del {
+  width: 0.2rem;
+  height: 0.2rem;
+  position: absolute;
+  right: 0.2rem;
+}
+.Serch-box-home {
+  height: 0.45rem;
+  line-height: 0.45rem;
+  width: 4.2rem;
+  background: #e4e4e4;
+  border-radius: 0.2rem;
+  display: flex;
+  justify-content: space-around;
+  align-items: center;
+  padding-left: 0.1rem;
+  padding-right: 0.1rem;
+  position: relative;
+}
+.Soccer-game-title {
+  height: 0.88rem;
+  font-size: 0.23rem;
+}
+.Soccer-game-title .tit{
+  font-size: 0.3rem;
+}
+.Soccer-game-box {
+  height: 0.88rem;
+  background-color: #626262;
+}
+.Soccer-game-box > p {
+  margin-left: 0.3rem;
+  color: #a6a6a6;
+}
+.Soccer-game-box p.active {
+  color: #f76649;
+}
+.Soccer-game-src {
+  width: 0.25rem;
+  height: 0.15rem;
+  /* margin-left: .3rem */
+}
+
+.Match-title-num {
+  width: 0.46rem;
+  height: 0.46rem;
+  line-height: 0.46rem;
+  text-align: center;
+  background: #f76649;
+  font-size: 0.26rem;
+  border-radius: 50%;
+  color: #f5f5f5;
+}
+
+.Match-box-top-right > span {
+  width: 1.07rem;
+  text-align: center;
+}
+.Match-box {
+  height: 2.45rem;
+}
+.name-box {
+  height: 1.76rem;
+}
+.Match-box-top {
+  height: 0.45rem;
+  line-height: 0.45rem;
+  background: #dcdcdc;
+  font-size: 0.23rem;
+  padding: 0 0.32rem;
+}
+.Match-box-top-num {
+  width: 0.64rem !important;
+  height: 0.45rem;
+  background: #ebebeb;
+  font-size: 0.24rem;
+}
+.Match-box {
+  background: #f8f8f8;
+}
+.Match-bottom-right {
+  height: 2rem;
+  padding: 0.1rem 0.1rem 0 0.14rem;
+}
+.Match-list-left div {
+  width: 1.07rem;
+  height: 0.76rem;
+  border: 1px solid #e4e4e4;
+  border-radius: 0.1rem;
+  padding: 0.1rem;
+  margin: 0.06rem 0.08rem;
+}
+.Match-list-right div {
+  width: 1.07rem;
+  height: 0.76rem;
+  border: 1px solid #e4e4e4;
+  border-radius: 0.1rem;
+  margin: 0.06rem 0.08rem;
+}
+/* 冠军 */
+.champion .title {
+  height: 1rem;
+  padding: 0.15rem 0.2rem;
+  background-color: #626262;
+}
+.champion .title span {
+  font-size: 0.28rem;
+  font-weight: bold;
+  color: #e1e1df;
+}
+.champion .title .time span:nth-child(2) {
+  color: #f76649;
+}
+.chmpTit {
+  height: 0.7rem;
+  line-height: 0.7rem;
+  padding: 0 0.2rem;
+  background: #e4e4e4;
+}
+.champion .list {
+  height: 1rem;
+  line-height: 0.6rem;
+  padding: 0.1rem 0.2rem;
+  width: 100%;
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-pack: justify;
+  -ms-flex-pack: justify;
+  justify-content: space-between;
+  border-bottom: 1px solid #aaa;
+  font-size: 0.28rem;
+  background: #ffffff;
+}
+.champion .list span:nth-child(1) {
+  margin-top: 0.1rem;
+}
+.champion .list .num {
+  width: 1.07rem;
+  height: 0.76rem;
+  border: 1px solid #e4e4e4;
+  border-radius: 0.1rem;
+  padding: 0.1rem;
+  text-align: center;
+}
+
+
+</style>

+ 18 - 0
vue_sports/src/components/StCharacteristic.vue

@@ -41,9 +41,23 @@ export default {
       list:'',
        noData: false,
       info: "暂无相关特色赛事",
+      timers: true
     }
   },
   mounted() {
+     let _this =this;
+    this.$public.ajaxTimerFun(function(timing){
+       _this.getAjax();
+      if (!_this.timers){
+      clearInterval(timing);
+    }
+    })
+    this.getAjax();
+      
+  },
+  methods:{
+
+    getAjax:function(){
      this.$store.dispatch('GETSHOW',true);
     this.$http.get(this.$ports.home.highMatch).then(res =>{
       console.log('highMatch',res)
@@ -58,7 +72,11 @@ export default {
           this.$store.dispatch('GETSHOW',false);
       }
     })
+    }
   },
+  beforeDestroy(){
+    this.timers = false;
+  }
 };
 </script>
 <style scoped lang=""> 

+ 20 - 2
vue_sports/src/components/StEntryForm.vue

@@ -121,7 +121,8 @@ export default {
       thisNum: 10000,
       info: "没有相关联赛信息",
       noData: false, //没有数据为true
-      betting: 10000 //vuex里面玩法投注数据
+      betting: 10000, //vuex里面玩法投注数据
+      timers : true
     };
   },
   components: {
@@ -196,6 +197,7 @@ export default {
         name,
         odds,
         condition,
+        ballId:this.$store.getters.getBallId,
         ganame: "concede_size",
         score: this.score,
         bettingTime: ""
@@ -307,7 +309,9 @@ export default {
             if (this.betting != 10000) {
               this.betting.forEach(e => {
                 if (val.id == e.id) {
-                  val.isTrue = true;
+                  this.$set(val,'isTrue',true)
+                  console.log('我要的值',val)
+                  // val.isTrue = true;
                   //this.$set(val,'isTrue',true);
                 }
               });
@@ -358,15 +362,18 @@ export default {
     },
     // 监听删除投注
     getDeleteType(val) {
+      console.log('删除',val)
       let flag = true;
       this.data.forEach(e => {
         if (val == "all") {
           e.match_info.forEach(data => {
             data.oddsData.forEach((k, i) => {
+              console.log('123')
               this.$set(k, "isTrue", false);
             });
           });
         } else {
+          console.log('aaaaa')
           e.match_info.forEach((res, index) => {
             res.oddsData.every((k, i) => {
               if (k.id == val) {
@@ -405,9 +412,20 @@ export default {
         }
       });
     }
+    let _this = this;
+    
+          this.$public.ajaxTimerFun(function(timing) {
+     _this.getmatchInfo("");
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
     console.log("data", this.data);
     /*-----------------------*/
     this.getmatchInfo("");
+  },
+  beforeDestroy(){
+    this.timers = false;
   }
 };
 </script>

+ 16 - 9
vue_sports/src/components/StGoal.vue

@@ -8,7 +8,7 @@
               <div style="padding:0 0.32rem;" class="odds">
                 <div class="row allAlignment center small">
                   <span>{{item.odds_code =='concede_home' ? home_team :guest_team}}</span>
-                  <div class="ratio column center" @click="bettingBtn(item.id,item.condition,item.odds)" :class="item.isTrue ? 'col':''">
+                  <div class="ratio column center" @click="bettingBtn(item.id,item.odds_code =='concede_home' ? home_team :guest_team,item.odds,item.odds_only,item.p_code,match_id,item.condition)" :class="item.isTrue ? 'col':''">
                     <span class="score">{{item.condition}}</span>
                     <span>{{item.odds}}</span>
                   </div>
@@ -27,7 +27,7 @@
               <div style="padding:0 0.32rem;" class="odds">
                 <div class="row allAlignment center small">
                   <span>{{item.odds_code =='half_concede_home' ? home_team :guest_team}}</span>
-                  <div class="ratio column center" @click="bettingBtn(item.id,item.condition,item.odds)" :class="item.isTrue ? 'col':''">
+                  <div class="ratio column center" @click="bettingBtn(item.id,item.odds_code =='half_concede_home' ? home_team :guest_team,item.odds,item.odds_only,item.p_code,match_id,item.condition)" :class="item.isTrue ? 'col':''">
                     <span class="score">{{item.condition}}</span>
                     <span>{{item.odds}}</span>
                   </div>
@@ -54,7 +54,7 @@
                       <div
                         class="ratio column center"
                         :class="item.isTrue ? 'col':''"
-                        @click="bettingBtn(item.id,item.condition,item.odds)"
+                        @click="bettingBtn(item.id,'大',item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                       >
                         <span class="score">{{item.condition}}</span>
                         <span>{{item.odds}}</span>
@@ -71,7 +71,7 @@
                       <div
                         class="ratio column center"
                         :class="item.isTrue? 'col':''"
-                        @click="bettingBtn(item.id,item.condition,item.odds)"
+                        @click="bettingBtn(item.id,'小',item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                       >
                         <span class="score">{{item.condition}}</span>
                         <span>{{item.odds}}</span>
@@ -100,7 +100,7 @@
                       <div
                         class="ratio column center"
                         :class="item.isTrue ? 'col':''"
-                        @click="bettingBtn(item.id,item.condition,item.odds)"
+                        @click="bettingBtn(item.id,'大',item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                       >
                         <span class="score">{{item.condition}}</span>
                         <span>{{item.odds}}</span>
@@ -118,7 +118,7 @@
                       <div
                         class="ratio column center"
                         :class="item.isTrue? 'col':''"
-                        @click="bettingBtn(item.id,item.condition,item.odds)"
+                        @click="bettingBtn(item.id,'小',item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                       >
                         <span class="score">{{item.condition}}</span>
                         <span>{{item.odds}}</span>
@@ -149,13 +149,15 @@ export default {
       home_team: "",
       guest_team: "",
       data: [],
+      match_id:'',
       betting: [], //已投注倍率id集合
       dataNum: 10000 //对应的数据的下标
     };
   },
   methods: {
     //玩法投注
-    bettingBtn(id,name,odds,condition='',bettingTime='') {
+    bettingBtn(id,name,odds,odds_only,p_code,match_id,condition='',bettingTime='') {
+      console.log('大哥',this.data)
       // // 投注页面显示
       //    if(this.$store.getters.newIsBetting==true){
       //     return false
@@ -168,11 +170,14 @@ export default {
         guest_team:this.guest_team,
         name,
         odds,
+        p_code,
+        ballId:this.$store.getters.getBallId,
+        match_id,
         condition,
         ganame:this.title,
         score:this.score,
         bettingTime,
-
+        odds_only,
       }
       //调用玩法投注公共方法
       this.$public.bettingFunction(
@@ -227,7 +232,9 @@ export default {
    */
   watch: {
     getUserIcons(val) {
-      //console.log("更新数据", val);
+      this.match_id=val.match_id;
+      console.log("更新数据", val);
+      console.log(this.match_id)
       if (!val) return false;
       this.home_team = val.home_team;
       this.guest_team = val.guest_team;

+ 634 - 178
vue_sports/src/components/StMatch.vue

@@ -1,39 +1,60 @@
 <template>
   <div>
-      <div v-if="noData">
+    <div v-if="noData">
       <NotOpend :title="this.info"/>
     </div>
     <!-- 让球&大小 -->
     <div class="match" v-if="isShow && rShow">
-      <div v-for="(items,index) in letBallData" :key="items.id" class="mg">
+      <div v-for="(items,$index) in letBallData" :key="items.id" class="mg">
         <!-- <div v-for="items in list[index]" :key="items.id"> -->
-        <div class="row allAlignment  haderBox center">
+        <div class="row allAlignment haderBox center">
           <span>{{items.leagueName}}</span>
           <div class="row Match-title-num">
             <span>{{items.matchNum}}</span>
           </div>
         </div>
         <div class="Match-box">
-          <div v-for="(itemList,index) in items.matchData" :key="itemList.id"   @click="matchInfo(itemList.match_id)">
-          
-              <div class="row allAlignment Match-box-top">
-                <div class="Match-box-top-left">
-                  <span>{{itemList.match_date}}</span>
-                  <span class="texttop">{{itemList.match_time}}</span>
+          <div
+            v-for="(itemList,index) in items.matchData"
+            :key="itemList.id"
+            @click="matchInfo(itemList.match_id)"
+          >
+            <div class="row allAlignment Match-box-top">
+              <div class="Match-box-top-left">
+                <span>{{itemList.match_process}}</span>
+                <span class="texttop" v-if="activity == 'StRollBall'">{{itemList.a_time}}</span>
+                <span class="texttop" v-if="activity == 'StSoon'">{{itemList.wait_time}}分钟</span>
+              </div>
+              <div class="Match-box-top-right row">
+                <span style="margin-right: .1rem;" class="Match-box-top-num">{{itemList.tag}}</span>
+                <span style="margin-right: .1rem;">让球</span>
+                <span style="margin-right: .1rem;">大小</span>
+              </div>
+            </div>
+            <div class="row allAlignment center listbox">
+              <div class="column average name-box">
+                <div class="box noBox row item-center main-box">
+                  <span
+                    v-if="itemList.home_score == '0' || itemList.home_score"
+                    class="num-box"
+                    style="color:#eb921e"
+                  >{{itemList.home_score}}</span>
+                  <span v-else style="color:#eb921e">{{itemList.home_score}}</span>
+
+                  &nbsp;&nbsp;{{itemList.home_team}}
                 </div>
-                <div class="Match-box-top-right row">
-                  <span style="margin-right: .1rem;" class="Match-box-top-num">{{itemList.tag}}</span>
-                  <span style="margin-right: .1rem;">让球</span>
-                  <span style="margin-right: .1rem;">大小</span>
+                <div class="box noBox row item-center main-box">
+                  <span
+                    v-if="itemList.guest_score"
+                    class="num-box"
+                    style="color:#eb921e"
+                  >{{itemList.guest_score}}</span>
+                  <span v-else style="color:#eb921e">{{itemList.guest_score}}</span>
+                  &nbsp;&nbsp;{{itemList.guest_team}}
                 </div>
               </div>
-              <div class="row allAlignment center listbox">
-                <div class="column average name-box">
-                  <div>{{itemList.home_team}}</div>
-                  <div>{{itemList.guest_team}}</div>
-                </div>
-                <div class="Match-list-box row item-center average">
-                  <div v-for="(odds,i) in itemList.oddsData[0]" :key="odds.id" class="match-list">
+              <div class="Match-list-box row item-center average">
+                <!-- <div v-for="(odds,i) in itemList.oddsData[0]" :key="odds.id" class="match-list">
                     <div
                       @click.stop="isclick(index,i)"
                       class="column center"
@@ -42,9 +63,40 @@
                       <span style="color:#FD8F26">{{odds.condition}}</span>
                       <span>{{odds.odds}}</span>
                     </div>
+                </div>-->
+                <div class="Match-bottom-right">
+                  <!-- 主队 -->
+                  <div class="row">
+                    <div
+                      class="Match-list-left"
+                      v-for="(items,indexs) in itemList.oddsData[0].homeOdds"
+                      :key="indexs"
+                      @click.stop="isBetting($index,items.id,itemList.home_team,itemList.guest_team,itemList.home_team,items.odds,items.condition,items.odds_only,'homeOdds')"
+                    >
+                      <div :class="{ 'active' : items.isTrue == true}" class="column center">
+                        <span style="color:#FD8F26">{{items.condition}}</span>
+                        <span>{{items.odds}}</span>
+                      </div>
+                    </div>
+                  </div>
+                  <!-- 客队 -->
+                  <div class="row">
+                    <div
+                      class="Match-list-right row"
+                      v-for="(items,indexs) in itemList.oddsData[0].guestOdds"
+                      :key="indexs"
+                      @click.stop="isBetting($index,items.id,itemList.home_team,itemList.guest_team,itemList.guest_team,items.odds,items.condition,items.odds_only,'guestOdds')"
+                    >
+                      <div :class="{'active':items.isTrue==true}" class="column center">
+                        <span>
+                          <i style="color:#FD8F26">{{items.condition}}</i>
+                        </span>
+                        <span>{{items.odds}}</span>
+                      </div>
+                    </div>
                   </div>
                 </div>
-      
+              </div>
             </div>
           </div>
         </div>
@@ -52,57 +104,71 @@
     </div>
     <!-- 1x2 -->
     <div v-if="!isShow && !ishow && rShow">
-      <div v-for="(item,index) in letBallData" :key="item.id" @click="betting()">
+      <div v-for="(item,index) in letBallData" :key="item.id" @click="bettingChange()">
         <div class="row allAlignment haderBox center">
           <span>{{item.leagueName}}</span>
           <div class="Match-title-num">
             <span>{{item.matchNum}}</span>
           </div>
         </div>
-        <div v-for="(itemList,$index) in item.matchData" :key="itemList.id"   @click="matchInfo(itemList.match_id)">
- 
-            <div class="box">
-              <div class="row allAlignment item-center top-box">
-                <span>
-                  <i>{{itemList.match_date}}</i>
-                  <b style="color:#F76649;font-weight: normal;">{{itemList.match_time}}</b>
-                </span>
-                <span class="top-num">{{itemList.tag}}</span>
-              </div>
+        <div
+          v-for="(itemList,$index) in item.matchData"
+          :key="itemList.id"
+          @click="matchInfo(itemList.match_id)"
+        >
+          <div class="box noPd">
+            <div class="row allAlignment item-center top-box">
+              <span>
+                <i>{{itemList.match_process}}</i>
+                 <span class="texttop" v-if="activity == 'StRollBall'">{{itemList.a_time}}</span>
+                <span class="texttop" v-if="activity == 'StSoon'">{{itemList.wait_time}}分钟</span>
+                <!-- <b style="color:#F76649;font-weight: normal;">{{itemList.a_time}}</b> -->
+              </span>
+              <span class="top-num">{{itemList.tag}}</span>
             </div>
-            <div class="box-bottom">
-              <div class="box row item-center main-box">
-                <span v-if="itemList.home_score" class="num-box" style="color:#eb921e">{{itemList.home_score}}</span>
-                &nbsp;&nbsp;{{itemList.home_team}}
-              </div>
-              <div class="box row item-center main-box">
-                <span v-if="itemList.guest_score? itemList.guest_score:'0'" class="num-box" style="color:#eb921e">{{itemList.guest_score}}</span>
-                &nbsp;&nbsp;{{itemList.guest_team}}
-              </div>
-              <div class="footBox">
+          </div>
+          <div class="box-bottom">
+            <div class="box row item-center main-box">
+              <span
+                v-if="itemList.home_score == '0' || itemList.home_score"
+                class="num-box"
+                style="color:#eb921e"
+              >{{itemList.home_score}}</span>
+              <span v-else style="color:#eb921e">{{itemList.home_score}}</span>
+              &nbsp;&nbsp;{{itemList.home_team}}
+            </div>
+            <div class="box row item-center main-box">
+              <span
+                v-if="itemList.guest_score"
+                class="num-box"
+                style="color:#eb921e"
+              >{{itemList.guest_score}}</span>
+              <span v-else style="color:#eb921e">{{itemList.guest_score}}</span>
+              &nbsp;&nbsp;{{itemList.guest_team}}
+            </div>
+            <div class="footBox">
+              <div
+                class="box row allAlignment bottom-box center"
+                v-for="(odds,idx) in itemList.oddsData[1]"
+                :key="odds.id"
+              >
                 <div
-                  class="box row allAlignment bottom-box center"
-                  v-for="(odds,idx) in itemList.oddsData[1]"
-                  :key="odds.id"
+                  class="item-center bottom-num"
+                  :class="item.istrueA==true?'active':''"
+                  @click.stop="isClick(idx,1)"
                 >
-                  <div
-                    class="item-center bottom-num"
-                    :class="item.istrueA==true?'active':''"
-                    @click.stop="isClick(idx,1)"
-                  >
-                    <p style="color:#eb921e">{{odds.condition}}</p>
-                    <p>{{odds.odds}}</p>
-                  </div>
+                  <p style="color:#eb921e">{{odds.condition}}</p>
+                  <p>{{odds.odds}}</p>
                 </div>
-       
+              </div>
             </div>
           </div>
         </div>
       </div>
     </div>
     <!-- 独赢盘 -->
-      <div class="match" v-if="!isShow && ishow && rShow">
-        <div v-for="(items,index) in letBallData" :key="items.id" class="mg">
+    <div class="match" v-if="!isShow && ishow && rShow">
+      <div v-for="(items,index) in letBallData" :key="items.id" class="mg">
         <!-- <div v-for="items in list[index]" :key="items.id"> -->
         <div class="row allAlignment letBallBox center">
           <span>{{items.leagueName}}</span>
@@ -111,36 +177,41 @@
           </div>
         </div>
         <div class="Match-box">
-          <div v-for="(itemList,index) in items.matchData" :key="itemList.id" class="Match-box"   @click="matchInfo(itemList.match_id)">
-        
-              <div class="row allAlignment Match-box-top">
-                <div class="Match-box-top-left">
-                  <span>{{itemList.match_date}}</span>
-                  <span class="texttop">{{itemList.match_time}}</span>
-                </div>
-                <div class="Match-box-top-right row">
-                  <span style="margin-right: .1rem;" class="Match-box-top-num">{{itemList.tag}}</span>
-                  <!-- <span style="margin-right: .1rem;">让球</span> -->
-                  <span style="margin-right: .1rem;">独赢盘</span>
-                </div>
+          <div
+            v-for="(itemList,index) in items.matchData"
+            :key="itemList.id"
+            class="Match-box"
+            @click="matchInfo(itemList.match_id)"
+          >
+            <div class="row allAlignment Match-box-top">
+              <div class="Match-box-top-left">
+                <!-- <span>{{itemList.match_date}}</span>
+                <span class="texttop">{{itemList.match_time}}</span> -->
+                 <span class="texttop" v-if="activity == 'StRollBall'">{{itemList.a_time}}</span>
+                <span class="texttop" v-if="activity == 'StSoon'">{{itemList.wait_time}}分钟</span>
               </div>
-              <div class="row allAlignment center listbox">
-                <div class="column average name-box">
-                  <div>{{itemList.home_team}}</div>
-                  <div>{{itemList.guest_team}}</div>
-                </div>
-                <div class="Match-list-box row item-center average">
-                  <div v-for="(odds,i) in itemList.oddsData[0]" :key="odds.id" class="match-list">
-                    <div
-                      @click.stop="isclick(index,i)"
-                      class="column center"
-                      :class="items.istrue==i?'active':''"
-                    >
-                      <span style="color:#FD8F26">{{odds.condition}}</span>
-                      <span>{{odds.odds}}</span>
-                    </div>
+              <div class="Match-box-top-right row">
+                <span style="margin-right: .1rem;" class="Match-box-top-num">{{itemList.tag}}</span>
+                <!-- <span style="margin-right: .1rem;">让球</span> -->
+                <span style="margin-right: .1rem;">独赢盘</span>
+              </div>
+            </div>
+            <div class="row allAlignment center listbox">
+              <div class="column average name-box">
+                <div>{{itemList.home_team}}</div>
+                <div>{{itemList.guest_team}}</div>
+              </div>
+              <div class="Match-list-box row item-center average">
+                <div v-for="(odds,i) in itemList.oddsData[0]" :key="odds.id" class="match-list">
+                  <div
+                    @click.stop="isclick(index,i)"
+                    class="column center"
+                    :class="items.istrue==i?'active':''"
+                  >
+                    <span style="color:#FD8F26">{{odds.condition}}</span>
+                    <span>{{odds.odds}}</span>
                   </div>
-         
+                </div>
               </div>
             </div>
           </div>
@@ -148,7 +219,7 @@
       </div>
     </div>
     <!-- 如过是网球则显示 -->
-        <div class="match" v-if="isShow && !rShow">
+    <div class="match" v-if="isShow && !rShow">
       <div v-for="(items,index) in letBallData" :key="items.id" class="mg">
         <!-- <div v-for="items in list[index]" :key="items.id"> -->
         <div class="row allAlignment letBallBox center">
@@ -158,75 +229,93 @@
           </div>
         </div>
         <div class="Match-box">
-          <div v-for="(itemList,index) in items.matchData" :key="itemList.id" class="Match-box"   @click="matchInfo(itemList.match_id)">
-        
-              <div class="row allAlignment Match-box-top">
-                <div class="Match-box-top-left">
-                  <span>{{itemList.match_date}}</span>
-                  <span class="texttop">{{itemList.match_time}}</span>
-                </div>
-                <div class="Match-box-top-right row">
-                  <span style="margin-right: .1rem;" class="Match-box-top-num">{{itemList.tag}}</span>
-                  <span style="margin-right: .1rem;">独赢盘</span>
-                  <span style="margin-right: .1rem;">让盘</span>
-                </div>
+          <div
+            v-for="(itemList,index) in items.matchData"
+            :key="itemList.id"
+            class="Match-box"
+            @click="matchInfo(itemList.match_id)"
+          >
+            <div class="row allAlignment Match-box-top">
+              <div class="Match-box-top-left">
+                <!-- <span>{{itemList.match_date}}</span> -->
+                <!-- <span class="texttop">{{itemList.wait_time}}分钟</span> -->
+                 <span class="texttop" v-if="activity == 'StRollBall'">{{itemList.a_time}}</span>
+                <span class="texttop" v-if="activity == 'StSoon'">{{itemList.wait_time}}分钟</span>
               </div>
-              <div class="row allAlignment center listbox">
-                <div class="column average name-box">
-                  <div>{{itemList.home_team}}</div>
-                  <div>{{itemList.guest_team}}</div>
-                </div>
-                <div class="Match-list-box row item-center average">
-                  <div v-for="(odds,i) in itemList.oddsData[0]" :key="odds.id" class="match-list">
-                    <div
-                      @click.stop="isclick(index,i)"
-                      class="column center"
-                      :class="items.istrue ? 'active':''"
-                    >
-                      <span style="color:#FD8F26">{{odds.condition}}</span>
-                      <span>{{odds.odds}}</span>
-                    </div>
+              <div class="Match-box-top-right row">
+                <span style="margin-right: .1rem;" class="Match-box-top-num">{{itemList.tag}}</span>
+                <span style="margin-right: .1rem;">独赢盘</span>
+                <span style="margin-right: .1rem;">让盘</span>
+              </div>
+            </div>
+            <div class="row allAlignment center listbox">
+              <div class="column average name-box">
+                <div>{{itemList.home_team}}</div>
+                <div>{{itemList.guest_team}}</div>
+              </div>
+              <div class="Match-list-box row item-center average">
+                <div v-for="(odds,i) in itemList.oddsData[0]" :key="odds.id" class="match-list">
+                  <div
+                    @click.stop="isclick(index,i)"
+                    class="column center"
+                    :class="items.istrue ? 'active':''"
+                  >
+                    <span style="color:#FD8F26">{{odds.condition}}</span>
+                    <span>{{odds.odds}}</span>
                   </div>
                 </div>
               </div>
             </div>
           </div>
+        </div>
       </div>
     </div>
     <div class="BettingWindow" v-if="isWindow">
-      <BettingWindow />
+      <BettingWindow/>
     </div>
-
   </div>
 </template>
 <script>
 import Bus from "../assets/bus.js";
 import NotOpend from "@/components/StNotOpend";
-import BettingWindow from '@/components/StBettingWindow';
+import BettingWindow from "@/components/StBettingWindow";
 export default {
-  props: ["gameCode", "name",'ishow'],
-  components:{NotOpend,BettingWindow},
+  props: ["gameCode", "name", "ishow"],
+  components: { NotOpend, BettingWindow },
   data() {
     return {
       show: false, //暂时状态
       isShow: true,
       noData: true, //显示暂无数据
-      rShow:true,//是否为棒球与网球,是则不显示
+      rShow: true, //是否为棒球与网球,是则不显示
       info: "没有相关比赛信息",
       status: false,
-      isWindow :false,//投注组件隐藏
-      isAjax:false,//开关
-      list:[],
-      letBallData: "" ,//让球大小和1X2数据
+      isWindow: false, //投注组件隐藏
+      isAjax: false, //开关
+      list: [],
+      letBallData: [], //让球大小和1X2数据
+      timers: true,
+      activity:'',
+      betting: 10000, //vuex里面玩法投注数据
+      thisNum: 10000, //vuex里面
+      index: '',
     };
   },
   /**
    * 函数方法
    */
   methods: {
-    matchInfo(id){
-      this.$router.push({path:'/StRollBallBettingPage',query:{gameCode: this.$store.getters.getBallId,number:1,home:true}});
-      this.$store.dispatch("MACTH_ID",id);
+    matchInfo(id) {
+      this.$router.push({
+        path: "/StRollBallBettingPage",
+        query: {
+          gameCode: this.$store.getters.getBallId,
+          number: 1,
+          home: true,
+          name:this.name
+        }
+      });
+      this.$store.dispatch("MACTH_ID", id);
     },
     //打开联赛投注页面
     goMatchInfo: function(leagueId, sessionId) {
@@ -236,52 +325,238 @@ export default {
         this.isShow = data;
       });
     },
-    getAjax: function(game_code,type_code) {
-      this.$store.dispatch('GETSHOW',true);
-      if(!game_code || !type_code) return false;
+    getAjax: function(game_code, type_code) {
+      this.$store.dispatch("GETSHOW", true);
+      if (!game_code || !type_code) return false;
       this.$http
-        .get(this.$ports.match.matchState, { 
+        .get(this.$ports.match.matchState, {
           game_code,
           type_code
         })
         .then(res => {
-          this.isAjax = true
-          if(res.data.status == 1 && res.data.data.length >0  && res.data != null){
+          this.isAjax = true;
+          if (
+            res.data.status == 1 &&
+            res.data.data.length > 0 &&
+            res.data != null
+          ) {
             this.letBallData = res.data.data;
-          // console.log('  this.letBallData',  this.letBallData)
-           this.noData = false;
-          }else{
+            // console.log('  this.letBallData', res)
+            this.noData = false;
+            for (var i = 0; i < res.data.data.length; i++) {
+      
+
+              if (
+                res.data.data[i].matchData &&
+                res.data.data[i].matchData.length < 1
+              ) {
+              } else if (
+                res.data.data[i].matchData &&
+                res.data.data[i].matchData.length > 0
+              ) {
+                this.dataGroup(res.data.data[i], i);
+              }
+              //
+            }
+          } else {
             //  是否显示组件
             this.noData = true;
             //console.log('data',this.noData)
             // 每次更新数据没有数据时则置空。
-             this.letBallData = [];
-            
+            this.letBallData = [];
           }
           // 状态值数据更改
-          this.$store.dispatch('GETSHOW',false);
+          this.$store.dispatch("GETSHOW", false);
+        
         });
+        if(this.activity == 'StRollBall'){
+          let _this = this;
+           console.log('111',this.letBallData)
+          _this.letBallData.forEach(val => {
+            console.log('val',val)
+            val.matchData.forEach(e =>{
+            console.log('110', e.a_time)
+                 let [f, s] = e.a_time.split(":");
+              if (e.a_time != "") {
+              let [f, s] = e.a_time.split(":");
+              this.$public.timer(f, s, function(f, s) {
+                e.a_time = f + ":" + s;
+              });
+            }
+            })
+            
+          });
+     
+        }
+    },
+    /*--------------------------------------------------------------------------------*/
+    // 添加、删除vuex投注数据公共方法
+    AddDelete: function(id, home, guest, name, odds, condition, odds_only) {
+      let isAdd = true;
+      let bettingInfo = {
+        id,
+        home_team: home,
+        guest_team: guest,
+        name,
+        odds,
+        condition,
+        ganame: "concede_size",
+        score: this.score,
+        bettingTime: "",
+        odds_only
+      };
+      let matchList = this.$store.getters.getBetting;
+      if (this.thisNum != 10000) {
+        //删除vuex投注数据
+        matchList[this.thisNum].data.forEach((res, index) => {
+          if (res.id == id) {
+            matchList[this.thisNum].data.splice(index, 1);
+            this.$store.dispatch("BETTING", matchList);
+            isAdd = false;
+          }
+        });
+        //添加vuex投注数据
+        if (isAdd) {
+          matchList[this.thisNum].data.push(bettingInfo);
+          this.$store.dispatch("BETTING", []);
+          this.$store.dispatch("BETTING", matchList);
+          if (this.$store.getters.getIsBetting) return false;
+          this.$store.dispatch("ISBETTING", true);
+        }
+      } else {
+        //添加新的玩法赔率数据
+        let obj = {
+          title: "concede_size",
+          data: [bettingInfo]
+        };
+        //判断vuex有误其它玩法数据
+        if (matchList) {
+          matchList.push(obj);
+        } else {
+          this.$store.dispatch("BETTING", [obj]);
+        }
+      }
+      // console.log(this.$store.getters.getIsBetting);
+      if (this.$store.getters.getIsBetting) return false;
+      this.$store.dispatch("ISBETTING", true);
+    },
+
+    /*--------------------------------------------------------------------------------*/
+    //修改当前页面样式公共方法
+    modifyStyle: function($index,id, type) {
+      // console.log(id, type);
+      this.letBallData[$index].matchData.every(e => {
+        let ret = false;
+        if (type == "homeOdds") {
+          e.oddsData[0].homeOdds.every((res, index) => {
+            if (res.id == id) {
+              this.$set(
+                e.oddsData.homeOdds[index],
+                "isTrue",
+                res.isTrue ? false : true
+              );
+              ret = true;
+              return false;
+            }
+            return true;
+          });
+        } else if (type == "guestOdds") {
+          e.oddsData[0].guestOdds.every((res, index) => {
+            if (res.id == id) {
+              this.$set(
+                e.oddsData[0].guestOdds[index],
+                "isTrue",
+                res.isTrue ? false : true
+              );
+              ret = true;
+              return false;
+            }
+            return true;
+          });
+        }
+        if (ret) {
+          return false;
+        } else {
+          return true;
+        }
+      });
+    },
+    /*--------------------------------------------------------------------------------*/
+    // 修改投注样式
+    isBetting($index,id, home, guest, name, odds, condition, odds_only, type) {
+      this.index = $index;
+      console.log(this.letBallData);
+      if (this.letBallData) {
+        //处理vuex里面数据
+        this.AddDelete(id, home, guest, name, odds, condition, odds_only);
+        //处理当前页面样式
+        this.modifyStyle($index,id, type);
+      }
+    },
+
+    dataGroup: function(data, i) {
+      let homeOdds = [],
+        guestOdds = [];
+      let A, B, C, D;
+      // console.log('aaaaaa',data)
+      data.matchData.forEach((column, index) => {
+        if (column.oddsData[0] == null || column.oddsData[0].length == 0) {
+          column.oddsData[0] = {
+            homeOdds: [{ status: -1 }, { status: -1 }],
+            guestOdds: [{ status: -1 }, { status: -1 }]
+          };
+        } else {
+          column.oddsData[0].forEach(val => {
+            if (this.betting != 10000) {
+              this.betting.forEach(e => {
+                if (val.id == e.id) {
+                  val.isTrue = true;
+                  //this.$set(val,'isTrue',true);
+                }
+              });
+            }
+            if (val.odds_code == "concede_home") {
+              A = val;
+            } else if (val.odds_code == "size_home") {
+              B = val;
+            } else if (val.odds_code == "concede_guest") {
+              C = val;
+            } else if (val.odds_code == "size_guest") {
+              D = val;
+            }
+          });
+          column.oddsData[0] = {};
+          column.oddsData[0].homeOdds = [];
+          column.oddsData[0].homeOdds.push(A);
+          column.oddsData[0].homeOdds.push(B);
+          column.oddsData[0].guestOdds = [];
+          column.oddsData[0].guestOdds.push(C);
+          column.oddsData[0].guestOdds.push(D);
+        }
+      });
+
+      this.letBallData[i] = data;
+      // console.log("data", this.letBallData);
     },
     isClick() {
-    
-            if(this.$store.getters.getIsBetting==true){
-           return false
-       }
-      
-        this.$store.dispatch('ISBETTING',true)
+      if (this.$store.getters.getIsBetting == true) {
+        return false;
+      }
+
+      this.$store.dispatch("ISBETTING", true);
       // this.$set(this.letBallData.matchData[1].oddsData[1][i], "istrue", (this.letBallData.list[i].istrue = num));
     },
-    betting(){
+    bettingChange() {
       this.isWindow = true;
     },
     // 点击事件确认选中
     isclick(index, num) {
-        console.log(this.letBallData)
-       if(this.$store.getters.getIsBetting==true){
-           return false
-       }
-      
-        this.$store.dispatch('ISBETTING',true)
+      console.log(this.letBallData);
+      if (this.$store.getters.getIsBetting == true) {
+        return false;
+      }
+
+      this.$store.dispatch("ISBETTING", true);
     }
   },
   /**
@@ -291,32 +566,144 @@ export default {
     getInfo: function() {
       // 监听vuex状态值的改变
       this.goMatchInfo();
- 
-      return {game_code: this.$store.getters.getBallId,type_code:this.$store.getters.getActivity}
+
+      return {
+        game_code: this.$store.getters.getBallId,
+        type_code: this.$store.getters.getActivity
+      };
+    },
+    IsWindow: function() {
+      return this.$store.getters.getIsBetting;
+    },
+    // 获取滚动状态
+    getscorllcode() {
+      return this.$public.getCache("box_size");
     },
-     IsWindow(){
-      return  this.$store.getters.getIsBetting
+    getBetting() {
+      return this.$store.getters.getBetting;
+    },
+    //获取投注框删除的投注信息
+    getDeleteType() {
+      return this.$store.getters.getDeleteType;
+    },
+    getActivity:function(){
+      return  this.$store.getters.getActivity;
     }
   },
   watch: {
+    getActivity(val){
+      this.activity = val;  
+    },
     getInfo(obj) {
-         if(this.$store.getters.getActivity == "StSoon" || this.$store.getters.getActivity == "StRollBall" ){
-        if(this.isAjax ){
-        this.getAjax(obj.game_code,obj.type_code);
+      if (
+        this.$store.getters.getActivity == "StSoon" ||
+        this.$store.getters.getActivity == "StRollBall"
+      ) {
+        if (this.isAjax) {
+          this.getAjax(obj.game_code, obj.type_code);
         }
       }
-      if(obj.game_code == 'wq'){
-          this.rShow = false;
-      }else{
+      if (obj.game_code == "wq") {
+        this.rShow = false;
+      } else {
         this.rShow = true;
       }
     },
-      IsWindow(val){
-       this.isWindow = val;
+    /*--------------------------------------------------------------------------------*/
+    // 监听投注框开关
+    IsWindow(val) {
+      console.log(val);
+      this.isWindow = val;
+    },
+    // 监听滚动状态变化赋值滚动
+    getscorllcode(val) {
+      this.scorll = val;
+    },
+    getDeleteType(val) {
+      let flag = true;
+      // 下标问题
+      this.letBallData.matchData.forEach(e => {
+        if (val == "all") {
+          e.oddsData.guestOdds.forEach(data => {
+            this.$set(data, "isTrue", false);
+          });
+          e.oddsData.homeOdds.forEach(data => {
+            this.$set(data, "isTrue", false);
+          });
+        } else {
+          let showData = true;
+          e.oddsData.guestOdds.forEach(data => {
+            if (data.id == val) {
+              this.$set(data, "isTrue", false);
+              showData = false;
+            }
+          });
+          if (showData) {
+            e.oddsData.homeOdds.forEach(data => {
+              if (data.id == val) {
+                this.$set(data, "isTrue", false);
+              }
+            });
+          }
+        }
+      });
+    },
+    /*--------------------------------------------------------------------------------*/
+    //获取已投注信息
+    getBetting(val) {
+      //获取vuex玩法已投注相对应的数据
+      if (val) {
+        val.forEach((e, index) => {
+          if ("concede_size" == e.title) {
+            this.thisNum = index;
+            this.betting = e.data;
+          }
+        });
+      }
+    },
+
+    /*--------------------------------------------------------------------------------*/
+  },
+  mounted() {
+    this.activity =  this.$store.getters.getActivity;
+    let _this = this;
+      // 获取是否滑动信息
+    if (this.$public.getCache("box_size") == 1) {
+      this.isshrink = true;
+    }
+    //是否展示投注框
+    if (this.$store.getters.getIsBetting) {
+      this.isWindow = true;
+    }
+    //获取vuex玩法已投注相对应的数据
+    let getBetting = this.$store.getters.getBetting;
+    if (getBetting) {
+      getBetting.forEach((e, index) => {
+        if ("concede_size" == e.title) {
+          this.thisNum = index;
+          this.betting = e.data;
+        }
+      });
     }
+
+
+
+    this.$public.ajaxTimerFun(function(timing) {
+      _this.getAjax(
+        _this.$store.getters.getBallId,
+        _this.$store.getters.getActivity
+      );
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
+    this.getAjax(
+      this.$store.getters.getBallId,
+      this.$store.getters.getActivity
+    );
   },
-  mounted(){
-    this.getAjax(this.$store.getters.getBallId,this.$store.getters.getActivity);
+  beforeDestroy() {
+    this.timers = false;
   }
 };
 </script>
@@ -401,9 +788,13 @@ div /deep/ .yd-accordion-head-arrow:after {
 /* 1x2 */
 .top-box {
   height: 0.44rem;
-  font-size: 0.24rem;
-  background: #fff;
+  /* font-size: 0.24rem;
+  background: #fff; */
   border-bottom: 1px solid #e4e4e4;
+  padding: 0 0.32rem;
+  line-height: 0.44rem;
+  background: #dcdcdc;
+  font-size: 0.23rem;
 }
 .box-bottom {
   /* height: 2.9rem;  */
@@ -422,6 +813,13 @@ div /deep/ .yd-accordion-head-arrow:after {
   padding: 0 0.32rem;
   background: #fff;
 }
+.noPd {
+  padding: 0;
+}
+.noBox {
+  padding: 0;
+  background: #f8f8f8;
+}
 .Match-title-num {
   width: 0.46rem;
   height: 0.46rem;
@@ -440,7 +838,7 @@ div /deep/ .yd-accordion-head-arrow:after {
 }
 .main-box {
   height: 0.9rem;
-  background: #fff;
+  /* background: #fff; */
   font-size: 0.28rem;
 }
 .bottom-box {
@@ -512,8 +910,8 @@ div /deep/ .yd-accordion-head-arrow:after {
   width: 1.07rem;
   text-align: center;
 }
-.listbox{
-  padding: 0 .32rem;
+.listbox {
+  padding: 0 0.32rem;
 }
 .name-box {
   height: 1.76rem;
@@ -523,21 +921,21 @@ div /deep/ .yd-accordion-head-arrow:after {
   height: 0.44rem;
   padding: 0 0.32rem;
   line-height: 0.44rem;
-  background: #DCDCDC;
+  background: #dcdcdc;
   font-size: 0.23rem;
 }
 .Match-box-top-num {
-  width:0.64rem !important;
-  
+  width: 0.64rem !important;
+
   height: 0.44rem;
   background: #ebebeb;
   font-size: 0.24rem;
 }
-.texttop{
-  color: #f76649
+.texttop {
+  color: #f76649;
 }
 .Match-box {
-  padding-top: .12rem;
+  padding-top: 0.12rem;
   background: #f8f8f8;
 }
 .Match-list-box {
@@ -556,11 +954,69 @@ div /deep/ .yd-accordion-head-arrow:after {
   background: #e4e4e4;
 }
 /* 模态框样式 */
-.BettingWindow{
+.BettingWindow {
   z-index: 10000;
-  position:fixed;
-  top:0;
+  position: fixed;
+  top: 0;
   width: 100%;
 }
+/* 后加 */
+.Match-title-num {
+  width: 0.46rem;
+  height: 0.46rem;
+  line-height: 0.46rem;
+  text-align: center;
+  background: #f76649;
+  font-size: 0.26rem;
+  border-radius: 50%;
+  color: #f5f5f5;
+}
 
+.Match-box-top-right > span {
+  width: 1.07rem;
+  text-align: center;
+}
+.name-box {
+  height: 1.76rem;
+}
+.Match-box-top {
+  height: 0.45rem;
+  line-height: 0.45rem;
+  background: #dcdcdc;
+  font-size: 0.23rem;
+  padding: 0 0.32rem;
+}
+.Match-box-top-num {
+  width: 0.64rem !important;
+  height: 0.45rem;
+  background: #ebebeb;
+  font-size: 0.24rem;
+}
+.Match-box {
+  background: #f8f8f8;
+}
+.Match-bottom-right {
+  height: 2rem;
+  padding: 0.1rem 0.1rem 0 0.14rem;
+}
+.Match-list-left div {
+  width: 1.07rem;
+  height: 0.76rem;
+  border: 1px solid #e4e4e4;
+  border-radius: 0.1rem;
+  padding: 0.1rem;
+  margin: 0.06rem 0.08rem;
+}
+.Match-list-right div {
+  width: 1.07rem;
+  height: 0.76rem;
+  border: 1px solid #e4e4e4;
+  border-radius: 0.1rem;
+  margin: 0.06rem 0.08rem;
+}
+.active {
+  background: #f76649;
+  border: none;
+  color: #e1e1df !important;
+}
 </style>

+ 79 - 12
vue_sports/src/components/StNavBall.vue

@@ -1,6 +1,7 @@
 <template>
   <div>
-    <div class="Serch" v-if="headShow">
+    <div class="Serch">
+    <!-- <div class="Serch" v-if="headShow"> -->
       <div class="Soccer-game row center">
         <div class="Soccer-game-title row center" @click="isreturn()">
           <img class="returnimg" :src="img.searchreturn">
@@ -97,7 +98,8 @@
 import NotOpend from "@/components/StNotOpend";
 import "../css/index.css";
 export default {
-  props: ["name", "headShow"],
+  props: ["name"],
+  // props: ["name", "headShow"],
   data() {
     return {
       isShow: true, //如果为串场则把导航显示出来,否则不显示
@@ -136,7 +138,8 @@ export default {
         ]
       },
       active: 0,
-      arr: [] //时间条
+      arr: [], //时间条
+      timers: true
     };
   },
   components: {
@@ -161,7 +164,7 @@ export default {
         time2.title = years + "-" + month + "-" + day;
         this.arr.push(time2);
         if (i == 6) {
-          this.arr.push({ id: "morning", title: "其他早盘" });
+          this.arr.push({ id: "other", title: "其他早盘" });
         }
       }
       this.datetimeNum = this.arr[0].id;
@@ -189,10 +192,10 @@ export default {
             res.data.data.length > 0 &&
             res.data.data != null
           ) {
-            console.log("数据", res.data);
             this.Regulations.title = res.data.data.type;
             this.noData = false;
             this.data = res.data.data;
+            console.log("数据", this.data);
           } else {
             this.data = "";
             this.noData = true;
@@ -200,6 +203,7 @@ export default {
         });
     },
     //获取冠军盘口数据
+    // 暂不使用
     getChampion: function(typeGame, search) {
       console.log("冠军盘口");
       this.$store.dispatch("GETSHOW", true);
@@ -301,7 +305,20 @@ export default {
       this.datetimeNum = id;
       this.sear = id;
       this.SerchValue = "";
+      this.entryShow = true;
       this.getAjaxInfo("", "", id);
+      this.timers = false;
+      let _this = this;
+    //   if(this.$store.getters.getActivity == 'StMorningPlate'){
+    //     this.timers = true;
+    //   this.$public.ajaxTimerFun(function(timing) {
+    //   _this.getAjaxInfo("", "", id);
+    //   if (!_this.timers) {
+    //     clearInterval(timing);
+    //   }
+    // });
+    //   }
+
     },
     //打开联赛投注页面
     goMatchInfo: function(sessionId, code) {
@@ -371,6 +388,25 @@ export default {
     if (this.listnum != 1) {
       this.entryShow = true;
     }
+      let _this = this;
+    // 判断4种玩法的轮询
+    if(this.$store.getters.getActivity == 'StToday' || this.$store.getters.getActivity == 'StStringScene' || this.$store.getters.getActivity == 'StChampion'){
+    this.$public.ajaxTimerFun(function(timing) {
+      _this.getAjaxInfo();
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
+    }else  if(this.$store.getters.getActivity == 'StMorningPlate'){
+      this.$public.ajaxTimerFun(function(timing) {
+      _this.getAjaxInfo("", "",_this.datetimeNum);
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
+      }
+  
+    
   },
   computed: {
     getActivity: function() {
@@ -399,20 +435,51 @@ export default {
   },
   watch: {
     getActivity(val) {
+      this.timers = false;
+      let _this = this;
       // 判断是不是早盘,是则显示时间条
       if (this.$store.getters.getActivity == "StMorningPlate") {
+        this.timers = true;
+              this.$public.ajaxTimerFun(function(timing) {
+      _this.getAjaxInfo("", "",_this.datetimeNum);
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
         this.dayShow = true;
       } else {
         this.dayShow = false;
       }
-      //       if (this.$store.getters.getActivity == "StStringScene" || this.$store.getters.getActivity == "StChampion") {
-      //   this.str_type = true;
-
-      // } else {
-      //   this.str_type = false;
-
-      // }
+      if (this.$store.getters.getActivity != "StStringScene") {
+        this.entryShow = true;
+      }else if(this.listnum != 1){
+          this.entryShow = true;
+      } 
+      else {
+        this.entryShow = false;
+        this.timers = true;
+                this.$public.ajaxTimerFun(function(timing) {
+      _this.getAjaxInfo("", "", "", _this.listnum);
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
+           
+      }
+      // 轮询造轮子
+      if(this.$store.getters.getActivity == 'StToday' || this.$store.getters.getActivity == 'StChampion'){
+        this.timers = true;
+            this.$public.ajaxTimerFun(function(timing) {
+      _this.getAjaxInfo();
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
+      }
     }
+  },
+  beforeDestroy(){
+    this.timers = false;
   }
 };
 </script>

+ 2 - 2
vue_sports/src/components/StRollingBall.vue

@@ -10,7 +10,7 @@
   import '../css/index.css';
  
   export default {
-    props: ["name",'index','id','type','gameCode','ballName'],
+    props: ["name",'index','id','type','gameCode','ballName','gameCode','lgId'],
     data() {
       return {
       };
@@ -22,7 +22,7 @@
             this.$store.dispatch('GET_BALL_ID',this.id);
             this.$router.push({ path: '/StRollBallpage', query:{ titleNumber: e }});
           }else{
-            this.$router.push({path:'/StLeagueBetting',query:{ id:this.index,gameCode:this.gameCode,name:this.name,number: 0 ,home:true}});
+            this.$router.push({path:'StLeagueList',query:{ gameCode:this.gameCode,lgId:this.lgId, id:this.index,gameCode:this.gameCode,name:this.name,number: 0 ,home:true,btn:2}});
           
          }
        }

File diff suppressed because it is too large
+ 564 - 383
vue_sports/src/components/StSerch.vue


+ 316 - 166
vue_sports/src/components/StSerchBox.vue

@@ -1,5 +1,6 @@
 <template>
-  <div>
+  <!-- 禁止滚动 -->
+  <div :class="scorll=='2'?'noscorll':''">
     <div class="Serch row item-center">
       <div class="Soccer-game row item-center">
         <div
@@ -72,7 +73,7 @@
               class="Match-list-left"
               v-for="(items,indexs) in item.oddsData.homeOdds"
               :key="indexs"
-              @click.stop="isBetting(items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,'homeOdds')"
+              @click.stop="bteBetting(item.match_id, items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,items.odds_only,'homeOdds')"
             >
               <div :class="{ 'active' : items.isTrue == true}" class="column center">
                 <span style="color:#FD8F26">{{items.condition}}</span>
@@ -86,7 +87,7 @@
               class="Match-list-right row"
               v-for="(items,indexs) in item.oddsData.guestOdds"
               :key="indexs"
-              @click.stop="isBetting(items.id,item.home_team,item.guest_team,item.guest_team,items.odds,items.condition,'guestOdds')"
+              @click.stop="bteBetting(item.match_id,items.id,item.home_team,item.guest_team,item.guest_team,items.odds,items.condition,items.odds_only,'guestOdds')"
             >
               <div :class="{'active':items.isTrue==true}" class="column center">
                 <span>
@@ -100,40 +101,44 @@
       </div>
     </div>
     <!-- 冠军组件 -->
-   <div class="champion" v-if="championShow">
-      <div class="title">
-        <span>{{this.ChampionData.title}}</span>
-        <div class="time">
-          <span>2019年5月29日</span>
-          <span>15:00</span>
+    <div class="champion" v-if="championShow">
+      <div v-for="item in ChampionData" :key="item.id">
+        <div class="title">
+          <span>{{item.name}}</span>
+          <div class="time">
+            <!-- <span>2019年5月29日</span> -->
+            <span>{{item.last_time}}</span>
+          </div>
         </div>
-      </div>
-      <div  v-for="(item,index) in ChampionData.dataList" :key="item.id">
-        <div class="chmpTit">{{item.name}}</div>
-      <div  v-for="items in ChampionData.dataList[index].data" :key="items.id">  
-        <div class="list">
-          <span class="chmName">{{items.team}}</span>
-          <span class="num">{{items.odds}}</span>
+      <div v-for="(items) in item.data" :key="items.id">
+        <div class="chmpTit">{{items.title}}</div>
+        <div v-for="itemList in items.datas" :key="itemList.id">
+          <div class="list">
+            <span class="chmName">{{itemList.team}}</span>
+            <span class="num">{{itemList.odds}}</span>
+          </div>
         </div>
       </div>
-      </div>
-    </div>
-    <div class="BettingWindow" v-show="isWindow">
-      <BettingWindow/>
     </div>
+    
     <div v-if="noData">
       <NotOpend :title="this.info"/>
     </div>
+    </div>
     <!-- <div class = "lod">
       <Loading></Loading>
     </div>-->
+    <div class="BettingWindow" v-show="isWindow">
+      <BettingWindow />
+    </div>
   </div>
 </template>
 
 <script>
-import BettingWindow from "@/components/StBettingWindow";
+import BettingWindow from "./StBettingWindow.vue";
 import NotOpend from "@/components/StNotOpend";
 import Loading from "@/components/StLoading";
+
 export default {
   name: "SerchBox",
   data() {
@@ -143,18 +148,20 @@ export default {
       title: " ", //标题
       data: "",
       isShow: true,
+      scorll: "", //背景滚动
       isAddData: false, //判断是否添加
       game_code: this.$route.query.game_code, //球的类型别名
       leagueID: this.$route.query.leagueID, //获取联赛id
       isWindow: false,
-      score:'0',//比分
+      score: "0", //比分
       codeShow: false, // 如果是参赛表传值过来,则显示另一部分
       info: "没有相关联赛信息",
       noData: false, //没有数据为true
       betting: 10000, //vuex里面玩法投注数据
       thisNum: 10000, //vuex里面
       championShow: false, //冠军组件显示
-      ChampionData:'',//冠军数据
+      ChampionData: "", //冠军数据
+      timers : false
     };
   },
   components: {
@@ -166,7 +173,7 @@ export default {
    *函数方法
    */
   methods: {
-
+    
     /*--------------------------------------------------------------------------------*/
     // 返回上一页
     isreturn() {
@@ -249,80 +256,90 @@ export default {
 
     /*--------------------------------------------------------------------------------*/
     // 添加、删除vuex投注数据公共方法
-    AddDelete:function(id,home,guest,name,odds,condition){
+    AddDelete: function(match_id,id, home, guest, name, odds, condition, odds_only) {
       let isAdd = true;
       let bettingInfo = {
         id,
-        home_team:home,
-        guest_team:guest,
+        home_team: home,
+        guest_team: guest,
         name,
         odds,
+        match_id,
         condition,
-        ganame:'concede_size',
-        score:this.score,
-        bettingTime:'',
-
-      }
+        ballId:this.$store.getters.getBallId,
+        ganame: "concede_size",
+        score: this.score,
+        bettingTime: "",
+        odds_only
+      };
       let matchList = this.$store.getters.getBetting;
       if (this.thisNum != 10000) {
         //删除vuex投注数据
-          matchList[this.thisNum].data.forEach((res, index) => {
-            if (res.id == id) {
-              matchList[this.thisNum].data.splice(index, 1);
-              this.$store.dispatch("BETTING",matchList)
-              isAdd = false;
-            }
-          });
-          //添加vuex投注数据
-          if (isAdd) {
-            matchList[this.thisNum].data.push(bettingInfo);
-            this.$store.dispatch("BETTING",[])
-            this.$store.dispatch("BETTING",matchList)
-            if(this.$store.getters.getIsBetting) return false
-            this.$store.dispatch("ISBETTING",true)
+        matchList[this.thisNum].data.forEach((res, index) => {
+          if (res.id == id) {
+            matchList[this.thisNum].data.splice(index, 1);
+            // this.$store.dispatch("ISBETTING",false);
+            this.$store.dispatch("BETTING", []);
+            this.$store.dispatch("BETTING", matchList);
+            isAdd = false;
           }
+        });
+        //添加vuex投注数据
+        if (isAdd) {
+          matchList[this.thisNum].data.push(bettingInfo);
+          this.$store.dispatch("BETTING", []);
+          this.$store.dispatch("BETTING", matchList);
+          if (this.$store.getters.getIsBetting) return false;
+          this.$store.dispatch("ISBETTING", true);
+        }
       } else {
         //添加新的玩法赔率数据
         let obj = {
-            title:'concede_size',
-            data: [bettingInfo]
-          };
-          //判断vuex有误其它玩法数据
-        if(matchList){
+          title: "concede_size",
+          data: [bettingInfo]
+        };
+        //判断vuex有误其它玩法数据
+        if (matchList) {
           matchList.push(obj);
-        }else{
-          this.$store.dispatch("BETTING",[obj])
+        } else {
+          this.$store.dispatch("BETTING", [obj]);
         }
+        if (this.$store.getters.getIsBetting) return false;
+        this.$store.dispatch("ISBETTING", true);
       }
-      console.log(this.$store.getters.getIsBetting);
-      if(this.$store.getters.getIsBetting) return false
-      this.$store.dispatch("ISBETTING",true)
     },
 
     /*--------------------------------------------------------------------------------*/
     //修改当前页面样式公共方法
-    modifyStyle:function(id,type){
-      console.log(id,type);
+    modifyStyle: function(id, type) {
       this.data.matchData.every(e => {
         let ret = false;
-        if(type == "homeOdds"){
+        if (type == "homeOdds") {
           e.oddsData.homeOdds.every((res, index) => {
             if (res.id == id) {
-                this.$set( e.oddsData.homeOdds[index],"isTrue",res.isTrue ? false : true);
-                ret = true;
-                return false;
-              }
-              return true;
+              this.$set(
+                e.oddsData.homeOdds[index],
+                "isTrue",
+                res.isTrue ? false : true
+              );
+              ret = true;
+              return false;
+            }
+            return true;
+          });
+        } else if (type == "guestOdds") {
+          e.oddsData.guestOdds.every((res, index) => {
+            if (res.id == id) {
+              this.$set(
+                e.oddsData.guestOdds[index],
+                "isTrue",
+                res.isTrue ? false : true
+              );
+              ret = true;
+              return false;
+            }
+            return true;
           });
-        }else if(type == "guestOdds"){
-            e.oddsData.guestOdds.every((res, index) => {
-              if (res.id == id) {
-                  this.$set( e.oddsData.guestOdds[index],"isTrue",res.isTrue ? false : true);
-                  ret = true;
-                  return false;
-                }
-                return true;
-            });
         }
         if (ret) {
           return false;
@@ -330,15 +347,13 @@ export default {
           return true;
         }
       });
-    
     },
     /*--------------------------------------------------------------------------------*/
     // 修改投注样式
-    isBetting(id,home,guest,name,odds,condition,type) {
-      // console.log(id, type)
+    bteBetting(match_id,id, home, guest, name, odds, condition, odds_only, type) {
       if (this.data) {
         //处理vuex里面数据
-        this.AddDelete(id,home,guest,name,odds,condition);
+        this.AddDelete(match_id,id, home, guest, name, odds, condition, odds_only);
         //处理当前页面样式
         this.modifyStyle(id, type);
       }
@@ -349,13 +364,13 @@ export default {
     matchInfo: function(id) {
       this.$router.push({
         path: "/StRollBallBettingPage",
-        query: { gameCode: this.game_code, home: 1 }
+        query: { gameCode: this.game_code, home: 1,name:this.$route.query.name }
       });
       this.$store.dispatch("MACTH_ID", id);
     },
 
     /*--------------------------------------------------------------------------------*/
-     // url : 地址, game_code 球类 leagueID lg_id 	联赛id   type_code 状态 matchDate match_date 赛事日期 search 搜索 str_type 选项类型
+    // url : 地址, game_code 球类 leagueID lg_id 	联赛id   type_code 状态 matchDate match_date 赛事日期 search 搜索 str_type 选项类型
     //获取联赛比赛列表
     getMatchData: function(
       url,
@@ -366,7 +381,7 @@ export default {
       matchDate,
       match_date,
       search,
-      str_type,
+      str_type
       // code
     ) {
       //“concede_home”: 主队全场让球,“concede_guest”: 客队全场让球,“size_home”: 主队大小,“size_guest”: 客队大小
@@ -379,42 +394,57 @@ export default {
           matchDate,
           match_date,
           search,
-          str_type,
+          str_type
           // code
         })
         .then(res => {
           this.codeShow = true;
           if (res.data.status == 1 && res.data.data != null) {
-            if((this.$store.getters.getActivity == "StStringScene" && this.$route.query.strType == 2) || (this.$store.getters.getActivity == "StChampion" && this.$route.query.strType != undefined)){
-              this.ChampionData = res.data.data;
-              console.log('data',this.ChampionData);
+            if (
+              this.$route.query.champion != undefined ||
+              (this.$store.getters.getActivity == "StStringScene" &&
+                this.$route.query.strType == 2) ||
+              (this.$store.getters.getActivity == "StChampion" &&
+                this.$route.query.strType != undefined)
+            ) {
               // 处理冠军数据
-              let champion = {},arrays=[],title='';
+              let champion = {},
+                title = "",
+                stiTime='',
+                //matchData = [],
+                chamData = [];
               title = Object.keys(res.data.data);
-              champion.title = title[0];
-              let val = Object.values(res.data.data)
-              let name = Object.keys(val[0]);
-              let data = Object.values(val[0]);
-              data.forEach((e,index)=>{
-                  arrays.push({   
-                    name:name[index],
-                    data:e
-                  });
+              let val = Object.values(res.data.data);
+              title.forEach((e,index) =>{
+                  chamData.push({
+                    name:e,
+                    data:val[index],
+                  })
+                
               })
-              champion.dataList = arrays;
-              this.ChampionData = champion;
-              // champion.leaguename = championKey;
-              // if()
-              // console.log('0', championKey
-
-            }else if(this.$route.query.champion != undefined){
-                console.log('冠军截断')
+              chamData.forEach((res)=>{
+                res.last_time =res.data.last_time;
+                let resData =  Object.values(res.data);
+                let resTitle =  Object.keys(res.data);
+                res.data = [];
+                resTitle.forEach((e,index)=>{
+                  if(e !=='last_time'){
+                   res.data.push({
+                      title:e,
+                      datas:resData[index]
+                    })
+                  }
+                })
+              })
+              this.ChampionData =chamData;
             }
             if (res.data.data.matchData && res.data.data.matchData.length < 1) {
-             
               this.isShow = false;
               this.noData = true;
-            } else if(res.data.data.matchData &&  res.data.data.matchData.length > 0) {
+            } else if (
+              res.data.data.matchData &&
+              res.data.data.matchData.length > 0
+            ) {
               this.isShow = true;
               this.noData = false;
               this.dataGroup(res.data.data);
@@ -426,7 +456,7 @@ export default {
 
     /*--------------------------------------------------------------------------------*/
     // 赛事赔率玩法数据组合方法
-  
+
     dataGroup: function(data) {
       let homeOdds = [],
         guestOdds = [];
@@ -441,11 +471,9 @@ export default {
           column.oddsData.forEach(val => {
             if (this.betting != 10000) {
               this.betting.forEach(e => {
-
                 if (val.id == e.id) {
                   val.isTrue = true;
-                  //this.$set(val,'isTrue',true);
-                } 
+                }
               });
             }
             if (val.odds_code == "concede_home") {
@@ -468,59 +496,70 @@ export default {
         }
       });
       this.data = data;
-      console.log(this.data);
-    }
+    },
+    
   },
 
-
   /**
    * 计算属性
    */
   computed: {
+    // 获取滚动状态
+    getscorllcode() {
+      return this.$public.getCache("box_size");
+    },
     getBetting() {
       return this.$store.getters.getBetting;
     },
     IsWindow() {
       return this.$store.getters.getIsBetting;
     },
-         //获取投注框删除的投注信息
-    getDeleteType(){
+    //获取投注框删除的投注信息
+    getDeleteType() {
       return this.$store.getters.getDeleteType;
-    },
+    }
   },
   /**
    * 监听器
    */
   watch: {
-     getDeleteType(val){
-       let flag=true;
-      this.data.matchData.forEach(e =>{
-          if(val =='all'){
-                e.oddsData.guestOdds.forEach(data=>{
-                    this.$set(data, "isTrue", false);
-                })
-                e.oddsData.homeOdds.forEach(data=>{
-                    this.$set(data, "isTrue", false);
-                })
-          
-          }else{
-            let showData =true;
-                e.oddsData.guestOdds.forEach(data=>{
-                    if(data.id == val){
-                      this.$set(data, "isTrue", false);
-                      showData =false;
-                    }
-                })
-                if(showData){
-                  e.oddsData.homeOdds.forEach(data=>{
-                      if(data.id == val){
-                        this.$set(data, "isTrue", false);
-                      }
-                  })
-                }
-    
+    /*--------------------------------------------------------------------------------*/
+    // 监听投注框开关
+    IsWindow(val) {
+      console.log(val);
+      this.isWindow = val;
+    },
+    // 监听滚动状态变化赋值滚动
+    getscorllcode(val) {
+      this.scorll = val;
+    },
+    getDeleteType(val) {
+      let flag = true;
+      this.data.matchData.forEach(e => {
+        if (val == "all") {
+          e.oddsData.guestOdds.forEach(data => {
+            this.$set(data, "isTrue", false);
+          });
+          e.oddsData.homeOdds.forEach(data => {
+            this.$set(data, "isTrue", false);
+          });
+        } else {
+          let showData = true;
+          e.oddsData.guestOdds.forEach(data => {
+            if (data.id == val) {
+              this.$set(data, "isTrue", false);
+              showData = false;
+            }
+          });
+          if (showData) {
+            e.oddsData.homeOdds.forEach(data => {
+              if (data.id == val) {
+                this.$set(data, "isTrue", false);
+              }
+            });
           }
-      })
+        }
+      });
     },
     /*--------------------------------------------------------------------------------*/
     //获取已投注信息
@@ -536,19 +575,19 @@ export default {
       }
     },
 
-    /*--------------------------------------------------------------------------------*/
-    // 监听投注框开关
-    IsWindow(val) {
-      this.isWindow = val;
-    },
+   
   },
   /***
    * 页面加载完成触发事件
    */
   mounted() {
-
+    let _this = this;
+    // 获取是否滑动信息
+    if (this.$public.getCache("box_size") == 1) {
+      this.isshrink = true;
+    }
     //是否展示投注框
-    if(this.$store.getters.getIsBetting){
+    if (this.$store.getters.getIsBetting) {
       this.isWindow = true;
     }
     //获取vuex玩法已投注相对应的数据
@@ -566,15 +605,30 @@ export default {
     this.game_code = game_code;
 
     if (
-       this.$route.query.navBall &&
+      this.$route.query.navBall &&
       this.$route.query.strType != undefined &&
       this.$route.query.code != undefined
     ) {
+ 
       if (this.$store.getters.getActivity == "StChampion") {
         this.championShow = true;
       } else {
         this.championShow = false;
       }
+      _this.$public.ajaxTimerFun(function(timing) {
+        _this.getMatchData(
+          _this.$ports.match.matchState,
+          game_code,
+          "",
+          leagueID,
+          _this.$store.getters.getActivity,
+          "",
+          _this.$route.query.matchDate
+        );
+        if (!_this.timers) {
+          clearInterval(timing);
+        }
+      });
       this.getMatchData(
         this.$ports.match.matchState,
         game_code,
@@ -585,12 +639,29 @@ export default {
         this.$route.query.matchDate
       );
     } else if (this.$route.query.strType != undefined) {
+   
       if (this.$store.getters.getActivity != "StChampion") {
         if (this.$route.query.strType == 2) {
           this.championShow = true;
         } else {
           this.championShow = false;
         }
+        _this.$public.ajaxTimerFun(function(timing) {
+          _this.getMatchData(
+            _this.$ports.match.matchState,
+            _this.$store.getters.getBallId,
+            "",
+            leagueID,
+            _this.$store.getters.getActivity,
+            "",
+            _this.$route.query.matchDate,
+            "",
+            _this.$route.query.strType
+          );
+          if (!_this.timers) {
+            clearInterval(timing);
+          }
+        });
         this.getMatchData(
           this.$ports.match.matchState,
           this.$store.getters.getBallId,
@@ -603,6 +674,21 @@ export default {
           this.$route.query.strType
         );
       } else {
+        _this.$public.ajaxTimerFun(function(timing) {
+          _this.getMatchData(
+            _this.$ports.match.matchState,
+            game_code,
+            "",
+            leagueID,
+            _this.$store.getters.getActivity,
+            "",
+            _this.$route.query.matchDate,
+            ""
+          );
+          if (!_this.timers) {
+            clearInterval(timing);
+          }
+        });
         this.championShow = true;
         this.getMatchData(
           this.$ports.match.matchState,
@@ -617,18 +703,43 @@ export default {
       }
     }
     // 新增
-    else if(this.$route.query.champion != undefined){
-      console.log("123")
-    this.getMatchData(
+    else if (this.$route.query.champion != undefined) {
+     
+      this.championShow = true;
+      _this.$public.ajaxTimerFun(function(timing) {
+        _this.getMatchData(
+          _this.$ports.match.matchState,
+          game_code,
+          "",
+          leagueID,
+          "StChampion"
+        );
+        if (!_this.timers) {
+          clearInterval(timing);
+        }
+      });
+      this.getMatchData(
         this.$ports.match.matchState,
         game_code,
-        // leagueID,
-        "",
         "",
-        "StRollBall"
+        leagueID,
+        "StChampion"
       );
-    }
-    else {
+    } else if (this.$route.query.matchDtl != undefined) {
+    
+      _this.$public.ajaxTimerFun(function(timing) {
+        _this.getMatchData(
+          _this.$ports.match.matchDetails,
+          game_code,
+          leagueID,
+          "",
+          "",
+          _this.$route.query.matchDate
+        );
+        if (!_this.timers) {
+          clearInterval(timing);
+        }
+      });
       this.getMatchData(
         this.$ports.match.matchDetails,
         game_code,
@@ -637,13 +748,47 @@ export default {
         "",
         this.$route.query.matchDate
       );
+    }else if(this.$route.query.btn != undefined){
+  
+            this.getMatchData(
+        this.$ports.match.matchState,
+        this.$route.query.gameCode,
+        "",
+        '27822',
+        // this.$route.query.lgId,
+        ""
+      );
+    } 
+    else {
+      console.log("`11``")
+      _this.$public.ajaxTimerFun(function(timing) {
+        _this.getMatchData(
+          _this.$ports.match.matchState,
+          game_code,
+          "",
+          leagueID,
+          _this.$store.getters.getActivity,
+          "",
+          _this.$route.query.matchDate
+        );
+        if (!_this.timers) {
+          clearInterval(timing);
+        }
+      });
+      this.getMatchData(
+        this.$ports.match.matchState,
+        game_code,
+        "",
+        leagueID,
+        this.$store.getters.getActivity,
+        "",
+        this.$route.query.matchDate
+      );
     }
-
-    // if(this.$public.getCache("box_size")){
-    //   this.isWindow=true
-    // }
   },
- 
+  beforeDestroy(){
+    this.timers = false;
+  }
 };
 </script>
 
@@ -672,9 +817,14 @@ export default {
   z-index: 10000;
   position:fixed;
   top:0;
-  width: 100%;
+  width: 55rem;
+  height: 55rem;
 } */
-
+.noscorll {
+  position: fixed;
+  top: 0;
+  width: 100%;
+}
 .Serch-box-img {
   width: 0.3rem;
   height: 0.3rem;
@@ -710,7 +860,7 @@ export default {
   color: #f76649;
   align-items: center;
   width: 1.5rem;
-  height: .75rem;
+  height: 0.75rem;
   font-size: 0.3rem;
 }
 .Soccer-game-box {

+ 15 - 4
vue_sports/src/components/StSports.vue

@@ -39,13 +39,13 @@
           <span>{{items.match_time}}</span>
         </div>
       </div>
-      <rollingBall
-        :ballName="ball.name"
-        :index="ball.index"
+              <rollingBall
+        :ballName=" item.today.name"
+        :index=" item.today.count"
         style="margin-top:0.47rem;margin-bottom:0.16rem;"
       ></rollingBall>
       <div v-for=" item_a in item.league" :key="item_a.id">
-        <rollingBall :ballName="item_a.name" :index="item_a.count" style="margin-bottom:0.16rem;"></rollingBall>
+        <rollingBall :ballName="item_a.name_chinese" :gameCode='item.game_code' :lgId ='item_a.lg_id' :index="item_a.count" style="margin-bottom:0.16rem;"></rollingBall>
       </div>
     </div>
     <!-- 即将开赛 -->
@@ -100,6 +100,7 @@ export default {
       },
       matchNum: "", //btn数量
       gameCode: "", //传入betting的值
+      timers:true
     };
   },
   methods: {
@@ -142,6 +143,13 @@ export default {
   },
   components: { rollingBall },
   mounted() {
+        let _this =this;
+    this.$public.ajaxTimerFun(function(timing){
+       _this.getAjax(_this.$ports.home.sports);
+      if (!_this.timers){
+      clearInterval(timing);
+    }
+    })
     this.getAjax(this.$ports.home.sports);
   },
   computed: {
@@ -157,6 +165,9 @@ export default {
         this.getAjax(this.$ports.home.getSon);
       }
     }
+  },
+  beforeDestroy(){
+    this.timers = false;
   }
 };
 </script>

+ 46 - 33
vue_sports/src/components/StSportsHead.vue

@@ -65,7 +65,7 @@ export default {
   name: "SportsHead",
   data() {
     return {
-      show: this.$store.state.isShow,
+      show: false,
       indeximg: this.$route.query.home ? false : true,
       img1: require("../assets/st-imges/home.png"),
       img2: require("../assets/st-imges/gengduo-1.png"),
@@ -73,15 +73,47 @@ export default {
       active: this.$route.query.number,
       init: true,
       nameShow:false, //展示登录组件或者是名字
+      timers:true, //定时器清理
     };
   },
   methods: {
     isshow() {
       let isShow = true;
       this.$store.dispatch("GET_ISSHOW", isShow);
-      
       console.log('这是我要的结果',this.$store.state.isShow)
     },
+    // 数据封装
+    getAjax(){
+          this.$store.dispatch("GETSHOW", true);
+    this.$http.get(this.$ports.home.navTypeList).then(res => {
+      console.log('res',res)
+      if (res.data.status == 1) {
+        this.title = res.data.data;
+       
+        for(var i = 0; i < this.title.length; i++){
+          if(sessionStorage.getItem('activity')){
+            if(sessionStorage.getItem('activity') == this.title[i][0].type_code){
+  
+              if(this.indeximg == true){
+                // console.log("!")
+                 this.active = this.$route.query.number
+              }else if(this.$route.query.hmsts){
+                this.active = 0;
+                // console.log("2")
+              }else if(this.$route.query.scroll){
+                // console.log("scroll")
+              }
+              else{
+                 this.active = i;
+              }
+   
+            }
+          }
+        }
+         this.$store.dispatch("GETSHOW", false);
+      }
+    });
+    },
     /**
      * 头部导航
      */
@@ -122,38 +154,19 @@ export default {
     }else{
       this.nameShow = false;
     }
-    this.$store.dispatch("GETSHOW", true);
-    this.$http.get(this.$ports.home.navTypeList).then(res => {
-      console.log('res',res)
-      if (res.data.status == 1) {
-        this.title = res.data.data;
-       
-        for(var i = 0; i < this.title.length; i++){
-          if(sessionStorage.getItem('activity')){
-            if(sessionStorage.getItem('activity') == this.title[i][0].type_code){
-  
-              if(this.indeximg == true){
-                // console.log("!")
-                 this.active = this.$route.query.number
-              }else if(this.$route.query.hmsts){
-                this.active = 0;
-                // console.log("2")
-              }else if(this.$route.query.scroll){
-                // console.log("scroll")
-              }
-              else{
-                 this.active = i;
-              }
-   
-            }
-          }
-        }
-         this.$store.dispatch("GETSHOW", false);
-      }
-    });
-
+    this.getAjax();
+    let _this =this;
+    this.$public.ajaxTimerFun(function(timing){
+     _this.getAjax();
+      if (!_this.timers){
+      clearInterval(timing);
+    }
+    })
   },
-
+  
+  beforeDestroy(){
+    this.timers = false;
+  }
 };
 </script>
 <style  scoped>

+ 70 - 50
vue_sports/src/components/StTennis.vue

@@ -1,36 +1,40 @@
 <template>
   <div>
     <div v-if="tennisShow">
-    <h3 style="color:#F76649;">{{title}}</h3>
-    <div class="tennis">
-
-    <div class="tennis-dtl" v-for="(item,index) in dat" :key="item.id">
-      <div class="teamName">
-        <span>{{item.host_player_name}}</span>
-        <div>vs</div>
-        <span>{{item.guest_player_name}}</span>
-      </div>
-      <div class="frequency">
-        <div :class = "item.match_process == 1? 'status':''">
-          <span>第一盘</span>
-          <span>{{item.first_inning_score}}</span>
-        </div>
-        <div  :class = "item.match_process == 2? 'status':''">
-          <span>第二盘</span>
-          <span>{{item.second_inning_score}}</span>
-        </div>
-        <div :class = "item.match_process == 3? 'status':''">
-          <span>第三盘</span>
-          <span>{{item.third_inning_score}}</span>
+      <h3 style="color:#F76649;">{{title}}</h3>
+      <div class="tennis">
+        <div class="tennis-dtl" v-for="(item,index) in dat" :key="item.id">
+          <div class="teamName">
+            <span>{{item.host_player_name}}</span>
+            <div>vs</div>
+            <span>{{item.guest_player_name}}</span>
+          </div>
+          <div class="frequency">
+            <div :class="item.match_process == 1? 'status':''">
+              <span>第一盘</span>
+              <span>{{item.first_inning_score}}</span>
+            </div>
+            <div :class="item.match_process == 2? 'status':''">
+              <span>第二盘</span>
+              <span>{{item.second_inning_score}}</span>
+            </div>
+            <div :class="item.match_process == 3? 'status':''">
+              <span>第三盘</span>
+              <span>{{item.third_inning_score}}</span>
+            </div>
+          </div>
         </div>
       </div>
+      <div class="ballBtn">
+        <rollingBall
+          :name="name"
+          :index="ball.index"
+          :id="ball.id"
+          :ballName="ball.name"
+          :gameCode="gameCode"
+        ></rollingBall>
+      </div>
     </div>
-    
-  </div>
-  <div class="ballBtn">
-      <rollingBall :name="name" :index="ball.index" :id="ball.id" :ballName = "ball.name" :gameCode = "gameCode"></rollingBall>
-    </div>
-  </div>
   </div>
 </template>
 <script>
@@ -39,37 +43,53 @@ export default {
   data() {
     return {
       title: "网球",
-      tennisShow:true,
+      tennisShow: true,
       selection: true,
-      ballName:'',
-      name:'',//球类名称传值
+      ballName: "",
+      name: "", //球类名称传值
       ball: {
         name: "所有网球滚球",
         index: "8",
         id: 1003
       },
-       gameCode:'',//球类别名
+      gameCode: "", //球类别名
       dat: []
     };
   },
   components: { rollingBall },
   mounted() {
-    this.$http.get(this.$ports.home.wqrollingBall).then(res => {
-      console.log(res.data.data.matchData.length)
-      if (res.status == 200 && res.data != [] && res.data.data.matchData.length != 0) {
-        console.log('网球',res)
-        this.dat = res.data.data.matchData;
-        this.title = res.data.data.gameName;
-        this.ball.index = this.dat.length;
-       this.name = this.title;
-          this.ball.name = "所有" + this.title + "滚球";
-            this.gameCode = res.data.data.game_code;
-      }else{
-        console.log("!23")
-        this.tennisShow = false
-        console.log(' this.tennisShow', this.tennisShow)
+    this.getAjax();
+    let _this = this;
+    this.$public.ajaxTimerFun(function(timing) {
+      _this.getAjax();
+      if (!_this.timers) {
+        clearInterval(timing);
       }
     });
+  },
+  methods: {
+    getAjax() {
+      this.$store.dispatch("GETSHOW", true);
+      this.$http.get(this.$ports.home.wqrollingBall).then(res => {
+        if (
+          res.data.status == 1 &&
+          res.data != [] &&
+          res.data.data.matchData.length != 0
+        ) {
+          console.log("网球", res);
+          this.dat = res.data.data.matchData;
+          this.title = res.data.data.gameName;
+          this.ball.index = this.dat.length;
+          this.name = this.title;
+          this.ball.name = "所有" + this.title + "滚球";
+          this.gameCode = res.data.data.game_code;
+        } else {
+          this.tennisShow = false;
+          console.log(" this.tennisShow", this.tennisShow);
+        }
+        this.$store.dispatch("GETSHOW", false);
+      });
+    }
   }
 };
 </script>
@@ -77,15 +97,15 @@ export default {
 .tennis {
   margin-top: 0.13rem;
   width: 100%;
-   border-radius: .08rem;
+  border-radius: 0.08rem;
   /* height: 6.42rem; */
   background: #dcdcdc;
   /* padding: 0 0.3rem 0 0.35rem; */
 
   margin-bottom: 0.2rem;
-  padding: .3rem;
+  padding: 0.3rem;
 }
- h3 {
+h3 {
   text-align: left;
   font-size: 0.3rem;
   color: #000000;
@@ -95,7 +115,7 @@ export default {
 .tennis-dtl {
   width: 100%;
   background: #dcdcdc;
-  border-bottom: 1px solid #E4E4E4;
+  border-bottom: 1px solid #e4e4e4;
   margin-top: 0.2rem;
   /* height: 1.89rem; */
   height: auto;
@@ -131,7 +151,7 @@ export default {
   margin-bottom: 0;
 }
 .frequency .status {
-  color: #F76649;
+  color: #f76649;
 }
 .tennis-dtl .icon {
   width: 0.08rem;

+ 16 - 10
vue_sports/src/components/StWaveBladder.vue

@@ -13,7 +13,7 @@
             <div class="row grids">
               <div class="column">
                 <div class="gridsDiv row center" v-for="(item,index) in data " :key="item.id" v-if="item.odds_code =='bodanhome'" >
-                  <div class="column average minGrid" :class=" [item.isTrue ?'trueSelected' :'']"@click="btnChoose(item.id,home_team,item.odds,item.condition)" >
+                  <div class="column average minGrid" :class=" [item.isTrue ?'trueSelected' :'']"@click="btnChoose(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id,item.condition)" >
                     <span style="color:#FD8F26 ">{{item.condition}}</span>
                     <span>{{item.odds}}</span>
                   </div>
@@ -21,7 +21,7 @@
               </div>
               <div class="column middle">
                 <div class="gridsDiv row center" v-for="(item,index) in data " :key="item.id" v-if="item.odds_code =='bodandogfall'" >
-                  <div class="column average minGrid" :class=" [item.isTrue ? 'trueSelected' :''] "  @click="btnChoose(item.id,'和局',item.odds,item.condition)" >
+                  <div class="column average minGrid" :class=" [item.isTrue ? 'trueSelected' :''] "  @click="btnChoose(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id,item.condition)" >
                     <span style="color:#FD8F26 ">{{item.condition}}</span>
                     <span>{{item.odds}}</span>
                   </div>
@@ -29,7 +29,7 @@
               </div>
               <div class="column">
                 <div class="gridsDiv row center"  v-for="(item,index) in data " :key="item.id" v-if="item.odds_code =='bodanguest'" >
-                  <div class="column average minGrid" :class=" [item.isTrue ? 'trueSelected' :''] " @click="btnChoose(item.id,guest_team,item.odds,item.condition)" >
+                  <div class="column average minGrid" :class=" [item.isTrue ? 'trueSelected' :''] " @click="btnChoose(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id,item.condition)" >
                     <span style="color:#FD8F26 ">{{item.condition}}</span>
                     <span>{{item.odds}}</span>
                   </div>
@@ -39,7 +39,7 @@
             <div style="background:#f8f8f8;">
               <div class="row rightAlignment center"  style="height: 0.88rem;">
                 <span>其他比分:</span>
-                <div class="minGrid minGridAll"  :class=" newbodanother.isTrue ? 'trueSelected' :''"  @click="btnChoose(newbodanother.id,'其他比分',newbodanother.odds,newbodanother.condition)" >
+                <div class="minGrid minGridAll"  :class=" newbodanother.isTrue ? 'trueSelected' :''"  @click="btnChoose(newbodanother.id,'其他比分',newbodanother.odds,newbodanother.odds_only,newbodanother.p_code,match_id,newbodanother.condition)" >
                   {{newbodanother.odds}}
                 </div>
               </div>
@@ -59,7 +59,7 @@
             <div class="row grids">
               <div class="column">
                 <div class="gridsDiv row center" v-for="(item,index) in data " :key="item.id" v-if="item.odds_code =='halfbodanhome'" >
-                  <div class="column average minGrid" :class=" [item.isTrue ?'trueSelected' :'']" @click="btnChoose(item.id,home_team,item.odds,item.condition)">
+                  <div class="column average minGrid" :class=" [item.isTrue ?'trueSelected' :'']" @click="btnChoose(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id,item.condition)">
                     <span style="color:#FD8F26 ">{{item.condition}}</span>
                     <span>{{item.odds}}</span>
                   </div>
@@ -67,7 +67,7 @@
               </div>
               <div class="column middle">
                 <div class="gridsDiv row center" v-for="(item,index) in data " :key="item.id" v-if="item.odds_code =='halfbodandogfall'" >
-                  <div class="column average minGrid" :class=" [item.isTrue ? 'trueSelected' :''] " @click="btnChoose(item.id,'和局',item.odds,item.condition)">
+                  <div class="column average minGrid" :class=" [item.isTrue ? 'trueSelected' :''] " @click="btnChoose(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id,item.condition)">
                     <span style="color:#FD8F26 ">{{item.condition}}</span>
                     <span>{{item.odds}}</span>
                   </div>
@@ -75,7 +75,7 @@
               </div>
               <div class="column">
                 <div class="gridsDiv row center" v-for="(item,index) in data " :key="item.id" v-if="item.odds_code =='halfbodanguest'">
-                  <div class="column average minGrid" :class=" [item.isTrue ? 'trueSelected' :''] " @click="btnChoose(item.id,guest_team,item.odds,item.condition)" >
+                  <div class="column average minGrid" :class=" [item.isTrue ? 'trueSelected' :''] " @click="btnChoose(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id,item.condition)" >
                     <span style="color:#FD8F26 ">{{item.condition}}</span>
                     <span>{{item.odds}}</span>
                   </div>
@@ -85,7 +85,7 @@
             <div style="background:#f8f8f8;">
               <div class="row rightAlignment center" style="height: 0.88rem;">
                 <span>其他比分:</span>
-                <div class="minGrid minGridAll"  :class="newHalfbodanother.isTrue ? 'trueSelected' :'' "   @click="btnChoose(newHalfbodanother.id,'其他比分',newHalfbodanother.odds,newHalfbodanother.condition)"
+                <div class="minGrid minGridAll"  :class="newHalfbodanother.isTrue ? 'trueSelected' :'' "   @click="btnChoose(newHalfbodanother.id,'其他比分',newHalfbodanother.odds,newHalfbodanother.odds_only,newHalfbodanother.p_code,match_id,newHalfbodanother.condition)"
                 >{{newHalfbodanother.odds}}</div>
               </div>
             </div>
@@ -110,6 +110,7 @@ export default {
       guest_team: "",
       isDisplay: false,
       data: [],
+      match_id:'',
       bodanother: "",
       halfbodanother: "",
       betting: [], //已投注倍率id集合
@@ -119,7 +120,8 @@ export default {
   methods: {
     /*---------------------------------------------------- */
     //玩法投注
-    btnChoose: function(id,name,odds,condition='',bettingTime='') {
+    btnChoose: function(id,name,odds,odds_only,p_code,match_id,condition='',bettingTime='') {
+        console.log('我需要的',this.data)
       let _this = this;
       let bettingInfo = {
         id,
@@ -131,7 +133,10 @@ export default {
         ganame:this.title,
         score:this.score,
         bettingTime,
-
+        odds_only,
+         ballId:this.$store.getters.getBallId,
+        p_code,
+        match_id,
       }
       //调用玩法投注公共方法
       this.$public.bettingFunction(
@@ -179,6 +184,7 @@ export default {
   },
   watch: {
     getUserIcons(val) {
+      this.match_id=val.match_id
       if (!val) return false;
       this.home_team = val.home_team;
       this.guest_team = val.guest_team;

+ 8 - 2
vue_sports/src/components/dedicated/StFullHalf.vue

@@ -11,7 +11,7 @@
               </div>
               <span
                 :class="item.isTrue== true ? 'active The-club-box' : 'The-club-box'"
-                @click="bettingBtn(item.id,item.condition,item.odds)"
+                @click="bettingBtn(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id)"
               >
                 <!-- <i style="color: #FD8F26;" v-if="item.num">{{ item.num.num1 }}</i> -->
                 <i>{{ item.odds}}</i>
@@ -35,6 +35,7 @@ export default {
       guest_team: "", //客队名
       isDisplay: false, //是否显示
       titleKey: [], //
+      match_id:'',
       titleData: [], //
       betting: [], //已投注倍率id集合
       dataNum: 10000 //对应的数据的下标
@@ -42,7 +43,7 @@ export default {
   },
   methods: {
     //玩法投注
-    bettingBtn(id,condition,odds,bettingTime='') {
+    bettingBtn(id,condition,odds,odds_only,p_code,match_id,bettingTime='') {
       let _this = this;
       let bettingInfo = {
         id,
@@ -51,6 +52,10 @@ export default {
         name,
         odds,
         condition,
+        odds_only,
+         ballId:this.$store.getters.getBallId,
+        p_code,
+        match_id,
         ganame: this.title,
         score: this.score,
         bettingTime
@@ -102,6 +107,7 @@ export default {
   watch: {
     //监听vuex里面数据
     getUserIcons(val) {
+      this.match_id=val.match_id
       this.home_team = val.home_team;
       this.guest_team = val.guest_team;
       val.oddsData.forEach(res => {

+ 16 - 10
vue_sports/src/components/dedicated/StGoalSingleAndDouble.vue

@@ -10,8 +10,8 @@
               v-if="item.odds_code =='two_sides_single'"
               class="left_box row allAlignment"
             >
-              <div>{{item.condition == 'single'? '单':'双'}}</div>
-              <div class="ratio" :class="item.isTrue ==true ? 'col':''" @click="toggle(item.id,item.condition == 'single'? '单':'双',item.odds)">
+              <div>{{item.condition}}</div>
+              <div class="ratio" :class="item.isTrue ==true ? 'col':''" @click="toggle(item.id,item.condition,item.odds,item.odds_onlys,item.p_code,match_id)">
                 <span>{{item.odds}}</span>
               </div>
             </div>
@@ -21,8 +21,8 @@
               v-if="item.odds_code =='two_sides_double' "
               class="right_box row allAlignment"
             >
-              <div>{{item.condition == 'single'? '单':'双'}}</div>
-              <div class="ratio" :class="item.isTrue  ==true ? 'col':''" @click="toggle(item.id,item.condition == 'single'? '单':'双',item.odds)">
+              <div>{{item.condition}}</div>
+              <div class="ratio" :class="item.isTrue  ==true ? 'col':''" @click="toggle(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id)">
                 <span>{{item.odds}}</span>
               </div>
             </div>
@@ -38,8 +38,8 @@
               v-if="item.odds_code =='half_two_sides_single'"
               class="left_box row allAlignment"
             >
-              <div>{{item.condition == 'single'? '单':'双'}}</div>
-              <div class="ratio" :class="item.isTrue ==true ? 'col':''" @click="toggle(item.id,item.condition == 'single'? '单':'双',item.odds)">
+              <div>{{item.condition}}</div>
+              <div class="ratio" :class="item.isTrue ==true ? 'col':''" @click="toggle(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id)">
                 <span>{{item.odds}}</span>
               </div>
             </div>
@@ -49,8 +49,8 @@
               v-if="item.odds_code =='half_two_sides_double' "
               class="right_box row allAlignment"
             >
-              <div>{{item.condition == 'single'? '单':'双'}}</div>
-              <div class="ratio" :class="item.isTrue  ==true ? 'col':''" @click="toggle(item.id,item.condition == 'single'? '单':'双',item.odds)">
+              <div>{{item.condition}}</div>
+              <div class="ratio" :class="item.isTrue  ==true ? 'col':''" @click="toggle(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id)">
                 <span>{{item.odds}}</span>
               </div>
             </div>
@@ -71,6 +71,7 @@ export default {
       isDisplay: false,
       home_team:'',
       guest_team:'',
+      match_id:'',
       score:'0',
       data: [], //
       betting: [], //已投注倍率id集合
@@ -79,7 +80,8 @@ export default {
   },
   methods: {
     //玩法投注
-    toggle(id,name,odds) {
+    toggle(id,name,odds,odds_only,p_code,match_id) {
+      console.log(this.data)
       let _this = this;
        let bettingInfo = {
         id,
@@ -87,11 +89,14 @@ export default {
         guest_team:this.guest_team,
         name,
         odds,
+         ballId:this.$store.getters.getBallId,
         // condition,
         ganame:this.title,
         score:this.score,
         bettingTime:'',
-
+        odds_only,
+        p_code,
+        match_id
       }
       //调用玩法投注公共方法
       this.$public.bettingFunction(this.betting,bettingInfo,this.data,this.$store.getters.getBetting,this.title,this.dataNum,function(res,type){
@@ -131,6 +136,7 @@ export default {
   watch: {
     //监听vuex里面数据
     getUserIcons(val) {
+      this.match_id=val.match_id
       if (!val) return false;
       this.home_team = val.home_team;
       this.guest_team = val.guest_team;

+ 9 - 4
vue_sports/src/components/dedicated/StGoalSize.vue

@@ -8,7 +8,7 @@
               <span class="The-club">{{ item.condition }}</span>
               <span
                 :class="item.isTrue ? 'active The-club-box' : 'The-club-box'"
-                @click="bettingBtn(item.id,item.condition,item.odds)"
+                @click="bettingBtn(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id)"
               >{{ item.odds }}</span>
             <!-- </div> -->
           </div>
@@ -21,7 +21,7 @@
               <span class="The-club">{{ item.condition }}</span>
               <span
                 :class="item.isTrue ? 'active The-club-box' : 'The-club-box'"
-                @click="bettingBtn(item.id,item.condition,item.odds)"
+                @click="bettingBtn(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id)"
               >{{ item.odds }}</span>
             <!-- </div> -->
           </div>
@@ -38,6 +38,7 @@ export default {
       title: "total_goal",
       data: [],
       home_team:'',//主队
+      match_id:'',
       guest_team:'',//客队
       score:'0,0',//比分
       isDisplay:false,//是否显示
@@ -47,7 +48,7 @@ export default {
   },
   methods: {
   //玩法投注
-		bettingBtn(id,name,odds,condition='',bettingTime='') {
+		bettingBtn(id,name,odds,odds_only,p_code,match_id,condition='',bettingTime='') {
       let _this = this;
       let bettingInfo = {
         id,
@@ -56,10 +57,13 @@ export default {
         name,
         odds,
         condition,
+         ballId:this.$store.getters.getBallId,
+        p_code,
+        match_id,
         ganame:this.title,
         score:this.score,
         bettingTime,
-
+        odds_only,
       }
 			//调用玩法投注公共方法
 			this.$public.bettingFunction(this.betting,bettingInfo,this.data,this.$store.getters.getBetting,this.title,this.dataNum,
@@ -98,6 +102,7 @@ export default {
   watch: {
     /*------------------------------------------------------------ */
     getUserIcons(val) {
+      this.match_id=val.match_id
       //console.log("更新数据", val);
       if (!val) return false;
       let _this =this;

+ 17 - 8
vue_sports/src/components/dedicated/StOnlyWin.vue

@@ -11,7 +11,7 @@
                   <div
                     class="The-club-box row center"
                     :class="item.isTrue== true ? 'active' : ''"
-                    @click="bettingBtn(item.id,item.condition,item.odds)"
+                    @click="bettingBtn(item.id,home_team,item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                   >
                     <span>{{item.odds}}</span>
                   </div>
@@ -23,7 +23,7 @@
                   <div
                     class="The-club-box row center"
                     :class="item.isTrue== true ? 'active ' : ''"
-                    @click="bettingBtn(item.id,item.condition,item.odds)"
+                    @click="bettingBtn(item.id,guest_team,item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                   >
                     <span>{{item.odds}}</span>
                   </div>
@@ -35,7 +35,7 @@
                   <div
                     class="The-club-box row center"
                     :class="item.isTrue== true ? 'active' : ''"
-                    @click="bettingBtn(item.id,item.condition,item.odds)"
+                    @click="bettingBtn(item.id,'和局',item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                   >
                     <span>{{item.odds}}</span>
                   </div>
@@ -56,7 +56,7 @@
                   <div
                     class="The-club-box row center"
                     :class="item.isTrue== true ? 'active' : ''"
-                    @click="bettingBtn(item.id,item.condition,item.odds)"
+                    @click="bettingBtn(item.id,home_team,item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                   >
                     <span>{{item.odds}}</span>
                   </div>
@@ -68,7 +68,7 @@
                   <div
                     class="The-club-box row center"
                     :class="item.isTrue== true ? 'active ' : ''"
-                    @click="bettingBtn(item.id,item.condition,item.odds)"
+                    @click="bettingBtn(item.id,guest_team,item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                   >
                     <span>{{item.odds}}</span>
                   </div>
@@ -80,7 +80,7 @@
                   <div
                     class="The-club-box row center"
                     :class="item.isTrue== true ? 'active' : ''"
-                    @click="bettingBtn(item.id,item.condition,item.odds)"
+                    @click="bettingBtn(item.id,'和局',item.odds,item.odds_only,item.p_code,match_id,item.condition)"
                   >
                     <span>{{item.odds}}</span>
                   </div>
@@ -101,6 +101,7 @@ export default {
     return {
       title: "capot",
       home_team: " ",
+      match_id:'',
       guest_team: " ",
       data: [],
       isDisplay: "", //是否显示
@@ -110,7 +111,8 @@ export default {
   },
   methods: {
     //玩法投注
-    bettingBtn(id, name, odds, condition = "", bettingTime = "") {
+    bettingBtn(id, name, odds,odds_only,p_code,match_id,condition = "", bettingTime = "") {
+      console.log(this.data)
       let _this = this;
       let bettingInfo = {
         id,
@@ -118,10 +120,14 @@ export default {
         guest_team: this.guest_team,
         name,
         odds,
+         ballId:this.$store.getters.getBallId,
         condition,
         ganame: this.title,
         score: this.score,
-        bettingTime
+        bettingTime,
+        odds_only,
+        p_code,
+        match_id,
       };
       //调用玩法投注公共方法
       this.$public.bettingFunction(
@@ -168,7 +174,10 @@ export default {
   },
   watch: {
     getUserIcons(val) {
+      this.match_id=val.match_id
+       console.log(val,'val')
       if (!val) return false;
+     
       this.home_team = val.home_team;
       this.guest_team = val.guest_team;
       val.oddsData.forEach(res => {

+ 10 - 4
vue_sports/src/components/dedicated/StStartEnd.vue

@@ -14,7 +14,7 @@
                 <div
                   class="The-club-box row center"
                   :class="item.isTrue== true ? 'active' : ''"
-                  @click="bettingBtn(item.id,item.condition,item.odds)"
+                  @click="bettingBtn(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id)"
                 >
                   <span>{{item.odds}}</span>
                 </div>
@@ -34,7 +34,7 @@
                 <div
                   class="The-club-box row center"
                   :class="item.isTrue== true ? 'active' : ''"
-                  @click="bettingBtn(item.id,item.condition,item.odds)"
+                  @click="bettingBtn(item.id,item.condition,item.odds,item.odds_only,item.p_code,match_id)"
                 >
                   <span>{{item.odds}}</span>
                 </div>
@@ -56,6 +56,7 @@ export default {
       title: "first_last_ball",
       home_team: "",
       guest_team: "",
+      match_id:'',
       data: [], //数据源
 	  isDisplay: "" ,//是否显示
 	  betting: [], //已投注倍率id集合
@@ -64,7 +65,8 @@ export default {
   },
   methods: {
     //玩法投注
-    bettingBtn(id,name,odds,condition='',bettingTime='') {
+    bettingBtn(id,name,odds,odds_only,p_code,match_id,condition='',bettingTime='') {
+      console.log(this.data)
     let _this = this;
      let bettingInfo = {
         id,
@@ -72,11 +74,14 @@ export default {
         guest_team:this.guest_team,
         name,
         odds,
+        p_code,
+        match_id,
         condition,
         ganame:this.title,
         score:this.score,
         bettingTime,
-
+        odds_only,
+         ballId:this.$store.getters.getBallId,
       }
       //调用玩法投注公共方法
       this.$public.bettingFunction(this.betting,bettingInfo,this.data,this.$store.getters.getBetting,this.title,this.dataNum,function(res,type){
@@ -116,6 +121,7 @@ export default {
   watch: {
     //监听vuex里面数据
     getUserIcons(val) {
+      this.match_id=val.match_id
 	    if(!val) return false;
       //console.log('先进/后进',val);
         this.home_team = val.home_team;

+ 36 - 12
vue_sports/src/components/dedicated/StTeamGoalSize.vue

@@ -10,7 +10,7 @@
                   <div v-for="(items) in item.data.a" class=" left-box">
                     <div class="row allAlignment center">
                       <span>大</span>
-                      <div class="column center btn-box">
+                      <div class="column center btn-box" @click="bettingBtn(items.id,'大',items.odds_only,items.p_code,match_id)">
                         <span style="color: #FD8F26;" v-if="items.condition">{{ items.condition }}</span>
                         <span>{{ items.odds }}</span>
                       </div>
@@ -21,7 +21,7 @@
                   <div v-for="(items) in item.data.b" class="right-box">
                     <div class="row allAlignment center ">
                       <span>小</span>
-                      <div class="column center btn-box">
+                      <div class="column center btn-box" @click="bettingBtn(items.id,'小',items.odds_only,items.p_code,match_id)">
                         <span style="color: #FD8F26;" v-if="items.condition">{{ items.condition }}</span>
                         <span>{{ items.odds }}</span>
                       </div>
@@ -44,18 +44,38 @@ export default {
       guest_team: "",
       title: "球队进球大小",
       data: [],
-      isDisplay: false
+      isDisplay: false,
+      match_id:'',
     };
   },
   methods: {
-    // 点击更改组件选中状态
-    Theclubboxclick(num) {
-      // 更改组件是否选中
-      //   this.$set(
-      //     this.table.list[num],
-      //     "istrue",
-      //     this.table.list[num].istrue == true ? false : true
-      //   );
+    bettingBtn(id,name,odds,odds_only,p_code,match_id,condition='',bettingTime='') {
+      console.log(id,name,odds,odds_only,p_code,match_id,'我的')
+        let _this = this;
+     let bettingInfo = {
+        id,
+        home_team:this.home_team,
+        guest_team:this.guest_team,
+        name,
+        odds,
+        p_code,
+        match_id,
+        condition,
+        ganame:this.title,
+        score:this.score,
+        bettingTime,
+        odds_only,
+         ballId:this.$store.getters.getBallId,
+      }
+      //调用玩法投注公共方法
+      this.$public.bettingFunction(this.betting,bettingInfo,this.data,this.$store.getters.getBetting,this.title,this.dataNum,function(res,type){
+        _this.$set(res,'isTrue',type);
+      },function(data,val){
+         _this.$store.dispatch("BETTING", []);
+          _this.$store.dispatch("BETTING", data ? data : val);
+          if(_this.$store.getters.getIsBetting) return false
+          _this.$store.dispatch("ISBETTING",true)
+      })
     }
   },
   computed: {
@@ -65,6 +85,7 @@ export default {
   },
   watch: {
     getUserIcons(val) {
+      this.match_id=val.match_id
       if (!val) return false;
       this.home_team = val.home_team;
       this.guest_team = val.guest_team;
@@ -130,7 +151,10 @@ export default {
 
       console.log(this.data);
     }
-  }
+  },
+  mounted() {
+     console.log('/////',this.data)
+  },
 };
 </script>
 

二進制
vue_sports/src/components/dedicated/~$组件详情.docx


+ 18 - 3
vue_sports/src/pages/AllMatch/index/AllMatch.vue

@@ -4,7 +4,8 @@
           <Loading></Loading>
         </div>
         <SportsHead></SportsHead>
-        <Serch></Serch>
+        <Serch v-if="isShow"></Serch>
+        <championsCup v-else/>
         <LinkFooter></LinkFooter>
     </div>
 </template>
@@ -14,6 +15,7 @@ import  Serch from '@/components/StSerch';
 import  LinkFooter from '@/components/StLinkFooter';
 import  Schedule from '@/components/StSchedule';
 import  Loading from '@/components/StLoading';
+import  championsCup from '@/components/StChampionsCup';
 export default {
     name:"AllMatch",
     components:{
@@ -21,14 +23,23 @@ export default {
         Serch,
         LinkFooter,
         Schedule,
-        Loading
+        Loading,
+        championsCup
     },
     data(){
         return{
+            isShow:true // 断定是否为冠军跳入
             // ballId:this.$route.query.id
         }
 
     },
+    mounted(){
+        if(this.$route.query.id == 'gj'){
+            this.isShow = false;
+        }else{
+            this.isShow = true;
+        }
+    }
     // created(){
     //     this.getId();
     // },
@@ -41,5 +52,9 @@ export default {
 }
 </script>
 <style  scoped>
-
+    .lod{
+        z-index: 999;
+        position: fixed;
+        width: 100%;
+    }
 </style>

+ 481 - 0
vue_sports/src/pages/Login/index/ProfitAndLossRecord.vue

@@ -0,0 +1,481 @@
+<template>
+  <div>
+    <div class="box">
+      <div class="row allAlignment center head_on_box">
+        <p
+          class="logo"
+          style="font-size:.6rem;color:#E1E1DF;font-family:  'Franklin Gothic Medium'"
+        >
+          <i style="color:#F76649;">HX</i>669
+        </p>
+        <p style="color:#fffffe;font-size:.36rem">盈亏记录</p>
+        <!-- <img class="log" src="../assets/st-imges/indexlogo.png" alt=""> -->
+        <div class="row allAlignment center">
+          <yd-button type="primary" bgcolor="rgba(0,0,0,0)" @click.native="isshow()">
+            <img class="user-ion" src="@/assets/st-imges/user.png" alt>
+          </yd-button>
+          <!-- <div v-if="nameShow" class="row allAlignment center username">
+              {{name}}
+          </div>-->
+          <img
+            style="margin-left: 0.44rem;"
+            class="user-ion"
+            src="@/assets/st-imges/contact.png"
+            alt
+          >
+        </div>
+      </div>
+    </div>
+    <div class="box row">
+      <div id="NavSlide">
+        <nav>
+          <p v-for="(item,index) in arr" @click="getdates(item.start,item.end,index)" :key="index">
+            <span :class="{active:index==active}">{{item.title}}</span>
+          </p>
+        </nav>
+      </div>
+      <div class="date row center">
+        <yd-button-group>
+          <yd-button size="large" bgcolor="rgba(0,0,0,0)" @click.native="open">
+            <img :src="img" style="width:.3rem;height:.3rem">日历
+          </yd-button>
+        </yd-button-group>
+      </div>
+    </div>
+    <div class="row classify average">
+      <div
+        v-for="(item,index) in list"
+        :class="item.id==classifynum?'classifyactive':''"
+        :key="index"
+        @click="classifyclick(index)"
+      >{{item.title}}</div>
+    </div>
+    <div
+      class="row center"
+      style="height:.88rem;color:#333;font-size:.32rem;"
+      v-if="data.status=='2001'"
+    >对不起,您当前没有登录,请前往登录</div>
+    <div>
+      <div class="datalist">
+        <div class="datalistbox row allAlignment">
+          <yd-infinitescroll :callback="loadList" ref="infinitescrollDemo">
+            <yd-list theme="1" slot="list">
+              <div v-for="(item,index) in data.list" :key="index">
+                <div
+                  v-if="item.money_type==1"
+                  :style="classifynum==0?'':'display:none'"
+                  class="datalist-box row allAlignment"
+                >
+                  <p>{{item.money_time}}</p>
+                  <p>+{{item.money}}</p>
+                </div>
+                <div
+                  v-if="item.money_type==2"
+                  :style="classifynum==1?'':'display:none'"
+                  class="datalist-box row allAlignment"
+                >
+                  <p>{{item.money_time}}</p>
+                  <p>-{{item.money}}</p>
+                </div>
+              </div>
+            </yd-list>
+
+            <!-- 数据全部加载完毕显示 -->
+            <span slot="doneTip">啦啦啦,啦啦啦,没有数据啦~~</span>
+
+            <!-- 加载中提示,不指定,将显示默认加载中图标 -->
+            <img slot="loadingTip" src="http://static.ydcss.com/uploads/ydui/loading/loading10.svg">
+          </yd-infinitescroll>
+        </div>
+      </div>
+    </div>
+    <yd-cell-group style="display:none;">
+      <yd-cell-item arrow>
+        <yd-datetime
+          type="date"
+          ref="datetime"
+          start-year="2014"
+          :end-date="endyear"
+          v-model="datetime"
+          slot="right"
+        ></yd-datetime>
+      </yd-cell-item>
+    </yd-cell-group>
+    <Login v-if="isShow"/>
+  </div>
+</template>
+<script>
+import "@/css/index.css";
+import Login from "@/pages/Login/index/StLogin";
+import register from "@/pages/Login/index/register";
+export default {
+  name: "BettingRecord",
+  data() {
+    return {
+      isShow: true,
+      img: require("@/assets/st-imges/date.png"),
+      img1: require("@/assets/st-imges/home.png"),
+      img2: require("@/assets/st-imges/gengduo-1.png"),
+      timearr: [],
+      arr: [],
+      active: 0,
+      // 是否继续请求
+      ajaxto: true,
+
+      data: "",
+      datetime: "2017-05-11",
+      //   查询开始结束时间
+      startTime: "",
+      endTime: "",
+      startyear: "",
+      endyear: "",
+      list: [{ title: "本月已盈利", id: 0 }, { title: "本月已亏损", id: 1 }],
+      classifynum: 0,
+      // 分页
+      page: 1,
+      pageSize: 15,
+      PageList: []
+    };
+  },
+  computed: {
+    Isshow: function() {
+      return this.$store.state.isShow;
+    }
+  },
+  components: {
+    Login
+  },
+  created() {
+    this.fun_date();
+    if(this.ajaxto){
+      this.loadList();
+    } 
+  },
+  methods: {
+    //   分页查询时间
+    getdates(start, end, index) {
+      this.active = index;
+      this.startTime = start;
+      this.endTime = end;
+      if(this.ajaxto){
+         this.loadList();
+      }
+    },
+    loadList(ispage) {
+      let date = new Date(),
+        date2 = new Date(date);
+      this.startTime = `${date2.getFullYear()}-${
+        date2.getMonth() + 1 < 10
+          ? "0" + (date2.getMonth() + 1)
+          : date2.getMonth() + 1
+      }-${
+        date2.getDate() - 7 < 10
+          ? "0" + date2.getDate() - 7
+          : date2.getDate() - 7
+      } 00:00:00`;
+      this.endTime = `${date2.getFullYear()}-${
+        date2.getMonth() + 1 < 10
+          ? "0" + (date2.getMonth() + 1)
+          : date2.getMonth() + 1
+      }-${
+        date2.getDate() - 7 < 10
+          ? "0" + date2.getDate() - 7
+          : date2.getDate() - 7
+      } ${date2.getHours() < 10 ? "0" + date2.getHours() : date2.getHours()}:${
+        date2.getMinutes() < 10 ? "0" + date2.getMinutes() : date2.getMinutes()
+      }:${
+        date2.getSeconds() < 10 ? "0" + date2.getSeconds() : date2.getSeconds()
+      }`;
+      this.$http
+        .post(this.$ports.login.ProfitAndLossRecord, {
+          currentPage: this.page,
+          pageSize: this.pageSize,
+          token: "Ym0dZz15559259655cbd8bcdbd7ef" //localStorage.getItem("token")
+        })
+        .then(res => {
+          if (res) {
+            this.data = res.data.data;
+            console.log(res.data.data)
+            if(res.data.data.list.length<this.pageSize){
+                this.ajaxto=false
+            }
+          }
+
+          /* 单次请求数据完毕 */
+          this.$refs.infinitescrollDemo.$emit("ydui.infinitescroll.finishLoad");
+          //   判断是否需要页码加一
+          if (ispage) {
+            this.page++;
+          }
+        });
+    },
+    classifyclick(i) {
+      this.classifynum = i;
+    },
+    open() {
+      this.$refs.datetime.open();
+    },
+    isshow() {
+      let isShow = true;
+      this.$store.dispatch("GET_ISSHOW", isShow);
+    },
+    //设置一周赛事
+    fun_date: function() {
+      let date = new Date();
+      this.endyear = this.endyear + date.getFullYear() + "/";
+      this.endyear =
+        this.endyear +
+        (date.getMonth() < 10
+          ? "0" + (date.getMonth() + 1)
+          : date.getMonth() + 1) +
+        "/";
+      this.endyear =
+        this.endyear +
+        (date.getDate() < 10 ? "0" + date.getDate() : date.getDate());
+      let date2 = new Date(date);
+      let newday = new Date();
+      let endmonth = newday.getMonth() + 1;
+      newday.setDate(0);
+      let daynum = newday.getDate();
+      let num = 0,
+        org,
+        str;
+      for (let i = daynum; i >= 1; i--) {
+        date2.setDate(date2.getDate() - 1);
+        org = date2.getDay();
+        switch (org) {
+          case 0:
+            str = "星期日";
+            break;
+          case 1:
+            str = "星期一";
+            break;
+          case 2:
+            str = "星期二";
+            break;
+          case 3:
+            str = "星期三";
+            break;
+          case 4:
+            str = "星期四";
+            break;
+          case 5:
+            str = "星期五";
+            break;
+          case 6:
+            str = "星期六";
+            break;
+        }
+        let years = date2.getFullYear();
+
+        let month =
+          date2.getMonth() + 1 < 10
+            ? "0" + (date2.getMonth() + 1)
+            : date2.getMonth() + 1;
+        let day =
+          date2.getDate() < 10 ? "0" + date2.getDate() : date2.getDate();
+        let time2 = {};
+        time2.id = num;
+        if (i == daynum) {
+          time2.title = month + "-" + day + "今天";
+          time2.start = `${date.getFullYear()}-${month}-${day} 00:00:00`;
+          time2.end = `${date.getFullYear()}-${month}-${day} ${
+            date2.getHours() < 10 ? "0" + date2.getHours() : date2.getHours()
+          }:${
+            date2.getMinutes() < 10
+              ? "0" + date2.getMinutes()
+              : date2.getMinutes()
+          }:${
+            date2.getSeconds() < 10
+              ? "0" + date2.getSeconds()
+              : date2.getSeconds()
+          }`;
+        } else if (i == daynum - 1) {
+          time2.title = month + "-" + day + "昨天";
+          time2.start = `${date2.getFullYear()}-${month}-${day} 00:00:00`;
+          time2.end = `${date2.getFullYear()}-${month}-${day} 23:59:59`;
+        } else if (i == daynum - 2) {
+          time2.title = month + "-" + day + "前天";
+          time2.start = `${date2.getFullYear()}-${month}-${day} 00:00:00`;
+          time2.end = `${date2.getFullYear()}-${month}-${day} 23:59:59`;
+        } else {
+          time2.title = month + "-" + day + str;
+          time2.start = `${date2.getFullYear()}-${month}-${day} 00:00:00`;
+          time2.end = `${date2.getFullYear()}-${month}-${day} 23:59:59`;
+        }
+        this.arr.push(time2);
+        num++;
+      }
+    }
+  },
+  watch: {
+    Isshow(val) {
+      this.isShow = val;
+    }
+  },
+  mounted() {}
+};
+</script>
+<style  scoped>
+.datalist-box p {
+  height: 0.88rem;
+  display: flex;
+  align-items: center;
+}
+.datalistbox div {
+  width: 100%;
+}
+.datalist-box {
+  width: 100%;
+  height: 0.88rem;
+}
+.paging {
+  width: 100%;
+  height: 0.88rem;
+  position: absolute;
+  bottom: 0;
+}
+.paging p {
+  width: 0.6rem;
+  height: 0.6rem;
+  margin-left: 0.05rem;
+  border-radius: 0.08rem;
+  background: #ccc;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  color: #363636;
+}
+.paging p input {
+  width: 0.6rem;
+  height: 0.6rem;
+  background: #ebebeb;
+  border: 2px solid #ccc;
+  border-radius: 0.08rem;
+}
+.paging p button {
+  width: 0.6rem;
+  height: 0.6rem;
+  border: none;
+  background: #555;
+  color: #efefef;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  border-radius: 0.08rem;
+}
+.paging p button:active {
+  background: rgb(126, 125, 125);
+  color: #ccc;
+}
+.datalistbox {
+  margin-top: 0.3rem;
+  background: #efefef;
+  padding: 0.2rem 0.3rem;
+  font-size: 0.28rem;
+  color: #555555;
+  line-height: 0.4rem;
+}
+.datalist {
+  position: relative;
+}
+.datalistlet {
+  background-color: #cccccc;
+}
+.datalist .active {
+  background: #f76649 !important;
+  color: #efefef !important;
+}
+.msg {
+  height: 0.88rem;
+  margin-top: 0.3rem;
+  color: #ccc;
+  background: #333;
+}
+.classifyactive {
+  color: #f76649;
+
+  border-bottom: 2px solid #f76649;
+}
+.classify {
+  height: 0.88rem;
+  font-size: 0.3rem;
+  line-height: 0.66rem;
+  font-weight: normal;
+  color: #777777;
+  background-color: #efefef;
+  padding: 0.1rem 0;
+}
+.active {
+  color: rgb(247, 102, 73) !important;
+}
+.box {
+  background: #ebebeb;
+  padding-left: 0.14rem;
+}
+.date {
+  width: 20%;
+  background: #ccc;
+  height: 0.88rem;
+}
+#NavSlide {
+  width: 100%;
+  overflow: hidden;
+}
+#NavSlide nav {
+  padding-top: 0.1rem;
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: middle;
+  -ms-flex-align: middle;
+  align-items: middle;
+  overflow: auto;
+}
+div /deep/ .yd-datetime-content,
+div /deep/ .yd-datetime-shade,
+div /deep/ .yd-datetime-indicator {
+  height: 2rem !important;
+}
+div /deep/ .yd-button {
+  padding: 0;
+  width: 100%;
+  height: 100%;
+}
+div /deep/ .yd-button button {
+  margin: 0;
+  border-radius: 0;
+}
+#NavSlide p {
+  text-align: center;
+  font-size: 0.28rem;
+  -ms-flex-negative: 0;
+  flex-shrink: 0;
+  padding: 0 0.1rem;
+  color: #b8b8b8;
+}
+/* #NavSlide p a{
+	color: #E5E5E5;
+	text-decoration: none;
+} */
+#NavSlide p span.active {
+  color: #363636;
+}
+
+.head_on_box {
+  padding: 0 0.32rem;
+}
+.box {
+  height: 0.88rem;
+  background: linear-gradient(to bottom, #999999, #6a6a6b);
+  overflow: hidden;
+}
+.user-ion {
+  width: 0.3rem;
+  height: 0.3rem;
+}
+#NavSlide p {
+  width: 1.1rem;
+}
+</style>
+

+ 6 - 4
vue_sports/src/pages/Login/index/StLogin.vue

@@ -135,12 +135,13 @@ export default {
 					this.$http.post(this.$ports.login.login,{account:this.account,password:this.password}).then(res=>{
 						if(res.data.status == 1){
 							this.info = '';
-							console.log('res',res)
-							localStorage.setItem('token',res.data.data[0].token)
+							//console.log('res',res)
+							this.$public.setItem('token',res.data.data[0].token)
+							this.$store.dispatch('SET_TOKEN',res.data.data[0].token)
 							localStorage.setItem('name',res.data.data[0].name)
-								this.$store.dispatch('GET_ISSHOW',false)
+							this.$store.dispatch('GET_ISSHOW',false)
 						}else{
-							console.log('resstatus',res)
+							//console.log('resstatus',res)
 							this.info = res.data.msg;
 						}
 					})
@@ -160,6 +161,7 @@ export default {
 			this.$store.dispatch('GET_ISSHOW',this.isshow)
 		},
 		register(){
+			console.log();
 			this.$store.dispatch('GET_ISSHOW',false);
 			this.$store.dispatch('GETRGSHOW', true);
 		}

+ 1 - 1
vue_sports/src/pages/StLeagueBetting/index/StLeagueList.vue

@@ -40,7 +40,7 @@ export default {
     entryForm
   },
   created(){
-        console.log('ssjsjsjsjsj',this.$route.query.code)
+        // console.log('ssjsjsjsjsj',this.$route.query.code)
       if(this.$route.query.code){
         this.entryFormShow = true;
       }else{

+ 63 - 15
vue_sports/src/pages/StRollBallBettingPage/index/StRollBallBettingPage.vue

@@ -5,6 +5,16 @@
     </div>
     <div>
       <SportsHead></SportsHead>
+          <div class="Serch">
+
+      <div class="Soccer-game row center">
+        <div class="Soccer-game-title row center" @click="isreturn()">
+          <img class="returnimg" :src="searchreturn">
+        
+          {{name}}
+        </div>
+        </div>
+      </div>
       <div class="gambling">
         <div class="leagueMatch">
           <yd-button size="large" @click.native="show = true"></yd-button>
@@ -90,7 +100,7 @@
         <NotOpend :title="tipsTitle"></NotOpend>
       </div>
       <StLinkFooter></StLinkFooter>
-      <BettingWindow v-if="isWindow" />
+      <BettingWindow v-if="isWindow"/>
     </div>
   </div>
 </template>
@@ -109,12 +119,14 @@ import FullHalf from "@/components/dedicated/StFullHalf";
 import TeamGoalSize from "@/components/dedicated/StTeamGoalSize";
 import GoalSingleAndDouble from "@/components/dedicated/StGoalSingleAndDouble";
 import Corner from "@/components/dedicated/StCorner";
-import BettingWindow from "@/components/StBettingWindow"
+import BettingWindow from "@/components/StBettingWindow";
 export default {
   data() {
     return {
+      name:this.$route.query.name, // 球名
+      searchreturn: require("@/assets/st-imges/returnbox.png"),
       gameCode: this.$route.query.gameCode, //别名
-      match_id:'',
+      match_id: "",
       list: [], //数据
       key: [], //存储key值进行判定
       isShow: "", //更具数据是否显示
@@ -122,13 +134,14 @@ export default {
       tipsTitle: "暂无相关数据信息",
       active: 0,
       // 投注页是否打开
-      isWindow:false,
+      isWindow: false,
       // isIphone: false,//是否ios
       // isAndroid: false,//是否Android
       show: false, //是否显示模态框
       satatus: true,
       isAll: true,
-      Single: ""
+      Single: "",
+      timers : true
     };
   },
   methods: {
@@ -152,22 +165,22 @@ export default {
               return false;
             }
             this.list = res.data.data;
-            let arrayData =[];
+            let arrayData = [];
             let key = Object.keys(res.data.data.p_code_array);
             let values = Object.values(res.data.data.p_code_array);
             this.isShow = true;
             this.key = ["所有盘口"];
             key.forEach((e, index) => {
               this.key.push(values[index]);
-              let stripData=[] ;
-              res.data.data.oddsData.forEach((data) => {
-                if(data.p_code == e){
+              let stripData = [];
+              res.data.data.oddsData.forEach(data => {
+                if (data.p_code == e) {
                   stripData.push(data);
                 }
                 arrayData[index] = stripData;
               });
             });
-            this.list.oddsData =arrayData
+            this.list.oddsData = arrayData;
             this.$store.dispatch("GETGAMERATIO", this.list);
             console.log("数据源", arrayData);
           }
@@ -180,7 +193,7 @@ export default {
     check(index, match_id) {
       this.show = false;
       if (this.list.match_id == match_id) return false;
-      this.$store.dispatch("MACTH_ID",match_id);
+      this.$store.dispatch("MACTH_ID", match_id);
       this.getAjax(this.gameCode, match_id);
     },
     /**
@@ -228,7 +241,7 @@ export default {
    * 计算属性
    */
   computed: {
-     IsWindow() {
+    IsWindow() {
       return this.$store.getters.getIsBetting;
     }
   },
@@ -243,12 +256,22 @@ export default {
   },
 
   mounted() {
+    let _this = this;
+    this.$public.ajaxTimerFun(function(timing) {
+      _this.getAjax(_this.gameCode, _this.match_id);
+      if (!_this.timers) {
+        clearInterval(timing);
+      }
+    });
     this.match_id = this.$store.getters.getMatchId;
     this.getAjax(this.gameCode, this.match_id);
-     if(this.$store.getters.getIsBetting){
-      this.isWindow=true
+    if (this.$store.getters.getIsBetting) {
+      this.isWindow = true;
     }
   },
+  beforeDestroy() {
+    this.timers = false;
+  },
   components: {
     Corner,
     Goal,
@@ -269,6 +292,31 @@ export default {
 </script>
 
 <style scoped>
+/* 头部 */
+.Serch {
+  height: 0.88rem;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  background: linear-gradient(to bottom, #6a6a6a, #565656);
+  color: #f76649;
+  font-family: "PingFang-SC-Regular";
+  padding: 0 0.33rem;
+}
+.returnimg {
+  width: 0.37rem;
+  height: 0.3rem;
+  margin-right: 0.1rem;
+}
+.Soccer-game-title {
+  height: 0.88rem;
+  font-size: 0.3rem;
+}
+.Soccer-game-box {
+  height: 0.88rem;
+  /* padding: 0 0.32rem; */
+  background-color: #626262;
+}
 .gambling {
   background: #f8f8f8;
 }
@@ -280,7 +328,7 @@ export default {
   align-items: center;
   flex-wrap: nowrap;
   border-bottom: 1px solid #e4e4e4;
-  background: linear-gradient(to top, #FFE9C9, #FFF3E2);
+  background: linear-gradient(to top, #ffe9c9, #fff3e2);
 }
 .leagueMatch div {
   font-size: 0.28rem;

Some files were not shown because too many files changed in this diff