2d612debc4d4ce6794f8d0722ad369d8e0ba0255.svn-base 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template lang="">
  2. <div @click="leagueBetting()" class = "rollingBtn ">
  3. <p>{{this.ballName}}</p>
  4. <div class='row center' >
  5. <span>{{this.index}}</span>
  6. </div>
  7. </div>
  8. </template>
  9. <script>
  10. import "../css/index.css";
  11. export default {
  12. props: [
  13. "bm",
  14. "name",
  15. "index",
  16. "id",
  17. "type",
  18. "gameCode",
  19. "ballName",
  20. "lgId",
  21. 'today',
  22. 'code',
  23. 'homeShow'
  24. ],
  25. data() {
  26. return {};
  27. },
  28. methods: {
  29. leagueBetting: function() {
  30. console.log('gameCode',this.gameCode)
  31. if (this.bm == "ty") {
  32. this.$store.dispatch("GETACTIVITY", "home");
  33. if (this.type == "Roll") {
  34. this.$store.dispatch("GETACTIVITY", this.id); //将活动类别存入vuex里面
  35. this.$store.dispatch("GET_BALL_ID", this.id);
  36. this.$router.push({
  37. path: "/StRollBallpage",
  38. query: { titleNumber: e }
  39. });
  40. } else {
  41. if(this.today && this.bm == 'ty'){
  42. this.$router.push({
  43. path: "StLeagueList",
  44. query: {
  45. lg_id: '',
  46. id: this.index,
  47. type_code:'StToday',
  48. game_code: this.gameCode,
  49. code:this.code,
  50. name: this.name,
  51. home: true,
  52. today : 1,
  53. btn: 2
  54. }
  55. });
  56. }else if(!this.today && this.bm == 'ty'){
  57. if(this.homeShow){
  58. this.$router.push({
  59. path: "StLeagueList",
  60. query: {
  61. game_code: this.gameCode,
  62. lg_id: this.lgId,
  63. code:this.code,
  64. id: this.index,
  65. name: this.name,
  66. number: 0,
  67. home: true,
  68. hMatch : 1,
  69. btn: 2
  70. }
  71. });
  72. }else{
  73. this.$store.dispatch("GETACTIVITY", "StSoon");
  74. this.$router.replace({
  75. path: "/StRollBallpage",
  76. query: { home: 1 }
  77. });
  78. }
  79. }
  80. // 暂不使用
  81. else{
  82. this.$router.push({
  83. path: "StLeagueList",
  84. query: {
  85. game_code: this.gameCode,
  86. lg_id: this.lgId,
  87. code:this.code,
  88. id: this.index,
  89. name: this.name,
  90. number: 0,
  91. home: true,
  92. hMatch : 1,
  93. btn: 2
  94. }
  95. });
  96. }
  97. }
  98. }else if(this.bm == 'gq'){
  99. this.$store.dispatch("GETACTIVITY", "StRollBall");
  100. this.$router.replace({
  101. path: "/StRollBallpage",
  102. query: { home: 1 }
  103. });
  104. }
  105. }
  106. },
  107. };
  108. </script>
  109. <style scoped>
  110. .rollingBtn {
  111. width: 100%;
  112. display: flex;
  113. align-items: center;
  114. margin: 0 auto;
  115. position: relative;
  116. font-size: 0.3rem;
  117. }
  118. .rollingBtn > p {
  119. width: 90%;
  120. height: 0.7rem;
  121. background: linear-gradient(to bottom, #dddddd, #cccccc);
  122. text-align: center;
  123. line-height: 0.7rem;
  124. font-size: 0.3rem;
  125. font-weight: bold;
  126. border-radius: 0.08rem 0 0 0.08rem;
  127. color: #666666;
  128. border: none;
  129. }
  130. .yd-btn-block {
  131. margin-top: 0;
  132. }
  133. .rollingBtn > div {
  134. position: absolute;
  135. right: 0;
  136. top: 0;
  137. width: 10%;
  138. height: 0.7rem;
  139. line-height: 0.7rem;
  140. background: linear-gradient(to top, #ddd, #ccc);
  141. border-radius: 0px 0.08rem 0.08rem 0px;
  142. color: #666666;
  143. }
  144. .rollingBtn div i {
  145. display: inline-block;
  146. width: 0.08rem;
  147. height: 0.08rem;
  148. background: #f5f5f5;
  149. vertical-align: middle;
  150. }
  151. </style>