d7246c4d75eac43a966b2eaa539eaa9b568114c0.svn-base 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <template>
  2. <div>
  3. <div class="tit">
  4. <span style="font-size:.3rem;color:#fff; font-weight: bold;">{{title}}</span>
  5. </div>
  6. <div v-if="noData">
  7. <NotOpend :title="this.info"/>
  8. </div>
  9. <div class="charBox">
  10. <div v-for="item in list" class="details" :key="item.id" @click="getMatchInfo(item.match_id)">
  11. <div>
  12. <span>{{item.name_chinese}}</span>
  13. </div>
  14. <div class="matchDtls">
  15. <div>
  16. <span>{{item.home_team}}</span>
  17. <div>
  18. <span>{{item.match_date}}</span>
  19. </div>
  20. </div>
  21. <div>
  22. <span>{{item.guest_team}}</span>
  23. <div>
  24. <span>{{item.match_time}}</span>
  25. </div>
  26. </div>
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. </template>
  32. <script>
  33. import NotOpend from "@/components/StNotOpend";
  34. export default {
  35. name:'',
  36. components:{NotOpend},
  37. data(){
  38. return{
  39. title:'特色赛事',
  40. list:'',
  41. noData: false,
  42. info: "暂无相关特色赛事",
  43. timers: true
  44. }
  45. },
  46. mounted() {
  47. let _this =this;
  48. this.$public.ajaxTimerFun(function(timing){
  49. if (_this.timers){
  50. _this.getAjax();
  51. }else{
  52. clearInterval(timing);
  53. }
  54. })
  55. this.getAjax();
  56. },
  57. methods:{
  58. getMatchInfo(matchId){
  59. this.$router.push({
  60. path: "/StRollBallBettingPage",
  61. query: { gameCode:'zq',name:'足球'}
  62. });
  63. this.$store.dispatch("MACTH_ID", matchId);
  64. },
  65. getAjax:function(){
  66. //this.$store.dispatch('GETSHOW',true);
  67. this.$http.get(this.$ports.home.highMatch).then(res =>{
  68. // console.log('highMatch',res)
  69. if(res.data.status == 1 && res.data.data.matchData.length > 0){
  70. this.list = res.data.data.matchData;
  71. this.title = res.data.data.title;
  72. this.noData = false;
  73. }else{
  74. this.noData = true;
  75. }
  76. this.$store.dispatch('GETSHOW',false);
  77. })
  78. }
  79. },
  80. beforeDestroy(){
  81. this.timers = false;
  82. }
  83. };
  84. </script>
  85. <style scoped lang="">
  86. .charBox {
  87. margin-top: 0.24rem;
  88. text-align: left;
  89. background: #f8f8f8;
  90. padding:0.2rem 0.3rem;
  91. margin: 0 auto;
  92. }
  93. .tit {
  94. padding: 0.24rem 0;
  95. padding:0 0.3rem;
  96. background: #a0a0a0;
  97. font-size: 0.32rem;
  98. line-height: 0.88rem;
  99. height: 0.88rem;
  100. color: #000000;
  101. }
  102. .details {
  103. padding: 0.25rem 0.31rem;
  104. background: #dcdcdc;
  105. border-radius: 0.08rem;
  106. margin-bottom: .2rem;
  107. }
  108. .details:nth-last-child(1){
  109. margin-bottom: 0;
  110. }
  111. .details div span {
  112. font-size: 0.28rem;
  113. color: #F76649;
  114. }
  115. .matchDtls {
  116. margin-top: 0.12rem;
  117. }
  118. .matchDtls div {
  119. position: relative;
  120. display: flex;
  121. justify-content: space-between;
  122. align-items: center;
  123. }
  124. .matchDtls div span {
  125. color: #333333;
  126. font-size: 0.28rem;
  127. }
  128. .matchDtls div div span {
  129. font-size: 0.24rem;
  130. }
  131. .matchDtls i {
  132. display: inline-block;
  133. width: 0.08rem;
  134. height: 0.08rem;
  135. position: absolute;
  136. right: 0;
  137. top: 0;
  138. background: #000;
  139. }
  140. </style>