d8c96903a07f0c1a11cc068f53859f627d885901.svn-base 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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">
  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. _this.getAjax();
  50. if (!_this.timers){
  51. clearInterval(timing);
  52. }
  53. })
  54. this.getAjax();
  55. },
  56. methods:{
  57. getAjax:function(){
  58. this.$store.dispatch('GETSHOW',true);
  59. this.$http.get(this.$ports.home.highMatch).then(res =>{
  60. console.log('highMatch',res)
  61. if(res.data.status == 1 && res.data.data.matchData.length > 0){
  62. this.list = res.data.data.matchData;
  63. this.title = res.data.data.title;
  64. this.noData = false;
  65. this.$store.dispatch('GETSHOW',false);
  66. }else{
  67. this.noData = true;
  68. this.$store.dispatch('GETSHOW',false);
  69. }
  70. })
  71. }
  72. },
  73. beforeDestroy(){
  74. this.timers = false;
  75. }
  76. };
  77. </script>
  78. <style scoped lang="">
  79. .charBox {
  80. margin-top: 0.24rem;
  81. text-align: left;
  82. background: #f8f8f8;
  83. padding:0 0.3rem;
  84. margin: 0 auto;
  85. padding-top: 0.12rem;
  86. }
  87. .tit {
  88. padding: 0.24rem 0;
  89. padding:0 0.3rem;
  90. background: #a0a0a0;
  91. font-size: 0.32rem;
  92. line-height: 0.88rem;
  93. height: 0.88rem;
  94. color: #000000;
  95. }
  96. .details {
  97. padding: 0.25rem 0.31rem;
  98. background: #dcdcdc;
  99. border-radius: 0.08rem;
  100. margin-bottom: .2rem;
  101. }
  102. .details div span {
  103. font-size: 0.28rem;
  104. color: #F76649;
  105. }
  106. .matchDtls {
  107. margin-top: 0.12rem;
  108. }
  109. .matchDtls div {
  110. position: relative;
  111. display: flex;
  112. justify-content: space-between;
  113. align-items: center;
  114. }
  115. .matchDtls div span {
  116. color: #333333;
  117. font-size: 0.28rem;
  118. }
  119. .matchDtls div div span {
  120. font-size: 0.24rem;
  121. }
  122. .matchDtls i {
  123. display: inline-block;
  124. width: 0.08rem;
  125. height: 0.08rem;
  126. position: absolute;
  127. right: 0;
  128. top: 0;
  129. background: #000;
  130. }
  131. </style>