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