7ce7f1f43ea49d3d50a5c5702b6416eaf8627ff5.svn-base 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <div>
  3. <div v-if="tennisShow">
  4. <h3 style="color:#F76649;">{{title}}</h3>
  5. <div class="tennis">
  6. <div class="tennis-dtl" v-for="(item,index) in dat" :key="item.id">
  7. <div class="teamName">
  8. <span>{{item.host_player_name}}</span>
  9. <div>vs</div>
  10. <span>{{item.guest_player_name}}</span>
  11. </div>
  12. <div class="frequency">
  13. <div :class="item.match_process == 1? 'status':''">
  14. <span>第一盘</span>
  15. <span>{{item.first_inning_score}}</span>
  16. </div>
  17. <div :class="item.match_process == 2? 'status':''">
  18. <span>第二盘</span>
  19. <span>{{item.second_inning_score}}</span>
  20. </div>
  21. <div :class="item.match_process == 3? 'status':''">
  22. <span>第三盘</span>
  23. <span>{{item.third_inning_score}}</span>
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. <div class="ballBtn">
  29. <rollingBall
  30. :name="name"
  31. :index="ball.index"
  32. :id="ball.id"
  33. :ballName="ball.name"
  34. :gameCode="gameCode"
  35. ></rollingBall>
  36. </div>
  37. </div>
  38. </div>
  39. </template>
  40. <script>
  41. import rollingBall from "@/components/StRollingBall";
  42. export default {
  43. data() {
  44. return {
  45. title: "网球",
  46. tennisShow: true,
  47. selection: true,
  48. ballName: "",
  49. name: "", //球类名称传值
  50. ball: {
  51. name: "所有网球滚球",
  52. index: "8",
  53. id: 1003
  54. },
  55. gameCode: "", //球类别名
  56. dat: []
  57. };
  58. },
  59. components: { rollingBall },
  60. mounted() {
  61. this.getAjax();
  62. let _this = this;
  63. this.$public.ajaxTimerFun(function(timing) {
  64. _this.getAjax();
  65. if (!_this.timers) {
  66. clearInterval(timing);
  67. }
  68. });
  69. },
  70. methods: {
  71. getAjax() {
  72. this.$store.dispatch("GETSHOW", true);
  73. this.$http.get(this.$ports.home.wqrollingBall).then(res => {
  74. if (
  75. res.data.status == 1 &&
  76. res.data != [] &&
  77. res.data.data.matchData.length != 0
  78. ) {
  79. console.log("网球", res);
  80. this.dat = res.data.data.matchData;
  81. this.title = res.data.data.gameName;
  82. this.ball.index = this.dat.length;
  83. this.name = this.title;
  84. this.ball.name = "所有" + this.title + "滚球";
  85. this.gameCode = res.data.data.game_code;
  86. } else {
  87. this.tennisShow = false;
  88. console.log(" this.tennisShow", this.tennisShow);
  89. }
  90. this.$store.dispatch("GETSHOW", false);
  91. });
  92. }
  93. }
  94. };
  95. </script>
  96. <style scoped>
  97. .tennis {
  98. margin-top: 0.13rem;
  99. width: 100%;
  100. border-radius: 0.08rem;
  101. /* height: 6.42rem; */
  102. background: #dcdcdc;
  103. /* padding: 0 0.3rem 0 0.35rem; */
  104. margin-bottom: 0.2rem;
  105. padding: 0.3rem;
  106. }
  107. h3 {
  108. text-align: left;
  109. font-size: 0.3rem;
  110. color: #000000;
  111. padding: 0.25rem 0 0.05rem;
  112. font-weight: 500;
  113. }
  114. .tennis-dtl {
  115. width: 100%;
  116. background: #dcdcdc;
  117. border-bottom: 1px solid #e4e4e4;
  118. margin-top: 0.2rem;
  119. /* height: 1.89rem; */
  120. height: auto;
  121. padding: 0.24rem 0.89rem 0.25rem 0.31rem;
  122. position: relative;
  123. display: flex;
  124. justify-content: space-between;
  125. /* align-items: center; */
  126. }
  127. .teamName {
  128. color: #333333;
  129. font-size: 0.28rem;
  130. width: 2.7rem;
  131. text-align: left;
  132. }
  133. .frequency {
  134. width: 1.57rem;
  135. vertical-align: middle;
  136. /* 垂直对齐 */
  137. display: flex;
  138. flex-direction: column;
  139. justify-content: space-between;
  140. }
  141. .frequency div {
  142. display: flex;
  143. justify-content: space-between;
  144. align-items: center;
  145. font-size: 0.24rem;
  146. color: #333333;
  147. }
  148. .frequency div:nth-last-child(1) {
  149. margin-bottom: 0;
  150. }
  151. .frequency .status {
  152. color: #f76649;
  153. }
  154. .tennis-dtl .icon {
  155. width: 0.08rem;
  156. height: 0.08rem;
  157. position: absolute;
  158. top: 0.8rem;
  159. right: 0.33rem;
  160. }
  161. .tennis-dtl .icon i {
  162. display: inline-block;
  163. background: #000000;
  164. width: 0.08rem;
  165. height: 0.08rem;
  166. }
  167. .ballBtn {
  168. padding-top: 0.41rem;
  169. padding-bottom: 0.46rem;
  170. }
  171. </style>