cac8122214ae67bb989204d115885500293e7a77.svn-base 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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 :name="name" :index="ball.index" :id="ball.id" :ballName = "ball.name" :gameCode = "gameCode"></rollingBall>
  30. </div>
  31. </div>
  32. </div>
  33. </template>
  34. <script>
  35. import rollingBall from "@/components/StRollingBall";
  36. export default {
  37. data() {
  38. return {
  39. title: "网球",
  40. tennisShow:true,
  41. selection: true,
  42. ballName:'',
  43. name:'',//球类名称传值
  44. ball: {
  45. name: "所有网球滚球",
  46. index: "8",
  47. id: 1003
  48. },
  49. gameCode:'',//球类别名
  50. dat: []
  51. };
  52. },
  53. components: { rollingBall },
  54. mounted() {
  55. this.$http.get(this.$ports.home.wqrollingBall).then(res => {
  56. console.log(res.data.data.matchData.length)
  57. if (res.status == 200 && res.data != [] && res.data.data.matchData.length != 0) {
  58. console.log('网球',res)
  59. this.dat = res.data.data.matchData;
  60. this.title = res.data.data.gameName;
  61. this.ball.index = this.dat.length;
  62. this.name = this.title;
  63. this.ball.name = "所有" + this.title + "滚球";
  64. this.gameCode = res.data.data.game_code;
  65. }else{
  66. console.log("!23")
  67. this.tennisShow = false
  68. console.log(' this.tennisShow', this.tennisShow)
  69. }
  70. });
  71. }
  72. };
  73. </script>
  74. <style scoped>
  75. .tennis {
  76. margin-top: 0.13rem;
  77. width: 100%;
  78. border-radius: .08rem;
  79. /* height: 6.42rem; */
  80. background: #dcdcdc;
  81. /* padding: 0 0.3rem 0 0.35rem; */
  82. margin-bottom: 0.2rem;
  83. padding: .3rem;
  84. }
  85. h3 {
  86. text-align: left;
  87. font-size: 0.3rem;
  88. color: #000000;
  89. padding: 0.25rem 0 0.05rem;
  90. font-weight: 500;
  91. }
  92. .tennis-dtl {
  93. width: 100%;
  94. background: #dcdcdc;
  95. border-bottom: 1px solid #E4E4E4;
  96. margin-top: 0.2rem;
  97. /* height: 1.89rem; */
  98. height: auto;
  99. padding: 0.24rem 0.89rem 0.25rem 0.31rem;
  100. position: relative;
  101. display: flex;
  102. justify-content: space-between;
  103. /* align-items: center; */
  104. }
  105. .teamName {
  106. color: #333333;
  107. font-size: 0.28rem;
  108. width: 2.7rem;
  109. text-align: left;
  110. }
  111. .frequency {
  112. width: 1.57rem;
  113. vertical-align: middle;
  114. /* 垂直对齐 */
  115. display: flex;
  116. flex-direction: column;
  117. justify-content: space-between;
  118. }
  119. .frequency div {
  120. display: flex;
  121. justify-content: space-between;
  122. align-items: center;
  123. font-size: 0.24rem;
  124. color: #333333;
  125. }
  126. .frequency div:nth-last-child(1) {
  127. margin-bottom: 0;
  128. }
  129. .frequency .status {
  130. color: #F76649;
  131. }
  132. .tennis-dtl .icon {
  133. width: 0.08rem;
  134. height: 0.08rem;
  135. position: absolute;
  136. top: 0.8rem;
  137. right: 0.33rem;
  138. }
  139. .tennis-dtl .icon i {
  140. display: inline-block;
  141. background: #000000;
  142. width: 0.08rem;
  143. height: 0.08rem;
  144. }
  145. .ballBtn {
  146. padding-top: 0.41rem;
  147. padding-bottom: 0.46rem;
  148. }
  149. </style>