142d8813ee84cb4ca3e30362688cb21137584050.svn-base 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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">{{idx}}</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 "@/components/StBasketballBlock";
  25. import Loading from "@/components/StLoading";
  26. import Tennis from "@/components/StTennis";
  27. import NotOpend from "@/components/StNotOpend";
  28. import Bus from '@/assets/bus.js';
  29. export default {
  30. name: "BallDisc",
  31. data() {
  32. return {
  33. data: "",
  34. titel: "滚球盘",
  35. // index: 0,
  36. // 区分接口
  37. st: {
  38. type1: 1,
  39. type2: 2,
  40. type3: 3
  41. },
  42. noData: false,
  43. info: "暂无相关滚球赛事",
  44. zqCondition: false,
  45. bqCondition: false,
  46. wqCondition: false,
  47. lqCondition: false,
  48. idx : '',
  49. timers : true // 定时器开关
  50. };
  51. },
  52. methods: {
  53. jumpBallDisc: function() {
  54. this.$store.dispatch("GETACTIVITY", 'StRollBall')
  55. this.$router.push({
  56. path: "/StRollBallpage",
  57. query: { number: 0, home: true, hmsts: 1 }
  58. });
  59. },
  60. getAjax(){
  61. if(this.idx == 0){
  62. this.noData = true;
  63. }else{
  64. this.noData = false;
  65. }
  66. }
  67. },
  68. components: {
  69. BasketballBlock,
  70. Tennis,
  71. Loading,
  72. NotOpend
  73. },
  74. mounted() {
  75. if (this.$store.getters.getHeadTitle) {
  76. let title = this.$store.getters.getHeadTitle;
  77. this.idx = title[0][0].matchNum
  78. }
  79. //获取条数。。
  80. this.getAjax();
  81. let _this = this;
  82. this.$public.ajaxTimerFun(function(timing){
  83. if (_this.timers){
  84. _this.getAjax();
  85. }else{
  86. clearInterval(timing);
  87. }
  88. })
  89. },
  90. computed: {
  91. getHeadTit(){
  92. return this.$store.getters.getHeadTitle
  93. }
  94. },
  95. watch: {
  96. getHeadTit(val){
  97. this.idx = val[0][0].matchNum
  98. }
  99. },
  100. beforeDestroy(){
  101. this.timers = false;
  102. }
  103. };
  104. </script>
  105. <style scoped>
  106. .box {
  107. width: 100%;
  108. padding: 0.28rem 0;
  109. background: #f8f8f8;
  110. padding: 0 0.3rem;
  111. height: 0.88rem;
  112. }
  113. .BallDisc {
  114. font-size: 0.32rem;
  115. background: #f8f8f8;
  116. color: #000000;
  117. margin-bottom: 0.12rem;
  118. }
  119. div /deep/ .tennis .ballBtn {
  120. border-bottom: none;
  121. }
  122. .mark {
  123. position: absolute;
  124. right: 0.8rem;
  125. width: 0.4rem;
  126. height: 0.4rem;
  127. border-radius: 50%;
  128. background: #f76649;
  129. color: floralwhite;
  130. font-size: 0.2rem;
  131. }
  132. </style>