708c2d33f795299c5cd26dffebe1fe18e3c01205.svn-base 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027
  1. <template>
  2. <div>
  3. <div v-if="noData">
  4. <NotOpend :title="this.info"/>
  5. </div>
  6. <!-- 让球&大小 -->
  7. <div class="match" v-if="isShow && wq_show">
  8. <div v-for="(items,$index) in letBallData" :key="items.id" class="mg">
  9. <!-- <div v-for="items in list[index]" :key="items.id"> -->
  10. <div class="row allAlignment haderBox center">
  11. <span>{{items.leagueName}}</span>
  12. <div class="row Match-title-num">
  13. <span>{{items.matchNum}}</span>
  14. </div>
  15. </div>
  16. <div class="Match-box">
  17. <div v-for="(itemList,index) in items.matchData" :key="index" @click="matchInfo(itemList.match_id)">
  18. <div class="row allAlignment Match-box-top">
  19. <div class="Match-box-top-left">
  20. <span>{{itemList.match_process}}</span>
  21. <span class="texttop" v-if="activity == 'StRollBall'">{{itemList.a_time}}</span>
  22. <span class="texttop" v-if="activity == 'StSoon'">{{itemList.wait_time}}分钟</span>
  23. </div>
  24. <div class="Match-box-top-right row">
  25. <span style="margin-right: .1rem;" class="Match-box-top-num">{{itemList.tag}}</span>
  26. <span style="margin-right: .1rem;">让球</span>
  27. <span style="margin-right: .1rem;">大小</span>
  28. </div>
  29. </div>
  30. <div class="row allAlignment center listbox">
  31. <div class="column average name-box">
  32. <div class="box noBox row item-center main-box">
  33. <span
  34. v-if="itemList.home_score == '0' || itemList.home_score"
  35. class="num-box"
  36. style="color:#eb921e"
  37. >{{itemList.home_score}}</span>
  38. <span v-else style="color:#eb921e">{{itemList.home_score}}</span>
  39. &nbsp;&nbsp;{{itemList.home_team}}
  40. </div>
  41. <div class="box noBox row item-center main-box">
  42. <span
  43. v-if="itemList.guest_score || itemList.guest_score == '0'"
  44. class="num-box"
  45. style="color:#eb921e"
  46. >{{itemList.guest_score}}</span>
  47. <span v-else style="color:#eb921e">{{itemList.guest_score}}</span>
  48. &nbsp;&nbsp;{{itemList.guest_team}}
  49. </div>
  50. </div>
  51. <div class="Match-list-box row item-center average">
  52. <!-- <div v-for="(odds,i) in itemList.oddsData[0]" :key="odds.id" class="match-list">
  53. <div
  54. @click.stop="isclick(index,i)"
  55. class="column center"
  56. :class="items.istrue == i ?'active':''"
  57. >
  58. <span style="color:#FD8F26">{{odds.condition}}</span>
  59. <span>{{odds.odds}}</span>
  60. </div>
  61. </div>-->
  62. <div class="Match-bottom-right">
  63. <!-- 主队 -->
  64. <div class="row">
  65. <div
  66. class="Match-list-left"
  67. v-for="(items,indexs) in itemList.oddsData[0].homeOdds"
  68. :key="indexs"
  69. @click.stop="isBetting($index,itemList.match_id,items.id,itemList.home_team,itemList.guest_team,itemList.home_team,items.odds,items.condition,items.odds_only,items.odds_code,'homeOdds',items.p_code,items.status)"
  70. >
  71. <div :class="items.isTrue ? 'active' : ''" class="column center">
  72. <span style="color:#f76649">{{items.condition}}</span>
  73. <span>{{items.odds}}</span>
  74. </div>
  75. </div>
  76. </div>
  77. <!-- 客队 -->
  78. <div class="row">
  79. <div
  80. class="Match-list-right row"
  81. v-for="(items,indexs) in itemList.oddsData[0].guestOdds"
  82. :key="indexs"
  83. @click.stop="isBetting($index,itemList.match_id,items.id,itemList.home_team,itemList.guest_team,itemList.guest_team,items.odds,items.condition,items.odds_only,items.odds_code,'guestOdds',items.p_code,items.status)"
  84. >
  85. <div :class="items.isTrue ? 'active' : ''" class="column center">
  86. <span>
  87. <i style="color:#f76649">{{items.condition}}</i>
  88. </span>
  89. <span>{{items.odds}}</span>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. <!-- 1x2 -->
  101. <div v-if="!isShow && !ishow && wq_show">
  102. <div v-for="(item,index) in letBallData" :key="item.id" @click="bettingChange()">
  103. <div class="row allAlignment haderBox center">
  104. <span>{{item.leagueName}}</span>
  105. <div class="Match-title-num">
  106. <span>{{item.matchNum}}</span>
  107. </div>
  108. </div>
  109. <div
  110. v-for="(itemList,$index) in item.matchData"
  111. :key="itemList.id"
  112. @click="matchInfo(itemList.match_id)"
  113. >
  114. <div class="box noPd">
  115. <div class="row allAlignment item-center top-box">
  116. <span>
  117. <i>{{itemList.match_process}}</i>
  118. <span class="texttop" v-if="activity == 'StRollBall'">{{itemList.a_time}}</span>
  119. <span class="texttop" v-if="activity == 'StSoon'">{{itemList.wait_time}}分钟</span>
  120. <!-- <b style="color:#F76649;font-weight: normal;">{{itemList.a_time}}</b> -->
  121. </span>
  122. <span class="top-num">{{itemList.tag}}</span>
  123. </div>
  124. </div>
  125. <div class="box-bottom">
  126. <div class="box row item-center main-box">
  127. <span
  128. v-if="itemList.home_score == '0' || itemList.home_score"
  129. class="num-box"
  130. style="color:#eb921e"
  131. >{{itemList.home_score}}</span>
  132. <span v-else style="color:#eb921e">{{itemList.home_score}}</span>
  133. &nbsp;&nbsp;{{itemList.home_team}}
  134. </div>
  135. <div class="box row item-center main-box">
  136. <span
  137. v-if="itemList.guest_score || itemList.guest_score == '0'"
  138. class="num-box"
  139. style="color:#eb921e"
  140. >{{itemList.guest_score}}</span>
  141. <span v-else style="color:#eb921e">{{itemList.guest_score}}</span>
  142. &nbsp;&nbsp;{{itemList.guest_team}}
  143. </div>
  144. <div class="footBox">
  145. <div
  146. class="box row allAlignment bottom-box center"
  147. v-for="(odds,idx) in itemList.oddsData[1]"
  148. :key="odds.id"
  149. >
  150. <div
  151. class="item-center bottom-num"
  152. :class="item.istrueA==true?'active':''"
  153. @click.stop="isClick(idx,1)"
  154. >
  155. <p style="color:#eb921e">{{odds.condition}}</p>
  156. <p>{{odds.odds}}</p>
  157. </div>
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. <!-- 独赢盘 -->
  165. <div class="match" v-if="!isShow && ishow && wq_show">
  166. <div v-for="(items,index) in letBallData" :key="items.id" class="mg">
  167. <!-- <div v-for="items in list[index]" :key="items.id"> -->
  168. <div class="row allAlignment letBallBox center">
  169. <span>{{items.leagueName}}</span>
  170. <div class="row Match-title-num">
  171. <span>{{items.matchNum}}</span>
  172. </div>
  173. </div>
  174. <div class="Match-box">
  175. <div
  176. v-for="(itemList,index) in items.matchData"
  177. :key="itemList.id"
  178. class="Match-box"
  179. @click="matchInfo(itemList.match_id)"
  180. >
  181. <div class="row allAlignment Match-box-top">
  182. <div class="Match-box-top-left">
  183. <!-- <span>{{itemList.match_date}}</span>
  184. <span class="texttop">{{itemList.match_time}}</span> -->
  185. <span class="texttop" v-if="activity == 'StRollBall'">{{itemList.a_time}}</span>
  186. <span class="texttop" v-if="activity == 'StSoon'">{{itemList.wait_time}}分钟</span>
  187. </div>
  188. <div class="Match-box-top-right row">
  189. <span style="margin-right: .1rem;" class="Match-box-top-num">{{itemList.tag}}</span>
  190. <!-- <span style="margin-right: .1rem;">让球</span> -->
  191. <span style="margin-right: .1rem;">独赢盘</span>
  192. </div>
  193. </div>
  194. <div class="row allAlignment center listbox">
  195. <div class="column average name-box">
  196. <div>{{itemList.home_team}}</div>
  197. <div>{{itemList.guest_team}}</div>
  198. </div>
  199. <div class="Match-list-box row item-center average">
  200. <div v-for="(odds,i) in itemList.oddsData[0]" :key="odds.id" class="match-list">
  201. <div
  202. @click.stop="isclick(index,i)"
  203. class="column center"
  204. :class="items.istrue==i?'active':''"
  205. >
  206. <span style="color:#FD8F26">{{odds.condition}}</span>
  207. <span>{{odds.odds}}</span>
  208. </div>
  209. </div>
  210. </div>
  211. </div>
  212. </div>
  213. </div>
  214. </div>
  215. </div>
  216. <!-- 如过是网球则显示 -->
  217. <div class="match" v-if="isShow && !wq_show">
  218. <div v-for="(items,index) in letBallData" :key="items.id" class="mg">
  219. <!-- <div v-for="items in list[index]" :key="items.id"> -->
  220. <div class="row allAlignment letBallBox center">
  221. <span>{{items.leagueName}}</span>
  222. <div class="row Match-title-num">
  223. <span>{{items.matchNum}}</span>
  224. </div>
  225. </div>
  226. <div class="Match-box">
  227. <div
  228. v-for="(itemList,index) in items.matchData"
  229. :key="itemList.id"
  230. class="Match-box"
  231. @click="matchInfo(itemList.match_id)"
  232. >
  233. <div class="row allAlignment Match-box-top">
  234. <div class="Match-box-top-left">
  235. <!-- <span>{{itemList.match_date}}</span> -->
  236. <!-- <span class="texttop">{{itemList.wait_time}}分钟</span> -->
  237. <span class="texttop" v-if="activity == 'StRollBall'">{{itemList.a_time}}</span>
  238. <span class="texttop" v-if="activity == 'StSoon'">{{itemList.wait_time}}分钟</span>
  239. </div>
  240. <div class="Match-box-top-right row">
  241. <span style="margin-right: .1rem;" class="Match-box-top-num">{{itemList.tag}}</span>
  242. <span style="margin-right: .1rem;">独赢盘</span>
  243. <span style="margin-right: .1rem;">让盘</span>
  244. </div>
  245. </div>
  246. <div class="row allAlignment center listbox">
  247. <div class="column average name-box">
  248. <div>{{itemList.home_team}}</div>
  249. <div>{{itemList.guest_team}}</div>
  250. </div>
  251. <div class="Match-list-box row item-center average">
  252. <div v-for="(odds,i) in itemList.oddsData[0]" :key="odds.id" class="match-list">
  253. <div
  254. @click.stop="isclick(index,i)"
  255. class="column center"
  256. :class="items.istrue ? 'active':''"
  257. >
  258. <span style="color:#FD8F26">{{odds.condition}}</span>
  259. <span>{{odds.odds}}</span>
  260. </div>
  261. </div>
  262. </div>
  263. </div>
  264. </div>
  265. </div>
  266. </div>
  267. </div>
  268. <div v-if="isBettingWindow == '100'">
  269. <BettingWindow/>
  270. </div>
  271. </div>
  272. </template>
  273. <script>
  274. import Bus from "../assets/bus.js";
  275. import NotOpend from "@/components/StNotOpend";
  276. import BettingWindow from "@/components/StBettingWindow";
  277. export default {
  278. props: ["gameCode", "name", "ishow"],
  279. components: { NotOpend, BettingWindow },
  280. data() {
  281. return {
  282. show: false, //暂时状态
  283. isShow: true,
  284. noData: true, //显示暂无数据
  285. wq_show: true, //是否为棒球与网球,是则不显示
  286. info: "没有相关比赛信息",
  287. status: false,
  288. isBettingWindow: -1, //投注组件隐藏
  289. isAjax: false, //开关
  290. list: [],
  291. letBallData: [], //让球大小和1X2数据
  292. timers: true,
  293. activity:'',
  294. betting: 10000, //vuex里面玩法投注数据
  295. thisNum: 10000, //vuex里面
  296. index: '',//
  297. data:'',//玩法赔率数据源
  298. };
  299. },
  300. /**
  301. * 函数方法
  302. */
  303. methods: {
  304. matchInfo(id) {
  305. this.$router.push({
  306. path: "/StRollBallBettingPage",
  307. query: {
  308. gameCode: this.$store.getters.getBallId,
  309. number: 1,
  310. home: true,
  311. name:this.name
  312. }
  313. });
  314. this.$store.dispatch("MACTH_ID", id);
  315. },
  316. //打开联赛投注页面
  317. goMatchInfo: function() {
  318. // this.$store.dispatch("GETSHOW", true);
  319. Bus.$on("show", data => {
  320. this.isShow = data;
  321. });
  322. },
  323. getAjax: function(game_code, type_code) {
  324. this.$store.dispatch("GETSHOW", true);
  325. if (!game_code || !type_code) return false;
  326. this.$http .get(this.$ports.match.matchState, { game_code,type_code}).then(res => {
  327. //console.log('数据结构',res.data.data);
  328. this.isAjax = true;
  329. if ( res.data.status == 1 &&res.data.data.length > 0 &&res.data != null) {
  330. this.letBallData = res.data.data;
  331. this.noData = false;
  332. //让球大小组合
  333. for (var i = 0; i < res.data.data.length; i++) {
  334. this.dataGroup(res.data.data[i], i);
  335. }
  336. //console.log(this.letBallData);
  337. //滚球比赛时间倒计时
  338. if(this.activity == 'StRollBall'){
  339. let _this = this;
  340. _this.letBallData.forEach(val => {
  341. val.matchData.forEach(e =>{
  342. let [f, s] = e.a_time.split(":");
  343. if (e.a_time != "") {
  344. let [f, s] = e.a_time.split(":");
  345. this.$public.timer(f, s, function(f, s) {
  346. e.a_time = f + ":" + s;
  347. });
  348. }
  349. })
  350. });
  351. }
  352. //console.log('letBallData',this.letBallData)
  353. } else {
  354. // 是否显示组件
  355. this.noData = true;
  356. //console.log('data',this.noData)
  357. // 每次更新数据没有数据时则置空。
  358. this.letBallData = [];
  359. }
  360. // 状态值数据更改
  361. // let _this = this;
  362. // setTimeout(function(){
  363. this.$store.dispatch('GETSHOW',false);
  364. // },500)
  365. });
  366. },
  367. /*--------------------------------------------------------------------------------*/
  368. // 添加、删除vuex投注数据公共方法
  369. AddDelete: function(array,$index,type) {
  370. let bettingInfo = array;
  371. let isAdd = true;
  372. let matchList = this.$store.getters.getBetting;
  373. if (this.thisNum != 10000) {
  374. //删除vuex投注数据
  375. matchList[this.thisNum].data.forEach((res, index) => {
  376. if (res.id == array.id) {
  377. matchList[this.thisNum].data.splice(index, 1);
  378. // this.$store.dispatch("ISBETTING",false);
  379. this.$store.dispatch("SET_LIMIT", false);
  380. this.$store.dispatch("BETTING", []);
  381. this.$store.dispatch("BETTING", matchList);
  382. isAdd = false;
  383. //处理当前页面样式
  384. this.modifyStyle($index,array.id, type);
  385. }
  386. });
  387. //添加vuex投注数据
  388. if (isAdd) {
  389. if(this.$store.getters.getLimit * 1 >= 10)return false;
  390. //处理当前页面样式
  391. this.modifyStyle($index,array.id, type);
  392. matchList[this.thisNum].data.push(bettingInfo);
  393. this.$store.dispatch("BETTING", []);
  394. this.$store.dispatch("BETTING", matchList);
  395. }
  396. } else {
  397. //添加新的玩法赔率数据
  398. let obj = {
  399. title: "concede_size",
  400. data: [bettingInfo]
  401. };
  402. //判断vuex有误其它玩法数据
  403. if (matchList) {
  404. matchList.push(obj);
  405. } else {
  406. //处理当前页面样式
  407. this.$store.dispatch("BETTING", [obj]);
  408. }
  409. this.modifyStyle($index,array.id, type);
  410. }
  411. if (this.$store.getters.getIsBetting == '100') return false;
  412. this.$store.dispatch("ISBETTING", '100');
  413. },
  414. /*--------------------------------------------------------------------------------*/
  415. //修改当前页面样式公共方法
  416. modifyStyle: function($index,id, type) {
  417. this.letBallData[$index].matchData.every((e,i )=> {
  418. let ret = false;
  419. if (type == "homeOdds") {
  420. e.oddsData[0].homeOdds.every((res, index) => {
  421. if (res.id == id) {
  422. this.$forceUpdate();
  423. this.$set(res,"isTrue",res.isTrue ? false : true);
  424. ret = true;
  425. return false;
  426. }
  427. return true;
  428. });
  429. } else if (type == "guestOdds") {
  430. e.oddsData[0].guestOdds.every((res, index) => {
  431. if (res.id == id) {
  432. this.$forceUpdate();
  433. this.$set(
  434. this.letBallData[$index].matchData[i].oddsData[0].guestOdds[index],
  435. "isTrue",
  436. res.isTrue ? false : true
  437. );
  438. ret = true;
  439. return false;
  440. }
  441. return true;
  442. });
  443. }
  444. if (ret) {
  445. return false;
  446. } else {
  447. return true;
  448. }
  449. });
  450. },
  451. /*--------------------------------------------------------------------------------*/
  452. // 修改投注样式
  453. isBetting($index,match_id,id, home, guest, name, odds, condition, odds_only,odds_code,type,p_code,status) {
  454. if(status == '-1') return false;
  455. let bettingInfo = {
  456. id,
  457. home_team: home,
  458. guest_team: guest,
  459. name,
  460. odds,
  461. match_id,
  462. condition,
  463. ballId:this.$store.getters.getBallId,
  464. odds_code: odds_code,
  465. p_code:p_code,
  466. play_name: odds_code =='concede_home' || odds_code =='concede_guest' ? '让球' : '大小',
  467. score: this.score,
  468. bettingTime: "",
  469. odds_only
  470. };
  471. this.AddDelete(bettingInfo,$index,type);
  472. if (this.$store.getters.getLimit * 1 >= 10) {
  473. this.$dialog.alert({ mes: "你的注单已达到上限啦!" });
  474. }
  475. },
  476. /*--------------------------------------------- */
  477. //让球大小数据组合
  478. dataGroup:function(data, i) {
  479. let homeOdds = [],
  480. guestOdds = [];
  481. let A, B, C, D;
  482. data.matchData.forEach((column, index) => {
  483. if (column.oddsData[0] == null || column.oddsData[0].length == 0) {
  484. column.oddsData[0] = {
  485. homeOdds: [{ status: -1 }, { status: -1 }],
  486. guestOdds: [{ status: -1 }, { status: -1 }]
  487. };
  488. } else {
  489. column.oddsData[0].forEach(val => {
  490. if (this.betting != 10000) {
  491. this.betting.forEach(e => {
  492. if (val.id == e.id) {
  493. val.isTrue = true;
  494. //this.$set(val,'isTrue',true);
  495. }
  496. });
  497. }
  498. //console.log('odds_code',val.odds_code)
  499. if (val.odds_code == "concede_home") {
  500. A = val;
  501. } else if (val.odds_code == "size_home") {
  502. B = val;
  503. } else if (val.odds_code == "concede_guest") {
  504. C = val;
  505. } else if (val.odds_code == "size_guest") {
  506. D = val;
  507. }
  508. });
  509. column.oddsData[0] = {};
  510. column.oddsData[0].homeOdds = [];
  511. column.oddsData[0].homeOdds.push(A);
  512. column.oddsData[0].homeOdds.push(B);
  513. column.oddsData[0].guestOdds = [];
  514. column.oddsData[0].guestOdds.push(C);
  515. column.oddsData[0].guestOdds.push(D);
  516. }
  517. });
  518. },
  519. /*---------------------------------------------*/
  520. //
  521. isClick() {
  522. if (this.$store.getters.getIsBetting == true) {
  523. return false;
  524. }
  525. this.$store.dispatch("ISBETTING", true);
  526. // this.$set(this.letBallData.matchData[1].oddsData[1][i], "istrue", (this.letBallData.list[i].istrue = num));
  527. },
  528. /*---------------------------------------------*/
  529. //
  530. bettingChange() {
  531. //this.isBettingWindow = '100';
  532. },
  533. /*---------------------------------------------*/
  534. // 点击事件确认选中
  535. isclick(index, num) {
  536. console.log(this.letBallData);
  537. if (this.$store.getters.getIsBetting == true) {
  538. return false;
  539. }
  540. this.$store.dispatch("ISBETTING", true);
  541. }
  542. },
  543. /**
  544. * 计算属性
  545. */
  546. computed: {
  547. // 监听vuex状态值的改变
  548. getInfo: function() {
  549. return {
  550. game_code: this.$store.getters.getBallId,
  551. type_code: this.$store.getters.getActivity
  552. };
  553. },
  554. getIsBetting: function() {
  555. return this.$store.getters.getIsBetting;
  556. },
  557. // // 获取滚动状态
  558. // getscorllcode() {
  559. // return this.$public.getCache("box_size");
  560. // },
  561. getBetting() {
  562. return this.$store.getters.getBetting;
  563. },
  564. //获取投注框删除的投注信息
  565. getDeleteType() {
  566. return this.$store.getters.getDeleteType;
  567. },
  568. getActivity:function(){
  569. return this.$store.getters.getActivity;
  570. }
  571. },
  572. watch: {
  573. getActivity(val){
  574. this.activity = val;
  575. },
  576. /*--------------------------------- */
  577. getInfo(obj) {
  578. let getActivity = this.$store.getters.getActivity
  579. this.goMatchInfo();
  580. if ( getActivity == "StSoon" || getActivity == "StRollBall") {
  581. if (this.isAjax) {
  582. this.getAjax(obj.game_code, obj.type_code);
  583. }
  584. }
  585. if (obj.game_code == "wq") {
  586. //this.rShow = false;
  587. this.wq_show = false;
  588. } else {
  589. //this.rShow = true;
  590. this.wq_show = true;
  591. }
  592. },
  593. /*-------------------------------------*/
  594. // 监听投注框开关
  595. getIsBetting(val) {
  596. this.isBettingWindow = val;
  597. },
  598. // // 监听滚动状态变化赋值滚动
  599. // getscorllcode(val) {
  600. // this.scorll = val;
  601. // },
  602. getDeleteType(val) {
  603. let flag = true;
  604. // 下标问题
  605. console.log('matchData',this.letBallData)
  606. this.letBallData.forEach((item,index) => {
  607. console.log('item',item)
  608. item.matchData.forEach(e =>{
  609. if (val == "all") {
  610. e.oddsData[0].guestOdds.forEach(data => {
  611. this.$set(data, "isTrue", false);
  612. });
  613. e.oddsData[0].homeOdds.forEach(data => {
  614. this.$set(data, "isTrue", false);
  615. });
  616. } else {
  617. let showData = true;
  618. e.oddsData[0].guestOdds.forEach(data => {
  619. if (data.id == val) {
  620. this.$set(data, "isTrue", false);
  621. showData = false;
  622. }
  623. });
  624. if (showData) {
  625. e.oddsData[0].homeOdds.forEach(data => {
  626. if (data.id == val) {
  627. this.$set(data, "isTrue", false);
  628. }
  629. });
  630. }
  631. }
  632. })
  633. });
  634. },
  635. /*--------------------------------------------------------------------------------*/
  636. //获取已投注信息
  637. getBetting(val) {
  638. //获取vuex玩法已投注相对应的数据
  639. if (val) {
  640. val.forEach((e, index) => {
  641. if ("concede_size" == e.title) {
  642. this.thisNum = index;
  643. this.betting = e.data;
  644. }
  645. });
  646. }
  647. },
  648. /*--------------------------------------------------------------------------------*/
  649. },
  650. mounted() {
  651. // 调用bus传值
  652. this.goMatchInfo();
  653. console.log('ssa',123);
  654. this.activity = this.$store.getters.getActivity;
  655. let _this = this;
  656. let getters = this.$store.getters;
  657. // 获取是否滑动信息
  658. if (this.$public.getCache("box_size") == 1) {
  659. this.isshrink = true;
  660. }
  661. //是否展示投注框
  662. if (getters.getIsBetting == '100') {
  663. this.isBettingWindow = 100;
  664. }
  665. //获取vuex玩法已投注相对应的数据
  666. let getBetting = getters.getBetting;
  667. if (getBetting) {
  668. getBetting.forEach((e, index) => {
  669. if ("concede_size" == e.title) {
  670. this.thisNum = index;
  671. this.betting = e.data;
  672. }
  673. });
  674. }
  675. this.$public.ajaxTimerFun(function(timing) {
  676. _this.getAjax(getters.getBallId,getters.getActivity);
  677. if (!_this.timers) {
  678. clearInterval(timing);
  679. }
  680. });
  681. this.getAjax(getters.getBallId,getters.getActivity);
  682. },
  683. beforeDestroy() {
  684. this.timers = false;
  685. }
  686. };
  687. </script>
  688. <style scoped>
  689. .yd-cell-box .yd-cell {
  690. z-index: 99;
  691. border-radius: 0.2rem;
  692. }
  693. .matchBox {
  694. background: #f9f9f9;
  695. padding: 0.27rem 0.34rem 0 0.32rem;
  696. }
  697. .match .tit {
  698. display: flex;
  699. justify-content: space-between;
  700. font-size: 0.32rem;
  701. margin-bottom: 0.3rem;
  702. }
  703. .match .list {
  704. overflow: hidden;
  705. transition: all 0.3s cubic-bezier(0.4, 0.6, 0.2, 1);
  706. }
  707. .match .list div {
  708. background: #dcdcdc;
  709. width: 100%;
  710. height: 0.88rem;
  711. padding: 0.26rem 0.56rem 0.3rem 0.3rem;
  712. display: flex;
  713. justify-content: space-between;
  714. border-radius: 0.08rem;
  715. margin-bottom: 0.12rem;
  716. }
  717. .match .list span {
  718. color: #333333;
  719. font-size: 0.28rem;
  720. }
  721. .match .list .num {
  722. width: 0.4rem;
  723. height: 0.4rem;
  724. display: inline-block;
  725. line-height: 0.4rem;
  726. text-align: center;
  727. color: #f5f5f5;
  728. border-radius: 50%;
  729. font-size: 0.2rem;
  730. background: #f76649;
  731. }
  732. .yd-accordion {
  733. background: transparent;
  734. }
  735. .match .list div:nth-last-child(1) {
  736. margin-bottom: 0.34rem;
  737. }
  738. div /deep/ .yd-accordion-head,
  739. div /deep/ .yd-accordion-head-content,
  740. div /deep/ .yd-accordion-title,
  741. div /deep/ .yd-accordion-title-full {
  742. height: 0.3rem;
  743. }
  744. div /deep/ .yd-accordion-title {
  745. min-height: 0;
  746. font-size: 0.28rem;
  747. }
  748. div /deep/ .yd-accordion-head {
  749. margin-bottom: 0.3rem;
  750. border: none;
  751. }
  752. .list-box {
  753. border: 2px solid #cecece;
  754. border-radius: 0.2rem;
  755. }
  756. div /deep/ .yd-accordion-head:after {
  757. height: 0px;
  758. }
  759. div /deep/ .yd-accordion-head-arrow:after {
  760. border: none;
  761. width: 0.4rem;
  762. height: 0.4rem;
  763. background: url("../assets/st-imges/xiangxia.png") no-repeat;
  764. background-size: 0.4rem 0.4rem;
  765. }
  766. /* 1x2 */
  767. .top-box {
  768. height: 0.45rem;
  769. /* font-size: 0.24rem;
  770. background: #fff; */
  771. border-bottom: 1px solid #e4e4e4;
  772. padding: 0 0.32rem;
  773. line-height: 0.44rem;
  774. background: #dcdcdc;
  775. font-size: 0.23rem;
  776. }
  777. .box-bottom {
  778. padding: .1rem .32rem;
  779. background: #fff;
  780. }
  781. .top-num {
  782. display: inline-block;
  783. width: 0.64rem;
  784. height: 0.44rem;
  785. line-height: 0.44rem;
  786. color: #000000;
  787. text-align: center;
  788. background: #ebebeb;
  789. font-size: 0.24rem;
  790. }
  791. .box {
  792. background: #fff;
  793. }
  794. .noPd {
  795. padding: 0;
  796. }
  797. .noBox {
  798. padding: 0;
  799. background: #f8f8f8;
  800. }
  801. .Match-title-num {
  802. width: 0.46rem;
  803. height: 0.46rem;
  804. line-height: 0.46rem;
  805. text-align: center;
  806. background: #f76649;
  807. font-size: 0.26rem;
  808. border-radius: 50%;
  809. color: #e4e4e4;
  810. }
  811. .haderBox {
  812. padding: 0 0.32rem;
  813. height: 0.88rem;
  814. font-size: 0.32rem;
  815. background: #f8f8f8;
  816. }
  817. .main-box {
  818. height: 0.9rem;
  819. /* background: #fff; */
  820. font-size: 0.28rem;
  821. }
  822. .bottom-box {
  823. height: 1.1rem;
  824. background: #fff;
  825. font-size: 0.24rem;
  826. }
  827. .bottom-box div {
  828. width: 1.07rem;
  829. height: 0.76rem;
  830. border: 2px solid #cecece;
  831. border-radius: 0.1rem;
  832. font-size: 0.24rem;
  833. }
  834. .bottom-num {
  835. padding: 0.1rem;
  836. text-align: center;
  837. }
  838. .active {
  839. background: #f76649;
  840. border: 2px solid #f76649 !important;
  841. }
  842. .active > p {
  843. color: #e4e4e4 !important;
  844. }
  845. .num-box {
  846. width: 0.66rem;
  847. height: 0.34rem;
  848. background: #f76649;
  849. border-radius: 0.17rem;
  850. color: #f5f5f5 !important;
  851. line-height: 0.34rem;
  852. text-align: center;
  853. }
  854. .footBox {
  855. height: 1rem;
  856. display: flex;
  857. flex-wrap: wrap;
  858. align-items: center;
  859. }
  860. .footBox .box {
  861. padding-left:.32rem;
  862. width: 33%;
  863. text-align: center;
  864. }
  865. /* 让球&大小 */
  866. .letBallBox {
  867. padding: 0 0.32rem;
  868. height: 0.88rem;
  869. font-size: 0.32rem;
  870. background: #f4f4f4;
  871. }
  872. .mg {
  873. margin-bottom: 0.1rem;
  874. }
  875. .Match-title-num {
  876. width: 0.46rem;
  877. height: 0.46rem;
  878. align-items: center;
  879. justify-content: center;
  880. line-height: 0.46rem;
  881. text-align: center;
  882. background: #f76649;
  883. font-size: 0.2rem;
  884. border-radius: 50%;
  885. color: #f5f5f5;
  886. }
  887. .Match-box-top-right > span {
  888. width: 1.07rem;
  889. text-align: center;
  890. }
  891. .listbox {
  892. padding:0.1rem 0.32rem;
  893. }
  894. .name-box {
  895. height: 1.76rem;
  896. width: 3.8rem;
  897. }
  898. .Match-box-top {
  899. height: 0.44rem;
  900. padding: 0 0.32rem;
  901. line-height: 0.44rem;
  902. background: #dcdcdc;
  903. font-size: 0.23rem;
  904. }
  905. .Match-box-top-num {
  906. width: 0.64rem !important;
  907. height: 0.44rem;
  908. background: #ebebeb;
  909. font-size: 0.24rem;
  910. }
  911. .texttop {
  912. color: #f76649;
  913. }
  914. .Match-box {
  915. /* padding: 0 0 0.12rem; */
  916. background: #f8f8f8;
  917. }
  918. .Match-list-box {
  919. width: 35%;
  920. height: 1.76rem;
  921. flex-wrap: wrap;
  922. }
  923. .Match-list-box .match-list div {
  924. width: 1.07rem;
  925. height: 0.8rem;
  926. border: 1px solid #cecece;
  927. border-radius: 0.1rem;
  928. flex-wrap: wrap;
  929. }
  930. .active {
  931. background: #e4e4e4;
  932. }
  933. /* 后加 */
  934. .Match-title-num {
  935. width: 0.46rem;
  936. height: 0.46rem;
  937. line-height: 0.46rem;
  938. text-align: center;
  939. background: #f76649;
  940. font-size: 0.26rem;
  941. border-radius: 50%;
  942. color: #f5f5f5;
  943. }
  944. .Match-box-top-right > span {
  945. width: 1.07rem;
  946. text-align: center;
  947. }
  948. .name-box {
  949. height: 1.76rem;
  950. }
  951. .Match-box-top {
  952. height: 0.45rem;
  953. line-height: 0.45rem;
  954. background: #dcdcdc;
  955. font-size: 0.23rem;
  956. padding: 0 0.32rem;
  957. }
  958. .Match-box-top-num {
  959. width: 0.64rem !important;
  960. height: 0.45rem;
  961. background: #ebebeb;
  962. font-size: 0.24rem;
  963. }
  964. .Match-box {
  965. background: #f8f8f8;
  966. }
  967. .Match-bottom-right {
  968. padding: 0 0.14rem;
  969. }
  970. .Match-list-left div {
  971. width: 1.07rem;
  972. height: 0.76rem;
  973. border: 1px solid #e4e4e4;
  974. border-radius: 0.1rem;
  975. padding: 0.1rem;
  976. margin: 0.06rem 0.08rem;
  977. }
  978. .Match-list-right div {
  979. width: 1.07rem;
  980. height: 0.76rem;
  981. border: 1px solid #e4e4e4;
  982. border-radius: 0.1rem;
  983. margin: 0.06rem 0.08rem;
  984. }
  985. .active {
  986. background: #f76649;
  987. border: none;
  988. color: #e1e1df !important;
  989. }
  990. .active span{
  991. color: #e1e1df !important;
  992. }
  993. .active i{
  994. color: #e1e1df !important;
  995. }
  996. </style>