1f9df7f86ed59fa486120c6e04124ee7e30319fc.svn-base 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946
  1. <!--
  2. * @Description: In User Settings Edit
  3. * @Author: your name
  4. * @Date: 2019-09-29 16:08:14
  5. * @LastEditTime: 2019-09-29 18:00:10
  6. * @LastEditors: Please set LastEditors
  7. -->
  8. <template>
  9. <div>
  10. <div>
  11. <div class="serch row item-center allAlignment" v-if="noShow">
  12. <div class="row center all pointer hover br05 fz14" style="float: left;width: 50px;" @click="ResultMatch()">
  13. <span style="font-size:.14rem;color:#ccc;">赛果</span>
  14. </div>
  15. <div class="row center all pointer hover br05 fz14" style="width: 70px;" @click="RuleMatch()">
  16. <span style="font-size:.14rem;color:#ccc;">游戏规则</span>
  17. </div>
  18. <div class="row item-center">
  19. <div class="row item-center" style="width: 220px;">
  20. <input
  21. class="fz14"
  22. type="text"
  23. placeholder="请输入球队名称"
  24. v-model="serchTxt"
  25. onkeyup="this.value=this.value.replace(/\s+/g,'')"
  26. color="#AAA"
  27. >
  28. <div class="row center serch-img pointer hover" @click="Serch()">
  29. <img src="@/assets/st-imges/serch.png" alt>
  30. </div>
  31. </div>
  32. <div class="row item-center">
  33. <div class="row center clear pointer hover br05 fz14" @click="clearSerchTxt()">清除</div>
  34. <div class="row center redraw pointer hover br05" style="margin-right: 20px;" @click="red()">
  35. <img src="@/assets/st-imges/redraw.png" alt>
  36. </div>
  37. </div>
  38. <div class="row center all pointer hover br05 fz14" @click="elasticFrame()">
  39. <span style="font-size:.14rem;color:#ccc;">选择联赛</span>
  40. </div>
  41. </div>
  42. </div>
  43. <!-- 日期 -->
  44. <div v-if="(this.$store.getters.getActivity == 'StMorningPlate'||this.$store.getters.getActivity == 'StStringScene')" class="date row item-center pdg20">
  45. <nav class="row datebox allAlignment scroll">
  46. <p @click="dateActive(item.id)" :class="dateClick == item.id?'dateShow':''" v-for="(item,index) in date" :key="index">{{item.title}}</p>
  47. </nav>
  48. </div>
  49. <div class="theBallSize">
  50. <div class="theBallSize-list" v-for="(item,index) in data" :key="index">
  51. <div class="theBallSize-list-title row allAlignment item-center pdg20">
  52. <span>{{item.leagueName}}</span>
  53. </div>
  54. <!-- 标题栏 -->
  55. <div v-for="(items,i) in item.matchData" :key="i">
  56. <div class="theBallSize-list-hader row pdg20">
  57. <div style="width:26%" class="row item-center allAlignment">
  58. <p style="width:100%;padding-right:.3rem;">
  59. <i>{{items.match_date}}</i>
  60. <br>
  61. <span style="color:#F76649">{{items.match_time}}</span>
  62. <img style="width:.14rem;height:.14rem" src="@/assets/st-imges/shizhong.png">
  63. </p>
  64. <p
  65. style="font-size:.14rem;color:#fff"
  66. class="theBallSize-list-hader-num row center triangle"
  67. @click="getTournamentPlay(items.match_id)"
  68. >{{items.tag}} ></p>
  69. </div>
  70. <div style="width:35%" class="theBallSize-list-full">
  71. <div class="row center">全场</div>
  72. <div class="row allAlignment item-center" style="color:#999; padding:0 0.6rem">
  73. <div class="row center list-left">
  74. <span>让球</span>
  75. </div>
  76. <div class="row center list-right">
  77. <span>大小</span>
  78. </div>
  79. </div>
  80. </div>
  81. <div style="width:35%" class="theBallSize-list-full">
  82. <div class="row center">上半场</div>
  83. <div class="row allAlignment item-center pdg20" style="color:#999;padding:0 0.6rem">
  84. <div class="row center list-left">
  85. <span>让球</span>
  86. </div>
  87. <div class="row center list-right">
  88. <span>大小</span>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="theBallSize-list-body row pdg20" style="position: relative;">
  94. <div class="column allAlignment theBallSizeTeam">
  95. <span>{{items.home_team}}</span>
  96. <span>{{items.guest_team}}</span>
  97. </div>
  98. <!-- 全场 -->
  99. <div
  100. class="row allAlignment"
  101. style="width:35%;padding: 0.08rem 0;border-right:.01rem solid #ededed;position: relative;"
  102. >
  103. <!--让球 -->
  104. <div class="column allAlignment">
  105. <div
  106. class="row center theball rightAlignment"
  107. v-for="(e,idx) in items.oddsData"
  108. v-if="e.odds_code == 'coh'"
  109. >
  110. <div class="row center conditions">
  111. <span>{{e.condition}}</span>
  112. </div>
  113. <div v-if="e.odds > 0"
  114. class="theBallSize-list-txt"
  115. @click="selection(index,i,idx,e.id,e.p_code,items.match_id,items.home_team,items.guest_team,items.home_team,'让球')"
  116. :class="e.isTrue ? 'col' : ''"
  117. >
  118. <span>{{e.odds}}</span>
  119. </div>
  120. <div v-else class="theBallSize-list-txt">
  121. <img src="@/assets/st-imges/mima.png"/>
  122. </div>
  123. </div>
  124. <div
  125. class="row center theball rightAlignment guest"
  126. v-for="(e,idx) in items.oddsData"
  127. v-if="e.odds_code == 'cog'"
  128. >
  129. <div class="row center conditions">
  130. <span>{{e.condition}}</span>
  131. </div>
  132. <div
  133. v-if="e.odds > 0"
  134. class="theBallSize-list-txt"
  135. @click="selection(index,i,idx,e.id,e.p_code,items.match_id,items.home_team,items.guest_team,items.guest_team,'让球')"
  136. :class="e.isTrue ? 'col' : ''"
  137. >
  138. <span>{{e.odds}}</span>
  139. </div>
  140. <div v-else class="theBallSize-list-txt">
  141. <img src="@/assets/st-imges/mima.png"/>
  142. </div>
  143. </div>
  144. </div>
  145. <!-- 大小 -->
  146. <div class="column allAlignment">
  147. <div
  148. class="row center size rightAlignment"
  149. v-for="(e,idx) in items.oddsData"
  150. v-if="e.odds_code == 'gsb'"
  151. >
  152. <div class="conditions row center">
  153. <span>大{{e.condition}}</span>
  154. </div>
  155. <div
  156. v-if="e.odds > 0"
  157. class="theBallSize-list-txt"
  158. @click="selection(index,i,idx,e.id,e.p_code,items.match_id,items.home_team,items.guest_team,'大','进球:大小')"
  159. :class="e.isTrue ? 'col' : ''"
  160. >
  161. <span>{{e.odds}}</span>
  162. </div>
  163. <div v-else class="theBallSize-list-txt">
  164. <img src="@/assets/st-imges/mima.png"/>
  165. </div>
  166. </div>
  167. <div
  168. class="row center size guest rightAlignment"
  169. v-for="(e,idx) in items.oddsData"
  170. v-if="e.odds_code == 'gss'"
  171. >
  172. <div class="conditions row center">
  173. <span>小{{e.condition}}</span>
  174. </div>
  175. <div
  176. v-if="e.odds > 0"
  177. class="theBallSize-list-txt"
  178. @click="selection(index,i,idx,e.id,e.p_code,items.match_id,items.home_team,items.guest_team,'小','进球:大小')"
  179. :class="e.isTrue ? 'col' : ''"
  180. >
  181. <span>{{e.odds}}</span>
  182. </div>
  183. <div v-else class="theBallSize-list-txt">
  184. <img src="@/assets/st-imges/mima.png"/>
  185. </div>
  186. </div>
  187. </div>
  188. </div>
  189. <!--半场 -->
  190. <div
  191. class="row allAlignment"
  192. style="width:35%;padding: 0.08rem 0;position: relative;"
  193. >
  194. <!--让球 -->
  195. <div class="column allAlignment">
  196. <div
  197. class="row center theball rightAlignment"
  198. v-for="(e,idx) in items.oddsData"
  199. v-if="e.odds_code == 'coh_h'"
  200. >
  201. <div class="row center conditions">
  202. <span>{{e.condition}}</span>
  203. </div>
  204. <div
  205. v-if="e.odds > 0"
  206. class="theBallSize-list-txt"
  207. @click="selection(index,i,idx,e.id,e.p_code,items.match_id,items.home_team,items.guest_team,items.home_team,'让球-上半场')"
  208. :class="e.isTrue ? 'col' : ''"
  209. >
  210. <span>{{e.odds}}</span>
  211. </div>
  212. <div v-else class="theBallSize-list-txt">
  213. <img src="@/assets/st-imges/mima.png"/>
  214. </div>
  215. </div>
  216. <div
  217. class="row center theball rightAlignment guest"
  218. v-for="(e,idx) in items.oddsData"
  219. v-if="e.odds_code == 'cog_h'"
  220. >
  221. <div class="row center conditions">
  222. <span>{{e.condition}}</span>
  223. </div>
  224. <div
  225. v-if="e.odds > 0"
  226. class="theBallSize-list-txt"
  227. @click="selection(index,i,idx,e.id,e.p_code,items.match_id,items.home_team,items.guest_team,items.guest_team,'让球-上半场')"
  228. :class="e.isTrue ? 'col' : ''"
  229. >
  230. <span>{{e.odds}}</span>
  231. </div>
  232. <div v-else class="theBallSize-list-txt">
  233. <img src="@/assets/st-imges/mima.png"/>
  234. </div>
  235. </div>
  236. </div>
  237. <!-- 大小 -->
  238. <div class="column allAlignment">
  239. <div
  240. class="row center size rightAlignment"
  241. v-for="(e,idx) in items.oddsData"
  242. v-if="e.odds_code == 'gsb_h'"
  243. >
  244. <div class="conditions row center">
  245. <span>大{{e.condition}}</span>
  246. </div>
  247. <div
  248. v-if="e.odds > 0"
  249. class="theBallSize-list-txt"
  250. @click="selection(index,i,idx,e.id,e.p_code,items.match_id,items.home_team,items.guest_team,'大','进球:大小-上半场')"
  251. :class="e.isTrue ? 'col' : ''"
  252. >
  253. <span>{{e.odds}}</span>
  254. </div>
  255. <div v-else class="theBallSize-list-txt">
  256. <img src="@/assets/st-imges/mima.png"/>
  257. </div>
  258. </div>
  259. <div
  260. class="row center size guest rightAlignment"
  261. v-for="(e,idx) in items.oddsData"
  262. v-if="e.odds_code == 'gss_h'"
  263. >
  264. <div class="conditions row center">
  265. <span>小{{e.condition}}</span>
  266. </div>
  267. <div
  268. v-if="e.odds > 0"
  269. class="theBallSize-list-txt"
  270. @click="selection(index,i,idx,e.id,e.p_code,items.match_id,items.home_team,items.guest_team,'小','进球:大小-上半场')"
  271. :class="e.isTrue ? 'col' : ''"
  272. >
  273. <span>{{e.odds}}</span>
  274. </div>
  275. <div v-else class="theBallSize-list-txt">
  276. <img src="@/assets/st-imges/mima.png"/>
  277. </div>
  278. </div>
  279. </div>
  280. </div>
  281. <div @click="promptInfo()" class="right-img">
  282. <img style="margin-bottom:.1rem" src="@/assets/st-imges/TheGame.png">
  283. <br>
  284. <img src="@/assets/st-imges/TheScore.png">
  285. </div>
  286. </div>
  287. </div>
  288. </div>
  289. </div>
  290. </div>
  291. <div v-if="noData">
  292. <noData/>
  293. </div>
  294. </div>
  295. </template>
  296. <script>
  297. import "@/css/index.css";
  298. import noData from '@/components/noData';
  299. export default {
  300. name: "theBallSize",
  301. components:{
  302. noData
  303. },
  304. data() {
  305. return {
  306. // date: [{ id: "today", title: "今日" }],
  307. // pCode: this.$store.getters.getPaly_code, //传入接口的值
  308. activity: this.$store.getters.getActivity,
  309. // ballCode: this.$store.getters.getBallCode,
  310. data: [], //数据
  311. dataList:'',//临时数据
  312. lg_id:'',//联赛
  313. serchTxt: "",
  314. timers:true,
  315. noData : false, //暂无数据显示
  316. noShow : false, //无数据时隐藏头部
  317. limit : '',
  318. passLimit : '',
  319. date: [{ id: "all", title: "全部" }],//日期
  320. dateClick:'all',//激活的日期
  321. };
  322. },
  323. methods: {
  324. /*******************直播比赛数据提示*******************/
  325. promptInfo(){
  326. this.$dialog.alert({mes: '此功能占未开放'});
  327. },
  328. /*----------------------------------------------*/
  329. //获取赛事数据
  330. getAJAX(lg_id,search) {
  331. if(this.$store.getters.getActivity == 'StStringScene'){
  332. this.$store.dispatch("SET_BETTINGTYPE", 2);
  333. }else{
  334. this.$store.dispatch("SET_BETTINGTYPE", 1);
  335. }
  336. this.$http
  337. .get(this.$ports.home.gameList, {
  338. type: this.$store.getters.getActivity,
  339. p_code: this.$store.getters.getPaly_code,
  340. game_code: this.$store.getters.getBallCode,
  341. match_date:this.dateClick == 'all'? '': this.dateClick, //需要
  342. lg_id,
  343. search
  344. })
  345. .then(res => {
  346. // console.log('数据',res.data.data[0]);
  347. if(res.data.data.length > 0 && res.data.status == 1){
  348. this.noData = false;
  349. //数据匹配判断是否上一次有数据
  350. // if(this.dataList.length){
  351. // this.$public.oddsDataUpdate(res.data.data[0],this.dataList,1)
  352. // }
  353. this.data = res.data.data[0];
  354. let betting = '';
  355. //临时储存数据
  356. this.dataList = res.data.data[0];
  357. this.$store.dispatch("SET_LEAGUECHOOSE", res.data.data[1]);
  358. if(this.$store.getters.getActivity == 'StStringScene'){
  359. betting = this.$store.getters.getPassBetting;
  360. }else{
  361. betting = this.$store.getters.getBetting;
  362. }
  363. this.dataGroup(this.data,betting)
  364. }else{
  365. this.noData = true;
  366. this.data =[];
  367. }
  368. this.noShow= true;
  369. this.$store.dispatch("GETLOADING", false);
  370. });
  371. },
  372. // 进入添加选中效果
  373. dataGroup(data,betting){
  374. if(betting != null && betting.length > 0){
  375. data.forEach(e =>{
  376. e.matchData.forEach(k =>{
  377. k.oddsData.forEach(item =>{
  378. betting.forEach(i =>{
  379. i.data.forEach(j =>{
  380. if(j.id == item.id){
  381. item.isTrue = true
  382. }
  383. })
  384. })
  385. })
  386. })
  387. })
  388. }
  389. },
  390. // 选中
  391. selection(idx,i,index,id,p_code,match_id,homeName,guestName,name,playName) {
  392. //调用投注公共方法
  393. let _this = this;
  394. let ballId = this.$store.getters.getBallCode;
  395. let acty = this.$store.getters.getActivity;
  396. let teamName = {
  397. home : homeName,
  398. guest : guestName
  399. }
  400. // 串场为单串
  401. if(this.$store.getters.getActivity == 'StStringScene'){
  402. let betting = this.$store.getters.getPassBetting;
  403. if(betting == null){
  404. betting = [];
  405. }
  406. this.$public.strandPublicBetting(this.data,p_code,id,idx,i,index,betting,acty,match_id,playName,name,ballId,homeName,guestName,this.passLimit,function(data,type){
  407. if(type){
  408. _this.$dialog.toast({ mes: "亲,超出表格上限啦。", timeout: 2000 });
  409. }
  410. _this.$store.dispatch("SET_PASSBETTING",[]);
  411. _this.$store.dispatch("SET_PASSBETTING",data);
  412. })
  413. }else{
  414. let betting = this.$store.getters.getBetting;
  415. this.$public.publicBetting(this.data,p_code,id,idx,i,index,betting,acty,match_id,teamName,playName,name,ballId,this.limit,function(data,type){
  416. if(type){
  417. _this.$dialog.toast({ mes: "亲,超出表格上限啦。", timeout: 2000 });
  418. }
  419. _this.$store.dispatch("SET_BETTING",[]);
  420. _this.$store.dispatch("SET_BETTING",data);
  421. })
  422. }
  423. // console.log('limit',this.limit)
  424. if(this.limit < 10){
  425. this.data[idx].matchData.forEach((val,i) =>{
  426. val.oddsData.forEach(item =>{
  427. if(this.$store.getters.getActivity == 'StStringScene'){
  428. if(this.passLimit < 10){
  429. if(val.match_id == match_id){
  430. // 当isTrue值为true时,点击时置为false
  431. if(item.id == id){
  432. //console.log(item.isTrue)
  433. if(item.isTrue == true){
  434. this.$forceUpdate();
  435. item.isTrue = false
  436. }else if(item.isTrue = false){
  437. this.$forceUpdate();
  438. item.isTrue = true
  439. }else{
  440. this.$forceUpdate();
  441. this.$set(item, "isTrue", item.isTrue ? false : true);
  442. }
  443. }else{
  444. if(item.isTrue == true){
  445. item.isTrue = false;
  446. }
  447. }
  448. }
  449. }else{
  450. if(item.id == id){
  451. this.$forceUpdate();
  452. this.$set(item,'isTrue',false)
  453. }
  454. }
  455. }else{
  456. if(item.id == id){
  457. this.$forceUpdate();
  458. this.$set(item, "isTrue", item.isTrue ? false : true);
  459. }
  460. }
  461. })
  462. })
  463. }else{
  464. this.data[idx].matchData.forEach(val =>{
  465. val.oddsData.forEach(item =>{
  466. if(item.id == id){
  467. this.$set(item,'isTrue',false)
  468. }
  469. })
  470. })
  471. }
  472. },
  473. // let BallCode = this.$store.getters.getBallCode;
  474. // let code = 10011;//默认足球
  475. // if(BallCode == 'lq'){
  476. // code = 10012;
  477. // }else if(BallCode == 'bq'){
  478. // code = 10013;
  479. // }else if(BallCode == 'wq'){
  480. // code = 10014;
  481. // }
  482. /*------------------------------------------------*/
  483. //路由到赛事详情页面
  484. getTournamentPlay(match_id) {
  485. this.$store.dispatch("MACTH_ID", match_id);
  486. this.$store.dispatch("SET_CONTROLROUTING", 10010);
  487. },
  488. //新开页面展示赛果
  489. ResultMatch() {
  490. const { href } = this.$router.resolve({
  491. name: 'ResultMatch'
  492. })
  493. window.open(href, '_blank', 'toolbar=yes, width=800, height=900')
  494. },
  495. //新开页面展示赛事规则
  496. RuleMatch() {
  497. const { href } = this.$router.resolve({
  498. name: 'RuleMatch'
  499. })
  500. window.open(href, '_blank', 'toolbar=yes, width=800, height=900')
  501. },
  502. /*------------------------------------------------*/
  503. //搜索按钮被点击
  504. Serch() {
  505. if (this.serchTxt === "") {
  506. this.$dialog.toast({ mes: "请输入您想要搜索的内容。", timeout: 2000 });
  507. return false;
  508. } else {
  509. this.$store.dispatch("SET_LEAGUEDATA",[]);
  510. this.data= [];
  511. this.getAJAX('',this.serchTxt)
  512. }
  513. },
  514. /*------------------------------------------------*/
  515. // 删除搜索框内容
  516. clearSerchTxt() {
  517. if (this.serchTxt != "") {
  518. this.serchTxt = "";
  519. this.$store.dispatch("SET_LEAGUEDATA",[]);
  520. this.data= [];
  521. this.getAJAX();
  522. }
  523. },
  524. /*------------------------------------------------*/
  525. // 刷新
  526. red() {
  527. this.serchTxt = "";
  528. this.lg_id =""; //需要
  529. this.$store.dispatch("SET_LEAGUEDATA",[]);
  530. if (this.serchTxt.length > 0) {
  531. this.Serch();
  532. } else {
  533. this.data= [];
  534. this.getAJAX();
  535. }
  536. },
  537. /*------------------------------------------------*/
  538. //跳转到联赛选择页
  539. elasticFrame() {
  540. this.$store.dispatch("SET_CONTROLROUTING", 10015);
  541. },
  542. /*------------------------------------------------*/
  543. // 日期计算
  544. fun_date() {
  545. let date = new Date();
  546. let MonthNum = 0;
  547. let lastMonth = new Date(date.getFullYear(),date.getMonth() + 1,0).getDate();
  548. for (let i = 1; i < 7; i++) {
  549. let years = date.getFullYear();
  550. let month = date.getMonth() + 1;
  551. let day = date.getDate() + i < 10 ? "0" + (date.getDate() + i) : date.getDate() + i;
  552. if (date.getDate() + i > lastMonth) {
  553. MonthNum++;
  554. month = date.getMonth() + 2;
  555. day = "0" + MonthNum;
  556. }
  557. let time = {};
  558. time.id = years + "-" + month + "-" + day;
  559. time.title =years+' - '+month + " - " + day;
  560. this.date.push(time);
  561. }
  562. },
  563. /*------------------------------------------------*/
  564. //切换日期
  565. dateActive(str){
  566. // this.serchTxt = "";
  567. this.dateClick = str;
  568. this.data= [];
  569. this.getAJAX(this.lg_id,this.serchTxt); //需要
  570. },
  571. },
  572. /**
  573. * 页面挂载之前触发
  574. */
  575. created(){
  576. this.fun_date();
  577. },
  578. mounted() {
  579. //获取选择的联赛id
  580. if(this.$store.getters.getLeagueData.length >0 ){
  581. if(this.$store.getters.getLeagueData.length == 1){
  582. this.lg_id = this.$store.getters.getLeagueData[0]
  583. }else{
  584. this.lg_id = this.$store.getters.getLeagueData.join(',');
  585. }
  586. }
  587. this.$store.dispatch("GETLOADING", true);
  588. this.getAJAX(this.lg_id);
  589. this.$store.dispatch("SET_BETTING",[]);
  590. let _this = this
  591. this.$public.ajaxTimerFun((timing)=>{
  592. if(_this.timers){
  593. _this.getAJAX(_this.lg_id,_this.serchTxt);
  594. }else{
  595. clearInterval(timing)
  596. }
  597. })
  598. },
  599. beforeDestroy() {
  600. this.timers = false;
  601. },
  602. computed: {
  603. getActy() {
  604. return this.$store.getters.getActivity;
  605. },
  606. // getPaly_code() {
  607. // return this.$store.getters.getPaly_code;
  608. // },
  609. // getBallId() {
  610. // return this.$store.getters.getBallCode;
  611. // },
  612. // 获取投注数量
  613. getLimit() {
  614. return this.$store.getters.getLimit;
  615. },
  616. //获取投注框删除的投注信息
  617. getDeleteType() {
  618. return this.$store.getters.getDeleteType;
  619. },
  620. //获取选择的联赛数据
  621. // getLeagueData(){
  622. // return this.$store.getters.getLeagueData;
  623. // },
  624. // 过去串式投注数量
  625. getPassLimit(){
  626. return this.$store.getters.getPassLimit;
  627. }
  628. },
  629. watch: {
  630. getActy(val) {
  631. this.activity = val;
  632. // this.data = '';
  633. this.$store.dispatch("SET_LEAGUEDATA",[]);
  634. this.getAJAX();
  635. this.$store.dispatch("SET_BETTING",[]);//设置默认值
  636. if(val != 'StStringScene'){
  637. this.$store.dispatch("SET_PASSBETTING",[]);
  638. }
  639. },
  640. //监听玩法代码
  641. // getPaly_code(val) {
  642. // this.pCode = val;
  643. // ///this.getAJAX();
  644. // },
  645. // //监听球类代码
  646. // getBallId(val) {
  647. // this.ballCode = val;
  648. // //this.getAJAX();
  649. // },
  650. getLimit(val){
  651. this.limit = val;
  652. if(this.$store.getters.getActivity == 'StStringScene'){
  653. }else{
  654. if(val == 0){
  655. this.data.forEach(e =>{
  656. e.matchData.forEach(k =>{
  657. k.oddsData.forEach(item =>{
  658. if(item.isTrue){
  659. item.isTrue = false;
  660. }
  661. })
  662. })
  663. })
  664. }
  665. }
  666. },
  667. getPassLimit(val){
  668. this.passLimit = val;
  669. if(this.$store.getters.getActivity == 'StStringScene'){
  670. if(val == 0){
  671. this.data.forEach(e =>{
  672. e.matchData.forEach(k =>{
  673. k.oddsData.forEach(item =>{
  674. if(item.isTrue){
  675. this.$forceUpdate();
  676. item.isTrue = false;
  677. }
  678. })
  679. })
  680. })
  681. }
  682. }
  683. },
  684. getDeleteType(val){
  685. let jumpOut = false;
  686. for(var i = 0; i < this.data.length; i++){
  687. for(var k = 0; k < this.data[i].matchData.length; k++){
  688. for(var j = 0; j < this.data[i].matchData[k].oddsData.length;j++){
  689. if(this.data[i].matchData[k].oddsData[j].id == val){
  690. this.$forceUpdate();
  691. this.data[i].matchData[k].oddsData[j].isTrue = false;
  692. jumpOut = true;
  693. break;
  694. }
  695. }
  696. if(jumpOut == true){
  697. break;
  698. }
  699. }
  700. if(jumpOut == true){
  701. break;
  702. }
  703. }
  704. },
  705. // getLeagueData(val){
  706. // console.log('val',val)
  707. // if(val){
  708. // }
  709. // }
  710. }
  711. };
  712. </script>
  713. <style scoped>
  714. .pdg20 {
  715. padding: 0 0.2rem;
  716. }
  717. .theBallSize {
  718. position: relative;
  719. }
  720. .theBallSize-list-title {
  721. width: 100%;
  722. height: 0.4rem;
  723. background: #ccc;
  724. font-size: 0.16rem;
  725. }
  726. .theBallSize-list-title img {
  727. width: 0.22rem;
  728. height: 0.22rem;
  729. margin-left: 0.2rem;
  730. }
  731. .theBallSize-list-hader {
  732. min-height: 0.5rem;
  733. background: #e5e5e5;
  734. font-size: 0.14rem;
  735. }
  736. .theBallSize-list-hader-num {
  737. width: 0.8rem;
  738. height: 0.5rem;
  739. background: #bbb;
  740. }
  741. .theBallSize-list-hader-num::after {
  742. border-width: 0.05rem;
  743. border-left-color: #e5e5e5;
  744. border-top-color: #e5e5e5;
  745. left: 40%;
  746. bottom: -0.05rem;
  747. transform: rotate(45deg);
  748. }
  749. .theBallSize-list-full div {
  750. height: 50%;
  751. line-height: 100%;
  752. }
  753. .theBallSize-list-body {
  754. background: #fcfcfc;
  755. font-size: 0.14rem;
  756. border-bottom: 1px solid #e5e5e5;
  757. }
  758. .theBallSize-list-body:hover {
  759. background: #fff5e9;
  760. }
  761. .theBallSizeTeam {
  762. width: 26%;
  763. padding: 0.1rem 0;
  764. min-height: 0.9rem;
  765. flex-wrap: wrap;
  766. }
  767. .theBallSize-list-box {
  768. padding: 0.1rem 0.08rem;
  769. }
  770. .theBallSize-list-box div {
  771. height: 0.3rem;
  772. line-height: 0.3rem;
  773. }
  774. .theBallSize-list-box span {
  775. display: inline-block;
  776. width: 0.7rem;
  777. }
  778. .theBallSize-list-txt {
  779. width: 0.48rem !important;
  780. height: 0.3rem;
  781. text-align: center;
  782. line-height: 0.3rem;
  783. background: #fcfcfc;
  784. border-radius: 0.05rem;
  785. border: 0.01rem solid #eee;
  786. cursor: pointer;
  787. }
  788. .theBallSize-list-txt:hover {
  789. background: #ddd;
  790. color: #f76649;
  791. }
  792. .conditions {
  793. color: #f76649;
  794. margin-right: .1rem;
  795. }
  796. .serch {
  797. width: 100%;
  798. height: 0.5rem;
  799. background: #aaa;
  800. padding: 0 0.2rem;
  801. }
  802. input {
  803. border: none;
  804. background: #efefef;
  805. padding-left: 0.2rem;
  806. width: 4.6rem;
  807. height: 0.3rem;
  808. border-radius: 0.05rem 0 0 0.05rem;
  809. }
  810. .serch-img {
  811. width: 0.5rem;
  812. height: 0.3rem;
  813. background: #666;
  814. border-radius: 0 0.05rem 0.05rem 0;
  815. margin-right: 0.3rem;
  816. }
  817. .all {
  818. width: 1.2rem;
  819. height: 0.3rem;
  820. background: #666;
  821. /* background: #ddd;
  822. color: #333; */
  823. }
  824. .clear {
  825. width: 0.6rem;
  826. height: 0.3rem;
  827. background: #666;
  828. color: #ccc;
  829. margin-right: 0.1rem;
  830. }
  831. .redraw {
  832. width: 0.3rem;
  833. height: 0.3rem;
  834. background: #666;
  835. }
  836. img {
  837. width: 0.2rem;
  838. height: 0.2rem;
  839. }
  840. .br05 {
  841. border-radius: 0.05rem;
  842. }
  843. .fz14 {
  844. font-size: 0.14rem;
  845. }
  846. .hover:hover {
  847. background: #bbb;
  848. color: #fff!important;
  849. }
  850. .hover:hover span{
  851. color: #fff!important;
  852. }
  853. .pointer {
  854. cursor: pointer;
  855. }
  856. .col {
  857. border-radius: 2px;
  858. background: #f76649;
  859. color: #fff;
  860. }
  861. .theball {
  862. position: absolute;
  863. left: 0%;
  864. top: 8%;
  865. width: 1rem;
  866. }
  867. .guest {
  868. top: 60%;
  869. }
  870. .size {
  871. position: absolute;
  872. left: 50%;
  873. width: 1.2rem;
  874. }
  875. .right-img {
  876. width: 0.15rem;
  877. position: absolute;
  878. right: 0.3rem;
  879. bottom: 0.15rem;
  880. }
  881. .right-img img {
  882. width: 0.22rem;
  883. height: 0.2rem;
  884. }
  885. /* 日期样式 */
  886. .date {
  887. height: 0.4rem;
  888. background: #898989;
  889. font-size: .16rem;
  890. color: #fff;
  891. font-weight: bold;
  892. }
  893. .date > p {
  894. width: 0.26rem;
  895. height: 0.26rem;
  896. background: #bbb;
  897. border-radius: 0.05rem;
  898. }
  899. .date div {
  900. width: 100%;
  901. height: 100%;
  902. }
  903. .datebox {
  904. overflow-x: auto;
  905. overflow-y: hidden;
  906. width: 100%;
  907. height: 0.4rem;
  908. }
  909. .datebox p {
  910. text-align: center;
  911. line-height: .4rem;
  912. padding: 0 .05rem;
  913. cursor: pointer;
  914. font-size: .16rem;
  915. }
  916. .dateShow{
  917. color: #f76649;
  918. }
  919. </style>