f3258ab4ec5a62f0e802c91815ff41f6eae7514b.svn-base 30 KB

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