103d5cfd70e0ad4ac5b8b918b863a9824da21939.svn-base 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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. getIsShow: true
  45. };
  46. },
  47. mounted() {
  48. if (this.getIsShow) {
  49. this.$store.dispatch("GETSHOW", true);
  50. this.getIsShow = false;
  51. }
  52. let _this = this;
  53. this.$public.ajaxTimerFun(function(timing) {
  54. if (_this.timers) {
  55. _this.getAjax();
  56. } else {
  57. clearInterval(timing);
  58. }
  59. },(1000*180));
  60. this.getAjax();
  61. },
  62. methods: {
  63. getMatchInfo(matchId) {
  64. this.$router.push({
  65. path: "/StRollBallBettingPage",
  66. query: { gameCode: "zq", name: "足球" }
  67. });
  68. this.$store.dispatch("MACTH_ID", matchId);
  69. },
  70. getAjax: function() {
  71. //this.$store.dispatch('GETSHOW',true);
  72. this.$http.get(this.$ports.home.highMatch).then(res => {
  73. // console.log('highMatch',res)
  74. if (res.data.status == 1 && res.data.data.matchData.length > 0) {
  75. this.list = res.data.data.matchData;
  76. this.title = res.data.data.title;
  77. this.noData = false;
  78. } else {
  79. this.noData = true;
  80. }
  81. });
  82. let _this = this;
  83. setTimeout(() => {
  84. _this.$store.dispatch("GETSHOW", false);
  85. }, 1000);
  86. }
  87. },
  88. beforeDestroy() {
  89. this.timers = false;
  90. }
  91. };
  92. </script>
  93. <style scoped lang="">
  94. .charBox {
  95. margin-top: 0.24rem;
  96. text-align: left;
  97. background: #f8f8f8;
  98. padding: 0.2rem 0.3rem;
  99. margin: 0 auto;
  100. }
  101. .tit {
  102. padding: 0.24rem 0;
  103. padding: 0 0.3rem;
  104. background: #a0a0a0;
  105. font-size: 0.32rem;
  106. line-height: 0.88rem;
  107. height: 0.88rem;
  108. color: #000000;
  109. }
  110. .details {
  111. padding: 0.25rem 0.31rem;
  112. background: #dcdcdc;
  113. border-radius: 0.08rem;
  114. margin-bottom: 0.2rem;
  115. }
  116. .details:nth-last-child(1) {
  117. margin-bottom: 0;
  118. }
  119. .details div span {
  120. font-size: 0.28rem;
  121. color: #f76649;
  122. }
  123. .matchDtls {
  124. margin-top: 0.12rem;
  125. }
  126. .matchDtls div {
  127. position: relative;
  128. display: flex;
  129. justify-content: space-between;
  130. align-items: center;
  131. }
  132. .matchDtls div span {
  133. color: #333333;
  134. font-size: 0.28rem;
  135. }
  136. .matchDtls div div span {
  137. font-size: 0.24rem;
  138. }
  139. .matchDtls i {
  140. display: inline-block;
  141. width: 0.08rem;
  142. height: 0.08rem;
  143. position: absolute;
  144. right: 0;
  145. top: 0;
  146. background: #000;
  147. }
  148. </style>