613d4d9999228137b4c48b1eebda32b74fcab2b5.svn-base 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  1. <template>
  2. <div>
  3. <div class="header">
  4. <div class="title">
  5. <div @click="returnEvent()" class="row item-center">
  6. <i class="backSingPage"></i>
  7. <span class="header-title triangle">滚球{{title}}</span>
  8. <span style="color:#333;margin-left:.3rem;">{{data.leagueName}}</span>
  9. </div>
  10. <div>
  11. <i></i>
  12. <div class="redraw">
  13. <i class="refresh"></i>
  14. </div>
  15. </div>
  16. </div>
  17. <!-- 篮球头部 -->
  18. <div class="match">
  19. <div class="live">
  20. <!-- <div class="tit">{{data.leagueName}}</div> -->
  21. <div class="info">
  22. <div class="infoBody flex">
  23. <div class="matchTime" style="width:20%;">
  24. <span class="scene">第{{headInfo.schedule == 1 ? '一':
  25. headInfo.schedule == 2 ? '二': headInfo.schedule == 3 ? '三':
  26. headInfo.schedule == 4 ? '四':'加时赛' }}节</span>
  27. <span class="time">{{headInfo.r_time}}</span>
  28. </div>
  29. <div class="flex" style="width:80%;">
  30. <div class="right_info_row_qt">第一节</div>
  31. <div class="right_info_row_qt">第二节</div>
  32. <div class="right_info_row_qt">第三节</div>
  33. <div class="right_info_row_qt">第四节</div>
  34. <div class="right_info_row_qt">加时赛</div>
  35. <div class="right_info_row_qt scence">上半场</div>
  36. <div class="right_info_row_qt scence">下半场</div>
  37. <div class="right_info_row_qt scence">总计</div>
  38. </div>
  39. </div>
  40. <div class="infoRow">
  41. <div class="infoItem flex">
  42. <div style="width:20%;">
  43. <span class="team">{{data.home_team}}</span>
  44. </div>
  45. <div class="infoBox" style="width:80%">
  46. <div :class="{ col:headInfo.schedule == 1 }" class="infoNum">{{headInfo.sc_1th_H}}</div>
  47. <div :class="{ col:headInfo.schedule == 2 }" class="infoNum">{{headInfo.sc_2th_H}}</div>
  48. <div :class="{ col:headInfo.schedule == 3 }" class="infoNum">{{headInfo.sc_3th_H}}</div>
  49. <div :class="{ col:headInfo.schedule == 4 }" class="infoNum">{{headInfo.sc_4th_H}}</div>
  50. <div class="infoNum">{{headInfo.overtime_H}}</div>
  51. <div class="infoNum scenceNum">{{headInfo.half_H}}</div>
  52. <div class="infoNum scenceNum">{{headInfo.full_H}}</div>
  53. <div class="infoNum scenceNum">{{headInfo.whole_H}}</div>
  54. </div>
  55. </div>
  56. <div class="infoItem flex">
  57. <div style="width:20%;">
  58. <span class="team">{{data.guest_team}}</span>
  59. </div>
  60. <div class="infoBox" style="width:80%">
  61. <div :class="{ col:headInfo.schedule == 1 }" class="infoNum">{{headInfo.sc_1th_C}}</div>
  62. <div :class="{ col:headInfo.schedule == 2 }" class="infoNum">{{headInfo.sc_2th_C}}</div>
  63. <div :class="{ col:headInfo.schedule == 3 }" class="infoNum">{{headInfo.sc_3th_C}}</div>
  64. <div :class="{ col:headInfo.schedule == 4 }" class="infoNum ">{{headInfo.sc_4th_C}}</div>
  65. <div class="infoNum">{{headInfo.overtime_C}}</div>
  66. <div class="infoNum scenceNum">{{headInfo.half_C}}</div>
  67. <div class="infoNum scenceNum">{{headInfo.full_C}}</div>
  68. <div class="infoNum scenceNum">{{headInfo.whole_C}}</div>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. <div class="welcome row NavSlide">
  76. <nav class="scroll">
  77. <div class="row center" v-for="(itme,$index) in key" @click="toggleNav($index)">
  78. <span :class="{active:$index == active}">{{itme}}</span>
  79. </div>
  80. </nav>
  81. </div>
  82. </div>
  83. <div class="cont">
  84. <!-- <div class="letball"> -->
  85. <!-- 让球 -->
  86. <div v-show=" Single =='让球'|| Single =='让分'|| isAll">
  87. <concede/>
  88. </div>
  89. <!-- 进球:大/小 -->
  90. <div v-show=" Single =='进球:大/小'|| isAll">
  91. <goalsSize/>
  92. </div>
  93. <!-- 总分:大/小 -->
  94. <div v-show=" Single =='总分:大/小'|| isAll">
  95. <totalScore/>
  96. </div>
  97. <!-- <letBall/> -->
  98. <!-- 独赢 -->
  99. <div v-show=" Single =='独赢盘'|| isAll">
  100. <winAlone/>
  101. </div>
  102. <!-- 波胆 -->
  103. <div v-show=" Single =='波胆'|| isAll">
  104. <waveBladder/>
  105. </div>
  106. <!-- 总进球 -->
  107. <div v-show=" Single =='总进球数'|| isAll">
  108. <sumGoal/>
  109. </div>
  110. <!-- 首粒入球-- -->
  111. <div v-show=" Single =='球队得分:最后一位数'|| isAll">
  112. <teamLastScore/>
  113. </div>
  114. <!-- 半场/全场 -->
  115. <div v-show=" Single =='半场/全场'|| isAll">
  116. <halfCount/>
  117. </div>
  118. <!-- 总分:单双 -->
  119. <div v-show="( Single =='总分:单/双'|| Single =='进球:单/双' )|| isAll">
  120. <scoreSingleDouble/>
  121. </div>
  122. <!-- 球队进球数:大/小 篮球没有进球数-->
  123. <!-- <div v-show=" Single =='球队进球数:大/小'|| isAll">
  124. <teamGoalsSize/>
  125. </div> -->
  126. <!-- 球队得分:大/小 -->
  127. <div v-show=" Single =='球队得分:大/小'|| isAll">
  128. <teamTotalScoreSize/>
  129. </div>
  130. <!-- 角球 -->
  131. <!-- <corner/> -->
  132. <!-- 进球 -->
  133. <!-- <goal/> -->
  134. <!-- 进球半场 -->
  135. <!-- <goalHalfCourt/> -->
  136. <!-- 让盘 -->
  137. <!-- <letPlate/> -->
  138. <!-- 球队得分 -->
  139. <score/>
  140. </div>
  141. </div>
  142. </template>
  143. <script>
  144. import "@/css/index.css";
  145. // import letBall from "@/components/betting/letBall";
  146. import goalsSize from "@/components/betting/goalsSize";
  147. import teamGoalsSize from "@/components/betting/teamGoalsSize";
  148. import teamTotalScoreSize from "@/components/betting/teamTotalScoreSize";
  149. import scoreSingleDouble from "@/components/betting/scoreSingleDouble";
  150. import winAlone from "@/components/betting/winAlone";
  151. import sumGoal from "@/components/betting/sumGoal";
  152. import waveBladder from "@/components/betting/waveBladder";
  153. import teamLastScore from "@/components/betting/teamLastScore";
  154. // import corner from "@/components/betting/corner";
  155. import halfCount from "@/components/betting/halfCount";
  156. import concede from "@/components/betting/concede";
  157. // import goal from "@/components/betting/goal";
  158. // import goalHalfCourt from "@/components/betting/goalHalfCourt";
  159. // import letPlate from "@/components/betting/letPlate";
  160. import totalScore from "@/components/betting/totalScore";
  161. import score from "@/components/betting/score";
  162. export default {
  163. data() {
  164. return {
  165. activity: "", //活动代码
  166. active: 0, // 投注页是否打开
  167. ballCode: "", //球类代码
  168. matchId: "", //赛事idd
  169. data: [], //赛事数据源
  170. previousStorage: "", //前一次data储存数据
  171. title: "", //
  172. key: "", //玩法名字
  173. Single: "", //
  174. isAll: true, //
  175. timers: true,
  176. headInfo:'',//滚球头部数据
  177. };
  178. },
  179. components: {
  180. // letBall,
  181. goalsSize,
  182. winAlone,
  183. sumGoal,
  184. waveBladder,
  185. teamLastScore,
  186. // corner,
  187. halfCount,
  188. concede,
  189. // goal,
  190. // goalHalfCourt,
  191. // letPlate,
  192. totalScore,
  193. score,
  194. scoreSingleDouble,
  195. teamGoalsSize,
  196. teamTotalScoreSize
  197. },
  198. /**
  199. * 页面加载完成挂载
  200. */
  201. mounted() {
  202. this.activity = this.$store.getters.getActivity;
  203. this.ballCode = this.$store.getters.getBallCode;
  204. this.matchId = this.$store.getters.getMatchId;
  205. this.$store.dispatch("SET_BETTING", []); //设置默认值
  206. this.getAjax();
  207. this.gteTitle(this.ballCode, this.activity);
  208. this.$store.dispatch("SET_BETTINGTYPE", 1);
  209. let _this = this;
  210. this.$public.ajaxTimerFun(timing => {
  211. if (_this.timers) {
  212. _this.getAjax();
  213. } else {
  214. clearInterval(timing);
  215. }
  216. }, 10000);
  217. },
  218. beforeDestroy() {
  219. this.timers = false;
  220. },
  221. /***
  222. * 方法
  223. */
  224. methods: {
  225. /*------------------------------------------------ */
  226. //玩法数据请求
  227. getAjax() {
  228. let type = this.activity == "StRollBall" ? 2 : 1;
  229. let data = {
  230. game_code: this.ballCode,
  231. matchID: this.matchId,
  232. status: type,
  233. oddsType: this.activity
  234. };
  235. this.$http.get(this.$ports.gambling.matchOdds, data).then(res => {
  236. if (res.data.status == 1) {
  237. this.data = res.data.data;
  238. this.headInfo = JSON.parse(this.data.result_mark);
  239. this.headInfo.schedule = this.headInfo.schedule.replace(/[^0-9]/ig,"");
  240. let arrayData = [];
  241. let palyCode = this.$store.getters.getPlayAlias;
  242. let key = ["所有盘口"];
  243. this.data.p_code_array.forEach((e, index) => {
  244. let palyData = [];
  245. //组合玩法title
  246. palyCode.forEach(p => {
  247. if (e == p.odds_code && p.game_code == this.ballCode) {
  248. key.push(p.odds_name);
  249. }
  250. });
  251. //玩法数据分类
  252. this.data.oddsData.forEach(val => {
  253. if (e == val.p_code) {
  254. palyData.push(val);
  255. }
  256. arrayData[index] = palyData;
  257. });
  258. });
  259. // console.log(arrayData);
  260. //更新数据和上一次的数据匹配
  261. if (
  262. this.previousStorage &&
  263. this.previousStorage.match_id == this.data.match_id &&
  264. this.previousStorage.oddsData.length > 0
  265. ) {
  266. this.$public.oddsDataUpdate(
  267. arrayData,
  268. this.previousStorage.oddsData,
  269. 2
  270. );
  271. }
  272. this.data.oddsData = arrayData;
  273. //储存临时数据
  274. this.previousStorage = this.data;
  275. //rising=上升、falling=下降
  276. this.$store.dispatch("GETGAMERATIO", this.data);
  277. this.key = key;
  278. // console.log(key);
  279. //console.log(arrayData);
  280. }
  281. });
  282. },
  283. /*---------------------------------------------- */
  284. //获取头部title数据
  285. gteTitle(data, type) {
  286. if (data == "zq") {
  287. this.title = "足球";
  288. } else if (data == "lq") {
  289. this.title = "蓝球";
  290. } else if (data == "wq") {
  291. this.title = "网球";
  292. } else if (data == "bq") {
  293. this.title = "棒球";
  294. }
  295. },
  296. /*--------------------------------------------- */
  297. /**
  298. * 切换玩法类型
  299. */
  300. toggleNav: function(index) {
  301. this.active = index;
  302. if (this.key[index] == "所有盘口") {
  303. this.isAll = true;
  304. } else {
  305. this.isAll = false;
  306. this.Single = this.key[index];
  307. }
  308. },
  309. /*--------------------------------------------- */
  310. /**
  311. * 切换玩法类型
  312. */
  313. returnEvent: function() {
  314. this.$store.dispatch("SET_CONTROLROUTING", "10001");
  315. // this.$store.dispatch("SET_RETURN_EVENT",1);
  316. //console.log(this.$store.getters.getReturnEvent);
  317. }
  318. },
  319. /**
  320. * 计算属性
  321. */
  322. computed: {},
  323. /**
  324. * 监听器
  325. */
  326. watch: {}
  327. };
  328. </script>
  329. <style scoped>
  330. .header {
  331. background: #4b4b4b;
  332. }
  333. .header .title {
  334. font-size: 0.18rem;
  335. /* color: #f76649; */
  336. padding: 0 0.2rem;
  337. /* font-weight: 700; */
  338. height: 0.6rem;
  339. line-height: 0.4rem;
  340. display: flex;
  341. justify-content: space-between;
  342. align-items: center;
  343. }
  344. .header-title {
  345. display: inline-block;
  346. padding: 0 0.1rem;
  347. height: 0.4rem;
  348. text-align: center;
  349. line-height: 0.4rem;
  350. background: #ededed;
  351. color: #f4755b;
  352. border-radius: 0.05rem;
  353. }
  354. .header-title::after {
  355. border-width: 0.08rem;
  356. border-left-color: #ededed;
  357. border-top-color: #ededed;
  358. transform: rotate(135deg);
  359. /* right: -12%; */
  360. top: 28%;
  361. }
  362. .title .backSingPage {
  363. display: inline-block;
  364. background: url("../assets/st-imges/returnimg.png") no-repeat;
  365. /* filter: brightness(2); */
  366. background-size: 100% 100%;
  367. height: 0.28rem;
  368. width: 0.28rem;
  369. vertical-align: middle;
  370. margin-right: 0.16rem;
  371. cursor: pointer;
  372. }
  373. .title {
  374. background: #ababab;
  375. color: #333;
  376. }
  377. .title .backSingPage:hover,
  378. .refresh:hover {
  379. filter: brightness(2);
  380. }
  381. .redraw {
  382. width: 0.3rem;
  383. height: 0.3rem;
  384. background: #666;
  385. cursor: pointer;
  386. text-align: center;
  387. border-radius: 0.05rem;
  388. }
  389. .redraw:hover {
  390. background: #959595;
  391. color: #fff;
  392. }
  393. .refresh {
  394. background: url("../assets/st-imges/redraw.png") no-repeat;
  395. background-size: 100% 100%;
  396. display: inline-block;
  397. width: 0.2rem;
  398. height: 0.2rem;
  399. }
  400. /* 普通赛事头部 */
  401. .ordinaryHead {
  402. background: url("../assets/st-imges/football.png") no-repeat;
  403. background-size: 100% 100%;
  404. /* padding: 0.04rem; */
  405. height: 0.6rem;
  406. line-height: 0.6rem;
  407. }
  408. .ordinaryHead .match {
  409. color: #fff;
  410. }
  411. .ordinaryHead .match .info {
  412. padding: 0 0.2rem;
  413. display: flex;
  414. justify-content: space-between;
  415. align-items: center;
  416. }
  417. .match .time {
  418. font-weight: 400;
  419. color: #bd4700;
  420. margin-left: 0.05rem;
  421. }
  422. .live-score {
  423. padding: 0 8%;
  424. }
  425. .NavSlide {
  426. width: 100%;
  427. overflow: hidden;
  428. font-size: 0.16rem;
  429. height: 0.4rem;
  430. background: #898989;
  431. color: #cdcdcd;
  432. }
  433. .NavSlide nav {
  434. display: -webkit-box;
  435. display: -ms-flexbox;
  436. display: flex;
  437. -webkit-box-align: middle;
  438. -ms-flex-align: middle;
  439. align-items: middle;
  440. overflow: auto;
  441. }
  442. .NavSlide div {
  443. text-align: center;
  444. /* font-size: 0.28rem; */
  445. -ms-flex-negative: 0;
  446. flex-shrink: 0;
  447. padding: 0 0.1rem;
  448. color: #fff;
  449. cursor: pointer;
  450. }
  451. /* #NavSlide p a{
  452. color: #E5E5E5;
  453. text-decoration: none;
  454. } */
  455. .active {
  456. color: #f76649;
  457. font-weight: 700;
  458. }
  459. .scroll::-webkit-scrollbar {
  460. width: 0;
  461. height: 0;
  462. }
  463. /* 棒球头部 */
  464. .bqHead {
  465. background: url("../assets/st-imges/baseball.png") no-repeat;
  466. background-size: 100% 100%;
  467. font-size: 0.18rem;
  468. }
  469. .zqHead {
  470. color: #fff;
  471. background: url("../assets/st-imges/football.png") no-repeat;
  472. background-size: 100% 100%;
  473. font-size: 0.18rem;
  474. }
  475. .bqHead .pd-10 {
  476. padding: 0.1rem;
  477. }
  478. .bqHead .tit {
  479. display: flex;
  480. align-items: center;
  481. justify-content: space-between;
  482. }
  483. .match .info {
  484. background: rgba(0, 0, 0, 0.5);
  485. height: 0.52rem;
  486. line-height: 0.52rem;
  487. font-size: 15px;
  488. text-align: center;
  489. font-size: 0.18rem;
  490. }
  491. .match .info .pk,
  492. .match .tit .scene {
  493. font-weight: bold;
  494. color: rgb(254, 146, 0);
  495. }
  496. .tit .time {
  497. color: #bd4700;
  498. }
  499. .welcome {
  500. height: 0.36rem;
  501. line-height: 0.36rem;
  502. font-size: 0.16rem;
  503. padding: 0 0.1rem;
  504. background: #4e4e4e;
  505. color: black;
  506. }
  507. .flex{
  508. display: flex;
  509. justify-content: space-between;
  510. align-items: center;
  511. }
  512. .header{
  513. background: #4b4b4b;
  514. }
  515. .header .title{
  516. font-size: 0.18rem;
  517. color: #fe9200;
  518. padding: 0 0.2rem;
  519. font-weight: 700;
  520. display: flex;
  521. justify-content: space-between;
  522. align-items: center;
  523. }
  524. .title .backSingPage{
  525. display:inline-block;
  526. background: url("../assets/st-imges/arrow_left.png") no-repeat;
  527. background-size: 100% 100%;
  528. height: 0.21rem;
  529. width: 0.2rem;
  530. vertical-align: middle;
  531. margin-right: 0.16rem;
  532. cursor: pointer;
  533. }
  534. .title .backSingPage:hover,.refresh:hover{
  535. filter: brightness(100);
  536. }
  537. .redraw{
  538. width: 0.3rem;
  539. height: 0.3rem;
  540. background: #666;
  541. cursor: pointer;
  542. text-align: center;
  543. border-radius: 0.05rem;
  544. }
  545. .redraw:hover{
  546. background: #959595;
  547. color: #fff;
  548. }
  549. .refresh{
  550. background: url("../assets/st-imges/redraw.png") no-repeat;
  551. background-size: 100% 100%;
  552. display: inline-block;
  553. width: 0.2rem;
  554. height: 0.2rem;
  555. }
  556. /* 篮球头部 */
  557. .header .match{
  558. background: #c28d47;
  559. background-image: url("./../assets/st-imges/basketball.png") no-repeat;
  560. background-size: 100% 100%;
  561. color: #fff;
  562. }
  563. .header .match .live{
  564. padding: 0.06rem;
  565. }
  566. /* .live .tit{
  567. height: 30px;
  568. line-height: 30px;
  569. font-size: 0.14rem;
  570. } */
  571. .match .info{
  572. margin-top: 0.1rem;
  573. position: relative;
  574. height: auto;
  575. background: rgba(0,0,0,.5);
  576. line-height: 52px;
  577. font-size: 15px;
  578. text-align: center;
  579. }
  580. .infoBody{
  581. background: #000;
  582. opacity: .85;
  583. height: 0.52rem;
  584. padding-left: 0.1rem;
  585. font-size: 0.14rem;
  586. }
  587. .matchTime span{
  588. display: inline-block;
  589. }
  590. .matchTime .scene{
  591. color: #ff9200;
  592. margin-right: 0.06rem;
  593. }
  594. .matchTime .time{
  595. color: #b4b4b4;
  596. }
  597. .right_info_row_qt{
  598. width: 0.75rem;
  599. font-size: 0.12rem;
  600. text-align: center;
  601. padding: 0.04rem;
  602. color: #787878;
  603. box-sizing: border-box;
  604. font-weight: 700;
  605. font-family: serif;
  606. }
  607. .infoRow{
  608. padding-left: 0.1rem;
  609. }
  610. .scence{
  611. width: 0.75rem;
  612. padding: 0;
  613. /* padding-top: 0.19rem; */
  614. }
  615. .infoItem{
  616. height: 0.5rem;
  617. line-height: 0.24rem;
  618. width: auto
  619. }
  620. .infoBox{
  621. width: 2.73rem;
  622. height:0.5rem;
  623. display: flex;
  624. align-items: center;
  625. justify-content: space-between;
  626. /* right: 0; */
  627. /* position: absolute; */
  628. }
  629. .infoBox > div{
  630. width: .75rem;
  631. }
  632. .infoNum{
  633. width: 0.25rem;
  634. font-size: 0.13rem;
  635. line-height: 0.28rem;
  636. padding: 0;
  637. height: 100%;
  638. line-height: 0.5rem;
  639. color: #fff;
  640. font-weight: 400;
  641. text-align: center;
  642. font-family: sans-serif;
  643. }
  644. .scenceNum{
  645. background: hsla(0,0%,100%,.16);
  646. width: 0.52rem;
  647. margin-left: 1px;
  648. }
  649. .infoItem .team{
  650. font-size: 0.16rem;
  651. }
  652. .col{
  653. color: #ff9200;
  654. }
  655. .ycol{
  656. color:#dcbc4c;
  657. }
  658. </style>