b8bbb135d1ca7bab5e43ac64dd56a2db04c516dd.svn-base 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860
  1. <template>
  2. <div>
  3. <div>
  4. <div class="Serch row item-center">
  5. <div class="Soccer-game row item-center">
  6. <div
  7. style=" display:flex;align-items:center;justify-content:center;"
  8. class="Soccer-game-title"
  9. @click="isreturn()"
  10. >
  11. <img class="box-img" src="../assets/st-imges/returnbox.png">
  12. {{this.title}}
  13. </div>
  14. </div>
  15. <div class="Serch-box row item-center">
  16. <div class="Serch-box-home row item-center">
  17. <img class="Serch-box-img" src="../assets/st-imges/sousuo.png">
  18. <input
  19. v-model="SerchValue"
  20. @keydown="serchchange(SerchValue)"
  21. @input="searchTeam(SerchValue)"
  22. class="Serch-box-input"
  23. type="text"
  24. placeholder="请输入球队名称"
  25. >
  26. <img
  27. class="Serch-box-del"
  28. @click="delinputvalue()"
  29. v-if="Serchchange==true"
  30. src="../assets/st-imges/del.png"
  31. >
  32. </div>
  33. </div>
  34. </div>
  35. </div>
  36. <div>
  37. <div v-for="(ite,$index) in data" :key="ite.id">
  38. <div class="row allAlignment box center">
  39. <span>{{ite.name_chinese}}</span>
  40. <div class="Match-title-num">
  41. <span>{{ite.count}}</span>
  42. </div>
  43. </div>
  44. <!-- 足球与篮球 -->
  45. <div v-if="ballSelt == 10" v-for=" (item,index) in ite.match_info" :key="index" class="Match-box">
  46. <div class="row allAlignment Match-box-top">
  47. <div class="Match-box-top-left">
  48. <span>{{item.match_date}}</span>
  49. <span>{{item.match_time}}</span>
  50. </div>
  51. <div class="Match-box-top-right row">
  52. <span style="margin-right: .15rem;" class="Match-box-top-num">{{item.tag}}</span>
  53. <span style="margin-right: .15rem;">让球</span>
  54. <span style="margin-right: .15rem;">大小</span>
  55. </div>
  56. </div>
  57. <div
  58. class="row allAlignment center"
  59. @click="matchInfo(item.match_id);"
  60. style="padding:0 .32rem"
  61. >
  62. <div class="column average name-box">
  63. <div>{{item.home_team}}</div>
  64. <div>{{item.guest_team}}</div>
  65. </div>
  66. <div class="Match-bottom-right">
  67. <!-- 主队 -->
  68. <!-- @click.stop="isBetting($index,item.match_id, items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,items.odds_only,items.odds_code,'homeOdds',items.p_code,items.status)" -->
  69. <!-- class="Match-list-left" -->
  70. <!-- <div> -->
  71. <div
  72. v-for="(items,indexs) in item.oddsData"
  73. :key="indexs"
  74. >
  75. <div class="" v-if="items.odds_code.startsWith('concede')">
  76. <div :class="{active:items.isTrue,increased_color:items.change == 'add',reduce_color:items.change == 'red'}" class="letballHome" v-if="items.odds_code.endsWith('home')" @click.stop="isBetting($index,item.match_id, items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,items.odds_only,items.odds_code,'homeOdds',items.p_code,items.status,ite.lg_id,'让球')">
  77. <span style="color: rgb(247, 102, 73); " v-if="items.odds > 0">{{items.condition}}</span>
  78. <span v-if="items.odds >0" :class="items.condition == '' ? 'mg':''">{{items.odds}}</span>
  79. <img v-if="items.odds <= 0" style="width: 0.7rem;height: 0.5rem;" src="@/assets/st-imges/mima.png"><img>
  80. </div>
  81. <div :class="{active:items.isTrue,increased_color:items.change == 'add',reduce_color:items.change == 'red'}" class="letballGuest" v-if="items.odds_code.endsWith('guest')" @click.stop="isBetting($index,item.match_id, items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,items.odds_only,items.odds_code,'homeOdds',items.p_code,items.status,ite.lg_id,'让球')">
  82. <span style="color: rgb(247, 102, 73); " v-if="items.odds > 0">{{items.condition}}</span>
  83. <span v-if="items.odds >0" :class="items.condition == '' ? 'mg':''">{{items.odds}}</span>
  84. <img v-if="items.odds <= 0" style="width: 0.7rem;height: 0.5rem;" src="@/assets/st-imges/mima.png"><img>
  85. </div>
  86. </div>
  87. <div v-if="items.odds_code.startsWith('goal')" class="row bigSmall" @click.stop="isBetting($index,item.match_id, items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,items.odds_only,items.odds_code,'goal_size',items.p_code,items.status,ite.lg_id,'大小')">
  88. <div :class="{active:items.isTrue,increased_color:items.change == 'add',reduce_color:items.change == 'red'}" class="bigHome" v-if="items.odds_code.endsWith('big')">
  89. <div style="color: rgb(247, 102, 73); " class="stardBig" v-if="items.odds > 0">
  90. <span class="bigSmall">大</span>
  91. <span>{{items.condition}}</span>
  92. </div>
  93. <span v-if="items.odds >0" :class="items.condition == '' ? 'mg':''">{{items.odds}}</span>
  94. <img v-if="items.odds <= 0" style="width: 0.7rem;height: 0.5rem;" src="@/assets/st-imges/mima.png"><img>
  95. </div>
  96. <div :class="{active:items.isTrue,increased_color:items.change == 'add',reduce_color:items.change == 'red'}" class="bigGuest" v-if="items.odds_code.endsWith('small')" @click.stop="isBetting($index,item.match_id, items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,items.odds_only,items.odds_code,'goal_size',items.p_code,items.status,ite.lg_id,'大小')">
  97. <div style="color: rgb(247, 102, 73); " class="stardBig" v-if="items.odds > 0">
  98. <span class="bigSmall">小</span>
  99. <span>{{items.condition}}</span>
  100. </div>
  101. <span v-if="items.odds >0" :class="items.condition == '' ? 'mg':''">{{items.odds}}</span>
  102. <img v-if="items.odds <= 0" style="width: 0.7rem;height: 0.5rem;" src="@/assets/st-imges/mima.png"><img>
  103. </div>
  104. </div>
  105. <div v-if="items.odds_code.startsWith('total')" class="row bigSmall" @click.stop="isBetting($index,item.match_id, items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,items.odds_only,items.odds_code,'total_size',items.p_code,items.status,ite.lg_id,'大小')">
  106. <div :class="{active:items.isTrue,increased_color:items.change == 'add',reduce_color:items.change == 'red'}" class="bigHome" v-if="items.odds_code.endsWith('big')">
  107. <div style="color: rgb(247, 102, 73); " class="stardBig" v-if="items.odds > 0">
  108. <span class="bigSmall">大</span>
  109. <span>{{items.condition}}</span>
  110. </div>
  111. <span v-if="items.odds >0" :class="items.condition == '' ? 'mg':''">{{items.odds}}</span>
  112. <img v-if="items.odds <= 0" style="width: 0.7rem;height: 0.5rem;" src="@/assets/st-imges/mima.png"><img>
  113. </div>
  114. <div :class="{active:items.isTrue,increased_color:items.change == 'add',reduce_color:items.change == 'red'}" class="bigGuest" v-if="items.odds_code.endsWith('small')" @click.stop="isBetting($index,item.match_id, items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,items.odds_only,items.odds_code,'total_size',items.p_code,items.status,ite.lg_id,'大小')">
  115. <div style="color: rgb(247, 102, 73); " class="stardBig" v-if="items.odds > 0">
  116. <span class="bigSmall">小</span>
  117. <span>{{items.condition}}</span>
  118. </div>
  119. <span v-if="items.odds >0" :class="items.condition == '' ? 'mg':''">{{items.odds}}</span>
  120. <img v-if="items.odds <= 0" style="width: 0.7rem;height: 0.5rem;" src="@/assets/st-imges/mima.png"><img>
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. <!-- 网球 -->
  128. <div v-if="ballSelt == 100" v-for=" (item,index) in ite.match_info" :key="index" class="Match-box">
  129. <div class="row allAlignment Match-box-top wqMatch-box">
  130. <div class="Match-box-top-left">
  131. <span>{{item.match_date}}</span>
  132. <span style="color: rgb(253, 143, 38);">{{item.match_time}}</span>
  133. <div>三盘两胜</div>
  134. </div>
  135. <div class="Match-box-top-right row">
  136. <span style="margin-right: .15rem;height:100%;line-height:0.65rem;" class="Match-box-top-num">{{item.tag}}</span>
  137. <span style="margin-right: .15rem;line-height:0.65rem;">独赢盘</span>
  138. <span style="margin-right: .15rem;line-height:0.65rem;">让盘</span>
  139. </div>
  140. </div>
  141. <div
  142. class="row allAlignment center"
  143. @click="matchInfo(item.match_id);"
  144. style="padding:0 .32rem"
  145. >
  146. <div class="column average name-box">
  147. <div>{{item.home_team}}</div>
  148. <div>{{item.guest_team}}</div>
  149. </div>
  150. <div class="Match-bottom-right">
  151. <!-- 主队 -->
  152. <div
  153. class=""
  154. v-for="(items,indexs) in item.oddsData"
  155. :key="indexs"
  156. >
  157. <div class="" v-if="items.odds_code.startsWith('kemp')">
  158. <div :class="{active:items.isTrue,increased_color:items.change == 'add',reduce_color:items.change == 'red'}" class="letballHome" v-if="items.odds_code.endsWith('home')" @click.stop="isBetting($index,item.match_id, items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,items.odds_only,items.odds_code,'kemp',items.p_code,items.status,ite.lg_id,'独赢盘')">
  159. <span style="color: rgb(247, 102, 73); " v-if="items.odds > 0">{{items.condition}}</span>
  160. <span v-if="items.odds >0" :class="items.condition == '' ? 'mg':''">{{items.odds}}</span>
  161. <img v-if="items.odds <= 0" style="width: 0.7rem;height: 0.5rem;" src="@/assets/st-imges/mima.png"><img>
  162. </div>
  163. <div :class="{active:items.isTrue,increased_color:items.change == 'add',reduce_color:items.change == 'red'}" class="letballGuest" v-if="items.odds_code.endsWith('guest')" @click.stop="isBetting($index,item.match_id, items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,items.odds_only,items.odds_code,'kemp',items.p_code,items.status,ite.lg_id,'独赢盘')">
  164. <span style="color: rgb(247, 102, 73); " v-if="items.odds > 0">{{items.condition}}</span>
  165. <span v-if="items.odds >0" :class="items.condition == '' ? 'mg':''">{{items.odds}}</span>
  166. <img v-if="items.odds <= 0" style="width: 0.7rem;height: 0.5rem;" src="@/assets/st-imges/mima.png"><img>
  167. </div>
  168. </div>
  169. <div v-if="items.odds_code.startsWith('dishes')" class="row bigSmall" @click.stop="isBetting($index,item.match_id, items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,items.odds_only,items.odds_code,'dishes',items.p_code,items.status,ite.lg_id,'让盘')">
  170. <div :class="{active:items.isTrue,increased_color:items.change == 'add',reduce_color:items.change == 'red'}" class="bigHome" v-if="items.odds_code.endsWith('home')">
  171. <span style="color: rgb(247, 102, 73); " v-if="items.odds > 0">{{items.condition}}</span>
  172. <span v-if="items.odds >0" :class="items.condition == '' ? 'mg':''">{{items.odds}}</span>
  173. <img v-if="items.odds <= 0" style="width: 0.7rem;height: 0.5rem;" src="@/assets/st-imges/mima.png"><img>
  174. </div>
  175. <div :class="{active:items.isTrue,increased_color:items.change == 'add',reduce_color:items.change == 'red'}" class="bigGuest" v-if="items.odds_code.endsWith('guest')" @click.stop="isBetting($index,item.match_id, items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,items.odds_only,items.odds_code,'dishes',items.p_code,items.status,ite.lg_id,'让盘')">
  176. <span style="color: rgb(247, 102, 73); " v-if="items.odds > 0">{{items.condition}}</span>
  177. <span v-if="items.odds >0" :class="items.condition == '' ? 'mg':''">{{items.odds}}</span>
  178. <img v-if="items.odds <= 0" style="width: 0.7rem;height: 0.5rem;" src="@/assets/st-imges/mima.png"><img>
  179. </div>
  180. </div>
  181. </div>
  182. </div>
  183. </div>
  184. </div>
  185. <!-- 棒球 -->
  186. <div v-if="ballSelt == 1000" v-for=" (item,index) in ite.match_info" :key="index" class="Match-box">
  187. <div class="row allAlignment Match-box-top">
  188. <div class="Match-box-top-left">
  189. <span>{{item.match_date}}</span>
  190. <span>{{item.match_time}}</span>
  191. </div>
  192. <div class="Match-box-top-right row">
  193. <span style="margin-right: .15rem;" class="Match-box-top-num">{{item.tag}}</span>
  194. <span style="margin-right: .15rem;">独赢盘</span>
  195. </div>
  196. </div>
  197. <div
  198. class="row allAlignment center"
  199. @click="matchInfo(item.match_id);"
  200. style="padding:0 .32rem"
  201. >
  202. <div class="column average name-box">
  203. <div>{{item.home_team}}</div>
  204. <div>{{item.guest_team}}</div>
  205. </div>
  206. <div class="Match-bottom-right">
  207. <!-- 主队 -->
  208. <div class="row">
  209. <div
  210. class=""
  211. v-for="(items,indexs) in item.oddsData"
  212. :key="indexs"
  213. >
  214. <div v-if="items.odds_code.startsWith('capot')" class="row bigSmall" @click.stop="isBetting($index,item.match_id, items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,items.odds_only,items.odds_code,'capot',items.p_code,items.status,ite.lg_id,'独赢盘')">
  215. <div :class="{active:items.isTrue,increased_color:items.change == 'add',reduce_color:items.change == 'red'}" class="bigHome" v-if="items.odds_code.endsWith('home')">
  216. <span style="color: rgb(247, 102, 73); " v-if="items.odds > 0">{{items.condition}}</span>
  217. <span v-if="items.odds >0" :class="items.condition == '' ? 'mg':''">{{items.odds}}</span>
  218. <img v-if="items.odds <= 0" style="width: 0.7rem;height: 0.5rem;" src="@/assets/st-imges/mima.png"><img>
  219. </div>
  220. <div :class="{active:items.isTrue,increased_color:items.change == 'add',reduce_color:items.change == 'red'}" class="bigGuest" v-if="items.odds_code.endsWith('guest')" @click.stop="isBetting($index,item.match_id, items.id,item.home_team,item.guest_team,item.home_team,items.odds,items.condition,items.odds_only,items.odds_code,'capot',items.p_code,items.status,'独赢盘')">
  221. <span style="color: rgb(247, 102, 73); " v-if="items.odds > 0">{{items.condition}}</span>
  222. <span v-if="items.odds >0" :class="items.condition == '' ? 'mg':''">{{items.odds}}</span>
  223. <img v-if="items.odds <= 0" style="width: 0.7rem;height: 0.5rem;" src="@/assets/st-imges/mima.png"><img>
  224. </div>
  225. </div>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. </div>
  231. </div>
  232. </div>
  233. <BettingWindow v-show="isBettingWindow == '100'"/>
  234. </div>
  235. </template>
  236. <script>
  237. import BettingWindow from "@/components/StBettingWindow";
  238. import NotOpend from "@/components/StNotOpend";
  239. import Loading from "@/components/StLoading";
  240. export default {
  241. name: "entryForm",
  242. data() {
  243. return {
  244. SerchValue: "",
  245. Serchchange: false,
  246. title:this.$route.query.name, //标题
  247. data: "",
  248. game_code: this.$route.query.game_code, //球的类型别名
  249. lg_id: this.$route.query.lg_id, //获取联赛id
  250. isBettingWindow: '-1',
  251. thisNum: 10000,
  252. info: "没有相关联赛信息",
  253. noData: false, //没有数据为true
  254. betting: [], //vuex里面玩法投注数据
  255. timers : true,
  256. index : '',
  257. getIsShow:true,
  258. ballSelt:0, // 当为10的时候为篮球,足球,100的时候为网球,1000的时候为棒球
  259. // 存储变色数据
  260. previousStorage:[]
  261. };
  262. },
  263. components: {
  264. BettingWindow,
  265. NotOpend,
  266. Loading
  267. },
  268. methods: {
  269. // 返回上一页
  270. isreturn() {
  271. history.go(-1);
  272. },
  273. getmatchInfo(search) {
  274. // console.log(this.game_code,this.$route.query.code)
  275. // console.log('奔溃接口页面');
  276. this.$http
  277. .get(this.$ports.match.participateDtl, {
  278. game_code: this.game_code,
  279. code: this.$route.query.code,
  280. lg_id : this.lg_id,
  281. search
  282. })
  283. .then(res => {
  284. this.codeShow = false;
  285. if (res.data.status == 1) {
  286. // console.log(res.data.data)
  287. this.dataGroup(res.data.data);
  288. // console.log("参赛表单", res.data.data);
  289. // this.data = res.data.data;
  290. }
  291. });
  292. let _this=this;
  293. setTimeout(()=>{
  294. _this.$store.dispatch("GETSHOW", false);
  295. },1000)
  296. },
  297. //是否显示删除按钮
  298. serchchange(val) {
  299. if (val.length >= 1) {
  300. this.Serchchange = true;
  301. } else {
  302. this.Serchchange = false;
  303. }
  304. },
  305. /**
  306. * 查询球队
  307. */
  308. searchTeam(val) {
  309. let getActivity = this.$store.getters.getActivity;
  310. let matchDate = this.$route.query.matchDate;
  311. if (val.length >= 1) {
  312. this.Serchchange = true;
  313. } else {
  314. this.Serchchange = false;
  315. }
  316. this.getmatchInfo(val);
  317. },
  318. //清空输入
  319. delinputvalue() {
  320. this.SerchValue = "";
  321. this.Serchchange = false;
  322. this.getmatchInfo("");
  323. },
  324. /*--------------------------------------------------------------------------------*/
  325. // 添加、删除vuex投注数据公共方法
  326. AddDelete: function(match_id,id, home, guest, name, odds, condition, odds_only,odds_code,type,p_code,$index,lg_id,play_name) {
  327. let isAdd = true,isNew=true;
  328. let matchList = this.$store.getters.getBetting;
  329. if (status == "-1") return false;
  330. let ball = this.$store.getters.getBallId;
  331. // if(ball == 'zq'){
  332. let bettingInfo = {
  333. id,
  334. home_team: home,
  335. guest_team: guest,
  336. name,
  337. odds,
  338. match_id,
  339. condition,
  340. ballId: ball,
  341. odds_code: odds_code,
  342. p_code,
  343. play_name,
  344. score: this.score,
  345. bettingTime: "",
  346. odds_only,
  347. lg_id,
  348. odds_id: id
  349. };
  350. //添加新的玩法赔率数据
  351. let obj = {
  352. title:p_code,
  353. data: [bettingInfo]
  354. };
  355. if(matchList !=null ){
  356. for(let i =0 ;i < matchList.length; i++ ){
  357. if(matchList[i].title == p_code){
  358. //删除vuex投注数据
  359. matchList[i].data.forEach((res, index) => {
  360. // console.log(res.id,id)
  361. if (res.id == id) {
  362. matchList[i].data.splice(index, 1);
  363. this.$store.dispatch("SET_LIMIT", false);
  364. this.$store.dispatch("BETTING", []);
  365. this.$store.dispatch("BETTING", matchList);
  366. isAdd = false;
  367. isNew = false;
  368. //处理当前页面样式
  369. this.modifyStyle($index,id,type);
  370. }
  371. });
  372. //添加vuex投注数据
  373. if (isAdd){
  374. isNew = false;
  375. if (this.$store.getters.getLimit * 1 >= 10) return false;
  376. //处理当前页面样式
  377. this.modifyStyle($index,id,type);
  378. matchList[i].data.push(bettingInfo);
  379. this.$store.dispatch("BETTING",[]);
  380. this.$store.dispatch("BETTING",matchList);
  381. if (this.$store.getters.getIsBetting == "100") return false;
  382. this.$store.dispatch("ISBETTING",100);
  383. }
  384. break;
  385. }
  386. }
  387. if(isNew){
  388. matchList.push(obj)
  389. this.$store.dispatch("BETTING",[]);
  390. this.$store.dispatch("BETTING",matchList);
  391. this.modifyStyle($index,id,type);
  392. if (this.$store.getters.getIsBetting == "100") return false;
  393. this.$store.dispatch("ISBETTING", "100");
  394. }
  395. }else{
  396. this.$store.dispatch("BETTING",[obj]);
  397. this.modifyStyle($index,id,type);
  398. if (this.$store.getters.getIsBetting == "100") return false;
  399. this.$store.dispatch("ISBETTING", "100");
  400. }
  401. },
  402. /*--------------------------------------------------------------------------------*/
  403. //修改当前页面样式公共方法
  404. modifyStyle: function($index,id, type) {
  405. // console.log($index,id, type)
  406. this.data[$index].match_info.every(e => {
  407. let ret = false;
  408. if (type == "homeOdds" || type == 'goal_size' || type == "total_size" || type == 'capot' || type == 'kemp' || type == 'dishes') {
  409. e.oddsData.every((res, index) => {
  410. if (res.id == id) {
  411. this.$set(
  412. res,
  413. "isTrue",
  414. res.isTrue ? false : true
  415. );
  416. ret = true;
  417. return false;
  418. }
  419. return true;
  420. });
  421. } else if (type == "guestOdds") {
  422. e.oddsData.every((res, index) => {
  423. if (res.id == id) {
  424. this.$set(
  425. res,
  426. "isTrue",
  427. res.isTrue ? false : true
  428. );
  429. ret = true;
  430. return false;
  431. }
  432. return true;
  433. });
  434. }
  435. if (ret) {
  436. return false;
  437. } else {
  438. return true;
  439. }
  440. });
  441. },
  442. /*--------------------------------------------------------------------------------*/
  443. // 修改投注样式
  444. isBetting($index,match_id,id, home, guest, name, odds, condition, odds_only,odds_code,type,p_code,status,lg_id,play_name) {
  445. if(status == -1) return false;
  446. this.index = $index;
  447. if (this.data) {
  448. //处理vuex里面数据
  449. this.AddDelete(match_id,id, home, guest, name, odds, condition, odds_only,odds_code,type,p_code,$index,lg_id,play_name);
  450. //处理当前页面样式
  451. // this.modifyStyle($index,id, type);
  452. }
  453. },
  454. //跳转到赛事详情
  455. matchInfo: function(id) {
  456. this.$router.push({
  457. path: "/StRollBallBettingPage",
  458. query: { gameCode: this.game_code, home: 1 }
  459. });
  460. this.$store.dispatch("MACTH_ID", id);
  461. },
  462. /*--------------------------------------------------------------------------------*/
  463. /**
  464. * 赛事赔率玩法数据组合方法
  465. */
  466. dataGroup: function(data) {
  467. // console.log(this.data)
  468. // let homeOdds = [],
  469. // guestOdds = [];
  470. let A, B, C, D;
  471. // console.log('daa',data)
  472. let ball = this.$store.getters.getBallId;
  473. data.forEach(i =>{
  474. i.match_info.forEach((column, index) => {
  475. if (column.oddsData == null || column.oddsData.length == 0) {
  476. }
  477. else {
  478. column.oddsData.forEach(val => {
  479. if(this.betting.length > 0){
  480. this.betting.forEach(e =>{
  481. e.forEach(item =>{
  482. if(val.id == item.id){
  483. val.isTrue = true;
  484. }
  485. })
  486. })
  487. }
  488. });
  489. }
  490. });
  491. })
  492. // console.log('ddddd',data)
  493. this.data = data;
  494. // console.log('data',this.data)
  495. //更新数据和上一次的数据匹配
  496. let storage =this.previousStorage;
  497. // console.log('storege',storage)
  498. if(storage && storage != null && storage.length > 0){
  499. this.data.forEach(e =>{
  500. e.match_info.forEach(k =>{
  501. k.oddsData.forEach(item =>{
  502. storage.forEach(a =>{
  503. a.forEach(b =>{
  504. if(item.id == b.id){
  505. if(item.odds > b.odds){
  506. item.change = 'add'
  507. }else if(item.odds < b.odds){
  508. item.change = 'red';
  509. }else{
  510. item.change = '';
  511. }
  512. }
  513. })
  514. })
  515. })
  516. })
  517. })
  518. }
  519. this.previousStorage = [];
  520. this.data.forEach(e =>{
  521. e.match_info.forEach(k =>{
  522. this.previousStorage.push(k.oddsData)
  523. })
  524. })
  525. // this.previousStorage = this.data;
  526. // console.log('````', this.data)
  527. // console.log('this.previousStorage',this.previousStorage)
  528. this.$store.dispatch('GETGAMERATIO',this.data)
  529. }
  530. },
  531. /**
  532. * 计算属性
  533. */
  534. computed: {
  535. //获取投注框删除的投注信息
  536. getDeleteType() {
  537. return this.$store.getters.getDeleteType;
  538. },
  539. getIsBetting() {
  540. return this.$store.getters.getIsBetting;
  541. }
  542. },
  543. /**
  544. * 监听器
  545. */
  546. watch: {
  547. getIsBetting(val) {
  548. this.isBettingWindow = val;
  549. },
  550. // 监听删除投注
  551. getDeleteType(val) {
  552. let flag = true;
  553. this.data.forEach(e => {
  554. if (val == "all") {
  555. e.match_info.forEach(data => {
  556. data.oddsData.forEach((k, i) => {
  557. this.$set(k, "isTrue", false);
  558. });
  559. data.oddsData.forEach((k, i) => {
  560. this.$set(k, "isTrue", false);
  561. });
  562. });
  563. } else {
  564. let showData = true;
  565. e.match_info.forEach((res, index) => {
  566. res.oddsData.forEach((k, i) => {
  567. if (k.id == val) {
  568. this.$set(k, "isTrue", false);
  569. showData = true;
  570. }
  571. });
  572. });
  573. if(showData){
  574. e.match_info.forEach(data => {
  575. data.oddsData.forEach(item =>{
  576. if (item.id == val) {
  577. this.$set(item, "isTrue", false);
  578. }
  579. })
  580. });
  581. }
  582. }
  583. });
  584. },
  585. },
  586. mounted() {
  587. this.$store.dispatch("GETSHOW", true);
  588. // 获取球类,判定状态
  589. let ball = this.$store.getters.getBallId;
  590. if(ball == 'zq' || ball == 'lq'){
  591. this.ballSelt = 10;
  592. }else if(ball == 'wq'){
  593. this.ballSelt = 100;
  594. }else if(ball == 'bq'){
  595. this.ballSelt = 1000;
  596. }
  597. // 是否展示投注框
  598. if (this.$store.getters.getIsBetting == '100') {
  599. this.isBettingWindow = '100';
  600. }
  601. //获取vuex玩法已投注相对应的数据
  602. let getBetting = this.$store.getters.getBetting;
  603. if(getBetting){
  604. if(ball == 'zq'){
  605. getBetting.forEach((e,index) =>{
  606. if('concede' == e.title || 'goal_size' == e.title){
  607. this.betting.push(e.data);
  608. }
  609. })
  610. }else if(ball == 'lq'){
  611. getBetting.forEach((e,index) =>{
  612. if('concede' == e.title || 'total_size' == e.title){
  613. this.betting.push(e.data);
  614. }
  615. })
  616. }else if(ball == 'bq'){
  617. getBetting.forEach((e,index) =>{
  618. if('capot' == e.title){
  619. this.betting.push(e.data);
  620. }
  621. })
  622. }else if(ball == 'wq'){
  623. getBetting.forEach((e,index) =>{
  624. if('dishes' == e.title || 'kemp' == e.title){
  625. this.betting.push(e.data);
  626. }
  627. })
  628. }
  629. }
  630. let _this = this;
  631. this.$public.ajaxTimerFun(function(timing) {
  632. if (_this.timers) {
  633. _this.getmatchInfo("");
  634. }else{
  635. clearInterval(timing);
  636. }
  637. },(1000*10));
  638. // console.log("data", this.data);
  639. /*-----------------------*/
  640. this.getmatchInfo("");
  641. },
  642. beforeDestroy(){
  643. this.timers = false;
  644. }
  645. };
  646. </script>
  647. <style scoped>
  648. .Serch {
  649. height: 0.75rem;
  650. display: flex;
  651. justify-content: space-between;
  652. align-items: center;
  653. background-color: #363636;
  654. color: #fd8f26;
  655. font-family: "PingFang-SC-Regular";
  656. padding: 0 0.32rem;
  657. }
  658. .lock {
  659. background: #f4f4f4;
  660. }
  661. .Serch-box-input {
  662. width: 2rem;
  663. border: none;
  664. position: absolute;
  665. left: 0.5rem;
  666. top: 0.06rem;
  667. }
  668. /* .BettingWindow{
  669. z-index: 10000;
  670. position:fixed;
  671. top:0;
  672. width: 100%;
  673. } */
  674. .Serch-box-img {
  675. width: 0.3rem;
  676. height: 0.3rem;
  677. position: absolute;
  678. left: 0.1rem;
  679. top: 0.06rem;
  680. }
  681. .Serch-box-del {
  682. width: 0.2rem;
  683. height: 0.2rem;
  684. position: absolute;
  685. right: 0.2rem;
  686. }
  687. .Serch-box-home {
  688. height: 0.44rem;
  689. width: 4.73rem;
  690. background: #e4e4e4;
  691. border-radius: 0.2rem;
  692. display: flex;
  693. justify-content: space-around;
  694. align-items: center;
  695. padding-left: 0.1rem;
  696. padding-right: 0.1rem;
  697. position: relative;
  698. }
  699. .box-img {
  700. width: 0.37rem;
  701. height: 0.3rem;
  702. margin-right: 0.18rem;
  703. }
  704. .Soccer-game-title {
  705. display: flex;
  706. color: #f76649;
  707. align-items: center;
  708. width: 1.3rem;
  709. font-size: 0.3rem;
  710. }
  711. .Soccer-game-box {
  712. display: flex;
  713. left: -0.3rem;
  714. top: 0.2rem;
  715. background: #fff;
  716. background: #626262;
  717. color: #a6a6a6;
  718. height: 0.7rem;
  719. align-items: center;
  720. }
  721. .Soccer-game-src {
  722. width: 0.25rem;
  723. height: 0.25rem;
  724. }
  725. .box {
  726. padding: 0 0.32rem;
  727. color: #e1e1df;
  728. height: 0.88rem;
  729. font-size: 0.32rem;
  730. background: linear-gradient(to bottom, #999999, #6a6a6b);
  731. }
  732. .Match-title-num {
  733. width: 0.46rem;
  734. height: 0.46rem;
  735. line-height: 0.46rem;
  736. text-align: center;
  737. background: #f76649;
  738. font-size: 0.26rem;
  739. border-radius: 50%;
  740. color: #f5f5f5;
  741. }
  742. .Match-box-top-right > span {
  743. width: 1.07rem;
  744. text-align: center;
  745. }
  746. .Match-box {
  747. /* height: 2.45rem; */
  748. }
  749. .name-box {
  750. width: 4rem;
  751. height: 1.76rem;
  752. }
  753. .Match-box-top {
  754. height: 0.45rem;
  755. line-height: 0.45rem;
  756. background: #dcdcdc;
  757. font-size: 0.23rem;
  758. padding: 0 0.32rem;
  759. }
  760. .Match-box-top-num {
  761. width: 0.64rem !important;
  762. height: 0.45rem;
  763. background: #ebebeb;
  764. font-size: 0.24rem;
  765. }
  766. .Match-box {
  767. background: #f8f8f8;
  768. }
  769. .Match-bottom-right {
  770. height: 2rem;
  771. width: 2.5rem;
  772. padding: 0.1rem 0.1rem 0 0.14rem;
  773. position: relative;
  774. }
  775. .Match-list-left div {
  776. width: 1.07rem;
  777. height: 0.76rem;
  778. border: 1px solid #e4e4e4;
  779. border-radius: 0.1rem;
  780. padding: 0.1rem;
  781. margin: 0.06rem 0.08rem;
  782. }
  783. .Match-list-right div {
  784. width: 1.07rem;
  785. height: 0.76rem;
  786. border: 1px solid #e4e4e4;
  787. border-radius: 0.1rem;
  788. margin: 0.06rem 0.08rem;
  789. }
  790. .active {
  791. background: #f76649;
  792. border: none;
  793. color: #e1e1df !important;
  794. }
  795. .active span,.active i{
  796. color: #e1e1df !important;
  797. }
  798. .wqavg{
  799. width: 4.3rem;
  800. }
  801. div.wqMatch-box{
  802. height: 0.65rem;
  803. line-height: 0.3rem;
  804. }
  805. /* 赔率 */
  806. .letballHome,.letballGuest,.bigHome,.bigGuest{
  807. width: 1.07rem;
  808. height: 0.76rem;
  809. border: 1px solid #e4e4e4;
  810. border-radius: 0.1rem;
  811. margin: 0.06rem 0.08rem;
  812. /* padding: 0.1rem 0; */
  813. /* margin: 0.06rem 0.6rem 0.06rem 0; */
  814. text-align: center;
  815. }
  816. .letballGuest{
  817. position: absolute;
  818. bottom: 0.19rem;
  819. }
  820. .bigHome span,.bigGuest span,.letballHome span,.letballGuest span{
  821. display: block;
  822. }
  823. .bigHome{
  824. position: absolute;
  825. right: 0;
  826. top: 0.1rem;
  827. }
  828. .bigGuest{
  829. position: absolute;
  830. right: 0;
  831. top: 0.93rem;
  832. }
  833. .active span{
  834. color: #e1e1df !important;
  835. }
  836. .stardBig{
  837. display: flex;
  838. align-items: center;
  839. justify-content: center;
  840. }
  841. .stardBig .bigSmall{
  842. color: #9b9999;
  843. }
  844. .mg{
  845. margin-top: 0.2rem;
  846. }
  847. </style>