59f27e8ea6202421ce28773d0f12be595723317d.svn-base 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. <template>
  2. <div>
  3. <div v-if="isShow">
  4. <div v-for="(items,index) in list" :key="items.id" class="mg">
  5. <!-- <div v-for="items in list[index]" :key="items.id"> -->
  6. <div class="row allAlignment box center">
  7. <span>{{items.leagueName}}</span>
  8. <div class="row Match-title-num">
  9. <span>{{items.matchNum}}</span>
  10. </div>
  11. </div>
  12. <div class="Match-box">
  13. <div v-for="(item,index) in items.matchData" :key="item.id" class="Match-box">
  14. <div v-for="(itemList,index) in items.matchData[index]" :key="itemList.id">
  15. <div class="row allAlignment Match-box-top">
  16. <div class="Match-box-top-left">
  17. <span>{{itemList.match_date}}</span>
  18. <span>{{itemList.match_time}}</span>
  19. </div>
  20. <div class="Match-box-top-right row">
  21. <span style="margin-right: .1rem;" class="Match-box-top-num">{{itemList.tag}}</span>
  22. <span style="margin-right: .1rem;">让球</span>
  23. <span style="margin-right: .1rem;">大小</span>
  24. </div>
  25. </div>
  26. <div class="row allAlignment center">
  27. <div class="column average name-box">
  28. <div>{{itemList.home_team}}</div>
  29. <div>{{itemList.guest_team}}</div>
  30. </div>
  31. <div class="Match-list-box row item-center average">
  32. <div v-for="(odds,i) in itemList.oddsData[0]" :key="odds.id" class="match-list">
  33. <div
  34. @click="isclick(index,i)"
  35. class="column center"
  36. :class="items.istrue==i?'active':''"
  37. >
  38. <span style="color:#FD8F26">{{odds.condition}}</span>
  39. <span>{{odds.odds}}</span>
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. <!-- 1x2 -->
  50. <div v-if="!isShow">
  51. <div v-for="(item,index) in list" :key="item.id">
  52. <div class="row allAlignment haderBox center">
  53. <span>{{item.leagueName}}</span>
  54. <div class="Match-title-num">
  55. <span>{{item.matchNum}}</span>
  56. </div>
  57. </div>
  58. <div v-for="(items,$index) in item.matchData" :key="items.id">
  59. <div v-for="itemList in item.matchData[$index]" :key="itemList.id">
  60. <div class="box">
  61. <div class="row allAlignment item-center top-box">
  62. <span>
  63. <i>{{itemList.match_process}}</i>
  64. <b style="color:#F76649;font-weight: normal;">{{itemList.match_time}}</b>
  65. </span>
  66. <span class="top-num">{{itemList.tag}}</span>
  67. </div>
  68. </div>
  69. <div class="box-bottom">
  70. <div class="box row item-center main-box">
  71. <span class="num-box" style="color:#eb921e">{{itemList.home_score}}</span>
  72. &nbsp;&nbsp;{{itemList.home_team}}
  73. </div>
  74. <div class="box row item-center main-box">
  75. <span class="num-box" style="color:#eb921e">{{itemList.guest_score}}</span>
  76. &nbsp;&nbsp;{{itemList.guest_team}}
  77. </div>
  78. <div class="footBox">
  79. <div
  80. class="box row allAlignment bottom-box center"
  81. v-for="(odds,idx) in itemList.oddsData[1]"
  82. :key="odds.id"
  83. >
  84. <div
  85. class="item-center bottom-num"
  86. :class="item.istrueA==true?'active':''"
  87. @click="isclick(idx,1)"
  88. >
  89. <p style="color:#eb921e">{{odds.condition}}</p>
  90. <p>{{odds.odds}}</p>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. <!-- 独赢盘 -->
  100. <div v-if="noData">
  101. <NotOpend :title="this.info"/>
  102. </div>
  103. </div>
  104. </template>
  105. <script>
  106. import "../css/index.css";
  107. import Bus from "../assets/bus.js";
  108. import NotOpend from "@/components/StNotOpend";
  109. export default {
  110. props: ["gameCode", "name"],
  111. data() {
  112. return {
  113. isShow: true,
  114. list: "",
  115. data: {},
  116. data2: [],
  117. info: "没有相关比赛信息",
  118. noData: false
  119. };
  120. },
  121. components: {
  122. NotOpend
  123. },
  124. methods: {
  125. isclick(i, num) {
  126. this.$set(this.data.list[i], "istrue", (this.data.list[i].istrue = num));
  127. },
  128. // 点击事件确认选中
  129. isclick(index, num) {
  130. if (num == 1) {
  131. this.$set(
  132. this.data2[index],
  133. "istrueA",
  134. this.data2[index].istrueA == true ? false : true
  135. );
  136. } else if (num == 2) {
  137. this.$set(
  138. this.data2[index],
  139. "istrueB",
  140. this.data2[index].istrueB == true ? false : true
  141. );
  142. } else if (num == 3) {
  143. this.$set(
  144. this.data2[index],
  145. "istrueC",
  146. this.data2[index].istrueC == true ? false : true
  147. );
  148. }
  149. }
  150. },
  151. mounted() {
  152. this.$store.dispatch("GETSHOW", true);
  153. // 接收头部传过来的状态
  154. Bus.$on("show", data => {
  155. console.log("data", data);
  156. this.isShow = data;
  157. });
  158. this.$http
  159. .get(this.$ports.match.matchState, {
  160. game_code: this.gameCode,
  161. type_code: "StRollBall"
  162. })
  163. .then(res => {
  164. this.$store.dispatch("GETSHOW", false);
  165. if (res.status == 200 && res.data != [] && res.data != null) {
  166. this.list = res.data.data;
  167. console.log("list", this.list);
  168. Bus.$emit("val", this.name);
  169. } else {
  170. this.list = "";
  171. this.noData = true;
  172. }
  173. })
  174. .catch(res => {});
  175. }
  176. };
  177. </script>
  178. <style scoped>
  179. .box {
  180. padding: 0 0.32rem;
  181. height: 0.88rem;
  182. font-size: 0.28rem;
  183. background: #f4f4f4;
  184. }
  185. .mg {
  186. margin-bottom: 0.1rem;
  187. }
  188. .Match-title-num {
  189. width: 0.46rem;
  190. height: 0.46rem;
  191. align-items: center;
  192. justify-content: center;
  193. line-height: 0.46rem;
  194. text-align: center;
  195. background: #f76649;
  196. font-size: 0.2rem;
  197. border-radius: 50%;
  198. color: #f5f5f5;
  199. }
  200. .Match-box-top-right > span {
  201. width: 1.07rem;
  202. text-align: center;
  203. }
  204. .Match-box {
  205. padding: 0 0.32rem;
  206. }
  207. .name-box {
  208. height: 1.76rem;
  209. }
  210. .Match-box-top {
  211. height: 0.44rem;
  212. line-height: 0.44rem;
  213. border-bottom: 1px solid #e4e4e4;
  214. font-size: 0.23rem;
  215. }
  216. .Match-box-top-num {
  217. width: 0.64rem;
  218. height: 0.44rem;
  219. background: #ebebeb;
  220. font-size: 0.24rem;
  221. }
  222. .Match-box {
  223. margin-top: 0.12rem;
  224. background: #f8f8f8;
  225. }
  226. .Match-list-box {
  227. width: 35%;
  228. height: 1.76rem;
  229. flex-wrap: wrap;
  230. }
  231. .Match-list-box .match-list div {
  232. width: 1.07rem;
  233. height: 0.8rem;
  234. border: 2px solid #cecece;
  235. border-radius: 0.1rem;
  236. flex-wrap: wrap;
  237. }
  238. .active {
  239. background: #e4e4e4;
  240. }
  241. /* 1x2 */
  242. .top-box {
  243. height: 0.44rem;
  244. font-size: 0.24rem;
  245. background: #fff;
  246. border-bottom: 1px solid #e4e4e4;
  247. }
  248. .box-bottom {
  249. /* height: 2.9rem; */
  250. }
  251. .top-num {
  252. display: inline-block;
  253. width: 0.64rem;
  254. height: 0.44rem;
  255. line-height: 0.44rem;
  256. color: #000000;
  257. text-align: center;
  258. background: #ebebeb;
  259. font-size: 0.24rem;
  260. }
  261. .box {
  262. padding: 0 0.32rem;
  263. background: #fff;
  264. }
  265. .Match-title-num {
  266. width: 0.46rem;
  267. height: 0.46rem;
  268. line-height: 0.46rem;
  269. text-align: center;
  270. background: #f76649;
  271. font-size: 0.26rem;
  272. border-radius: 50%;
  273. color: #e4e4e4;
  274. }
  275. .haderBox {
  276. padding: 0 0.32rem;
  277. height: 0.88rem;
  278. font-size: 0.32rem;
  279. background: #f8f8f8;
  280. }
  281. .main-box {
  282. height: 0.9rem;
  283. background: #fff;
  284. font-size: 0.28rem;
  285. }
  286. .bottom-box {
  287. height: 1.1rem;
  288. background: #fff;
  289. font-size: 0.24rem;
  290. }
  291. .bottom-box div {
  292. width: 1.07rem;
  293. height: 0.76rem;
  294. border: 2px solid #cecece;
  295. border-radius: 0.1rem;
  296. font-size: 0.24rem;
  297. }
  298. .bottom-num {
  299. padding: 0.1rem;
  300. text-align: center;
  301. }
  302. .active {
  303. background: #f76649;
  304. border: 2px solid #f76649 !important;
  305. }
  306. .active > p {
  307. color: #e4e4e4 !important;
  308. }
  309. .num-box {
  310. width: 0.66rem;
  311. height: 0.34rem;
  312. background: #f76649;
  313. border-radius: 0.17rem;
  314. color: #f5f5f5 !important;
  315. line-height: 0.34rem;
  316. text-align: center;
  317. }
  318. .footBox {
  319. display: flex;
  320. flex-wrap: wrap;
  321. align-items: center;
  322. }
  323. .footBox .box {
  324. width: 33%;
  325. text-align: center;
  326. }
  327. </style>