9b8e0cb9da34de48363d862dd8403386d4743adf.svn-base 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <template>
  2. <div class="BallDisc column">
  3. <div class="row allAlignment center box" style="background:#a0a0a0;" @click="jumpBallDisc">
  4. <span class="row center" style="font-size:.3rem;color:#fff; font-weight: bold;">{{titel}}</span>
  5. <div>
  6. <span class="mark row center">{{index}}</span>
  7. <img src="../assets/st-imges/minRightArrow.png" alt>
  8. </div>
  9. </div>
  10. <div style=" padding: 0 0.3rem;">
  11. <BasketballBlock :type="st.type1"></BasketballBlock>
  12. <BasketballBlock :type="st.type2"></BasketballBlock>
  13. <BasketballBlock :type="st.type3"></BasketballBlock>
  14. <Tennis></Tennis>
  15. </div>
  16. <div v-if="noData">
  17. <NotOpend :title="this.info"/>
  18. </div>
  19. <!-- <Loading/> -->
  20. </div>
  21. </template>
  22. <script>
  23. import "../css/index.css";
  24. import BasketballBlock from "./StBasketballBlock";
  25. import Loading from "./StLoading";
  26. import Tennis from "./StTennis";
  27. import NotOpend from "@/components/StNotOpend";
  28. export default {
  29. name: "BallDisc",
  30. data() {
  31. return {
  32. data: "",
  33. titel: "滚球盘",
  34. index: 0,
  35. // 区分接口
  36. st: {
  37. type1: 1,
  38. type2: 2,
  39. type3: 3
  40. },
  41. noData: false,
  42. info: "暂无相关滚球赛事",
  43. zqCondition: false,
  44. bqCondition: false,
  45. wqCondition: false,
  46. lqCondition: false
  47. };
  48. },
  49. methods: {
  50. jumpBallDisc: function() {
  51. this.$router.push({
  52. path: "/StRollBallpage",
  53. query: { number: 0, home: true, hmsts: 1 }
  54. });
  55. // this.$route.query.number
  56. },
  57. noDataShow() {
  58. if (
  59. this.bqCondition == true &&
  60. this.wqCondition == true &&
  61. this.zqCondition == true &&
  62. this.lqCondition == true
  63. ) {
  64. this.noData = true;
  65. } else {
  66. this.noData = false;
  67. }
  68. }
  69. },
  70. components: {
  71. BasketballBlock,
  72. Tennis,
  73. Loading,
  74. NotOpend
  75. },
  76. mounted() {
  77. // 获取条数。。
  78. this.$http.get(this.$ports.home.trollingBall).then(res => {
  79. console.log("zq", res);
  80. if (
  81. res.data.status == 200 &&
  82. res.data.data.length > 0 &&
  83. res.data.data.matchData.length > 0
  84. ) {
  85. this.index += res.data.data.matchData.length;
  86. this.zqCondition = false;
  87. if (this.index == NaN) {
  88. this.index = 0;
  89. }
  90. } else {
  91. this.zqCondition = true;
  92. this.noDataShow();
  93. }
  94. });
  95. this.$http.get(this.$ports.home.rollingBall).then(res => {
  96. if (
  97. res.data.status == 1 &&
  98. res.data.data.length > 0 &&
  99. res.data.data.matchData.length > 0
  100. ) {
  101. this.index += res.data.data.matchData.length;
  102. this.lqCondition = false;
  103. } else {
  104. this.lqCondition = true;
  105. this.noDataShow();
  106. }
  107. });
  108. this.$http.get(this.$ports.home.wqrollingBall).then(res => {
  109. if (
  110. res.data.status == 1 &&
  111. res.data.data.length > 0 &&
  112. res.data.data.matchData.length > 0
  113. ) {
  114. this.index += res.data.data.matchData.length;
  115. this.wqCondition = false;
  116. if (this.index == NaN) {
  117. this.index = 0;
  118. }
  119. } else {
  120. this.wqCondition = true;
  121. this.noDataShow();
  122. }
  123. });
  124. this.$http.get(this.$ports.home.bqrollingBall).then(res => {
  125. if (
  126. res.data.status == 1 &&
  127. res.data.data.length > 0 &&
  128. res.data.data.matchData.length > 0
  129. ) {
  130. this.index += res.data.data.matchData.length;
  131. this.bqCondition = false;
  132. if (this.index == NaN) {
  133. this.index = 0;
  134. }
  135. } else {
  136. this.bqCondition = true;
  137. this.noDataShow();
  138. }
  139. });
  140. }
  141. };
  142. </script>
  143. <style scoped>
  144. .box {
  145. width: 100%;
  146. padding: 0.28rem 0;
  147. background: #f8f8f8;
  148. padding: 0 0.3rem;
  149. height: 0.88rem;
  150. }
  151. .BallDisc {
  152. font-size: 0.32rem;
  153. background: #f8f8f8;
  154. color: #000000;
  155. margin-bottom: 0.12rem;
  156. }
  157. div /deep/ .tennis .ballBtn {
  158. border-bottom: none;
  159. }
  160. .mark {
  161. position: absolute;
  162. right: 0.8rem;
  163. width: 0.4rem;
  164. height: 0.4rem;
  165. border-radius: 50%;
  166. background: #f76649;
  167. color: floralwhite;
  168. font-size: 0.2rem;
  169. }
  170. </style>