6632c1682b14c57dd17bcf8916b3996b4bb1d68d.svn-base 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339
  1. <template>
  2. <div>
  3. <div class="header-top">
  4. <!-- 头部块 -->
  5. <div class="headerA-top row vertical-center">
  6. <div class="middle row allAlignment">
  7. <div class="row item-center headerA-top-left">
  8. <h1 class="row headerA-title">
  9. <p style="color:#F76649;">HX</p>
  10. <span style="color:#FFFFFF">669</span>
  11. </h1>
  12. <!-- 头部优惠导航 -->
  13. <ul class="row headerA-nav">
  14. <li
  15. v-for="(item,index) in List"
  16. :key="index"
  17. style="margin-left:.3rem"
  18. class="row item-center pointer"
  19. :class="num==index?'active triangle':''"
  20. @click="listActive(index)"
  21. >{{item.title}}</li>
  22. </ul>
  23. </div>
  24. <!-- 登录块 -->
  25. <div class="headerA-login">
  26. <!-- 用户是否登录判断 -->
  27. <div v-show="userIsLogin==false" class="row item-center login" style="height:100%">
  28. <!-- 用户名密码 -->
  29. <div class="row center" style="width:2rem;position: relative;">
  30. <input
  31. v-model="account"
  32. onkeyup="this.value=this.value.replace(/\s+/g,'')"
  33. class="fz14"
  34. style="border-radius:.05rem 0 0 .05rem;"
  35. placeholder="用户名"
  36. type="text"
  37. >
  38. <span
  39. style="font-size:.14rem;color:red;position: absolute;left:1rem;bottom:-.25rem;display: inline-block;width:2rem;"
  40. >{{info}}</span>
  41. </div>
  42. <div class="headerA-login-pwd row center">
  43. <input
  44. class="fz14"
  45. type="password"
  46. v-model="password"
  47. onkeyup="this.value=this.value.replace(/\s+/g,'')"
  48. placeholder="用户密码"
  49. style
  50. >
  51. <button
  52. @click="login()"
  53. class="row center headerA-login-txt pointer"
  54. style="border-radius:0 .05rem .05rem 0;"
  55. >登录</button>
  56. <span class="fz16">忘记密码?</span>
  57. </div>
  58. <div
  59. @click="regShowClick()"
  60. class="row center pointer"
  61. style="width:1rem;margin-left:.2rem;background:#888;border-radius:.05rem;"
  62. >
  63. <p style="font-size:.18rem;color:#DDD;">注册</p>
  64. </div>
  65. </div>
  66. <!-- 用户已登录用户信息块 -->
  67. <div
  68. v-show="userIsLogin==true"
  69. class="row item-center loginTo"
  70. style="height:100%;padding-right:.5rem;"
  71. >
  72. <div class="row item-center">
  73. <p>你好,{{user.userName}}</p>
  74. <span
  75. style="color:#3DB8FF;margin-left:.1rem;cursor: pointer;"
  76. @click="escLogin()"
  77. >[退出]</span>
  78. <div style="width:1px;background:#ccc;height:.3rem;margin:0 .23rem;"></div>
  79. <p>
  80. 余额:
  81. <span style="color:#F76649">{{user.balance}}</span>
  82. </p>
  83. </div>
  84. <!-- 钱包 消息 用户信息 按钮 及hover激活样式 -->
  85. <div class="row item-center headerA-img pointer">
  86. <div class="row item-center">
  87. <img
  88. @mouseover="imgMT(1)"
  89. @mouseout="imgOUT()"
  90. :src="imgNum==1?img.walletHover:img.wallet"
  91. alt
  92. >
  93. <div class="userIcon">
  94. <p>
  95. 盈利:
  96. <span style="color:#02D36A">50.00</span>
  97. </p>
  98. <p>
  99. 亏损:
  100. <span style="color:#F76649">-20.00</span>
  101. </p>
  102. </div>
  103. </div>
  104. <div class="row item-center" @click="PersonalCenterTo()">
  105. <img
  106. @mouseover="imgMT(2)"
  107. @mouseout="imgOUT()"
  108. :src="imgNum==2?img.userHover:img.user"
  109. alt
  110. >
  111. <div class="userIcon">点击前往个人中心。</div>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. <!-- 头部导航 -->
  119. <div class="headerA-bottom row vertical-center">
  120. <div class="middle">
  121. <!-- 激活 -->
  122. <ul class="row headerA-list item-center">
  123. <li class="pointer row center" v-for="(item,index) in navList" @click="navActive(index,item.type_code)"
  124. :key="index"
  125. :class="{active:nav_code == item.type_code }"
  126. >{{item.name}}</li>
  127. </ul>
  128. </div>
  129. </div>
  130. </div>
  131. <div class="row vertical-center" style="padding-top:.08rem; margin-top:1.5rem">
  132. <!-- 左侧赛事数据展示 及 激活样式 /* height: 8.52rem; */ -->
  133. <div class="middle row">
  134. <div class="mainLeft scroll">
  135. <div class="mainLeft-scroll">
  136. <div v-for="(item,index) in leftData" :key="index">
  137. <div>
  138. <div class="mainLeft-title fz16 row item-center allAlignment">
  139. <div class="row item-center">
  140. <img v-if="item.code=='zq'" src="@/assets/st-imges/footballimg.png">
  141. <img v-if="item.code=='lq'" src="@/assets/st-imges/basketballimg.png">
  142. <img v-if="item.code=='bq'" src="@/assets/st-imges/baseballimg.png">
  143. <img v-if="item.code=='wq'" src="@/assets/st-imges/tennisimg.png">
  144. {{item.code=='zq'?'足球':''}}
  145. {{item.code=='lq'?'篮球':''}}
  146. {{item.code=='bq'?'棒球':''}}
  147. {{item.code=='wq'?'网球':''}}
  148. </div>
  149. <span class="mainLeft-title-num">{{item.num}}</span>
  150. </div>
  151. <ul class="mainLeft-list pointer" v-for="(items,i) in item.list" :key="i">
  152. <li
  153. class="row allAlignment hover fz14"
  154. :class="items.active==true?'active':''"
  155. @click="mainLeftClick(item.code,items.odds_code,item.code,i)"
  156. >
  157. <p>{{items.title}}</p>
  158. <p>{{items.num}}</p>
  159. </li>
  160. </ul>
  161. </div>
  162. </div>
  163. </div>
  164. </div>
  165. <!-- 中间数据展示区 -->
  166. <div :class="zoom==false?'mainactive':'main'">
  167. <!-- 此处为后加入组件所在位置 -->
  168. <div class="scroll main-center">
  169. <!-- 挡板组件 -->
  170. <div class="load" v-if="lodShow">
  171. <loading/>
  172. </div>
  173. <div v-show="!lodShow">
  174. <!-- 让球大小 -->
  175. <div v-if="play_code == 'CO'">
  176. <div v-if="ballType=='zq'">
  177. <theBallSize/>
  178. </div>
  179. <div v-else-if="ballType=='lq'">
  180. <basketballTheBallSize/>
  181. </div>
  182. <div v-else-if="ballType=='bq'">
  183. <baseballTheBallSize/>
  184. </div>
  185. <div v-else-if="ballType=='wq'">
  186. <tennisThePlateTheBureau/>
  187. </div>
  188. </div>
  189. <!-- 独赢 -->
  190. <div v-if="play_code == 'C'">
  191. <OnlyWin/>
  192. </div>
  193. <!-- 总进球数 -->
  194. <div v-if="play_code == 'TG'">
  195. <totalGoal/>
  196. </div>
  197. <!-- 半场/全场 -->
  198. <div v-if="play_code == 'HF'">
  199. <Fullhalf/>
  200. </div>
  201. <!-- 波胆 -->
  202. <div v-if="play_code == 'B'">
  203. <WaveBravery/>
  204. </div>
  205. <!-- 冠军 -->
  206. <div v-if="play_code == 'kemp'">
  207. <champion/>
  208. </div>
  209. <!-- 进球单双 -->
  210. <div v-if="play_code == 'TS'">
  211. <singleAndDouble/>
  212. </div>
  213. <!-- 球队最先/最后进球 -->
  214. <div v-if="play_code == 'FLB'">
  215. <startAndEnd/>
  216. </div>
  217. <!-- 滚球足球 -->
  218. <div v-if="play_code == 'StRollBall'">
  219. <footballRollBall/>
  220. </div>
  221. <!-- 滚球篮球 -->
  222. <div v-if="play_code == 10001">
  223. <BasketballRollBall/>
  224. </div>
  225. <!-- 滚球棒球 -->
  226. <div v-if="play_code == 10002">
  227. <baseballRollBall/>
  228. </div>
  229. <!-- 滚球网球 -->
  230. <div v-if="play_code == 10003">
  231. <tennisRollBall/>
  232. </div>
  233. <!-- 普通赛事赔率玩法 -->
  234. <div v-if="play_code == 10010">
  235. <playBetting/>
  236. </div>
  237. <!-- 足球滚球赛事赔率玩法 -->
  238. <div v-if="play_code == 10011">
  239. <zqRollBall/>
  240. </div>
  241. <!-- 篮球滚球赛事赔率玩法 -->
  242. <div v-if="play_code == 10012">
  243. <lqRollBall/>
  244. </div>
  245. <!-- 棒球滚球赛事赔率玩法 -->
  246. <div v-if="play_code == 10013">
  247. <bqRollBall/>
  248. </div>
  249. <!-- 网球滚球赛事赔率玩法 -->
  250. <div v-if="play_code == 10014">
  251. <wqRollBall/>
  252. </div>
  253. <!-- <WaveBravery /> -->
  254. <!-- 联赛选择表 -->
  255. <div v-if="play_code == 10015">
  256. <elasticFrame/>
  257. </div>
  258. </div>
  259. </div>
  260. </div>
  261. <!-- 右侧功能部分 -->
  262. <div class="scroll" :class="zoom?'mainright':'mainrightactive'">
  263. <!-- 直播区块 -->
  264. <div class="mainright-liveSystem">
  265. <div
  266. class="row center allAlignment"
  267. style="padding:0 .2rem;height:.5rem;color:#EEE;background:linear-gradient(180deg,rgba(153,153,153,1) 0%,rgba(86,86,86,1) 100%);font-size:.18rem;"
  268. >
  269. 直播中心
  270. <p
  271. class="mainright-liveSystem-btn pointer row center hover br05"
  272. @click="zoomClick()"
  273. >
  274. <img src="@/assets/st-imges/suoxiao.png" alt>
  275. </p>
  276. </div>
  277. <liveTable />
  278. </div>
  279. <!-- 投注单区块 -->
  280. <div class="mainright-betting">
  281. <div
  282. class="bettinbox row item-center"
  283. :class="bettingList?'bettinboxactive':'bettinboxinactive'"
  284. style
  285. >投注单</div>
  286. <div v-show="Limit == 0">
  287. <div
  288. class="row center"
  289. style="height:1.2rem;background:#666;color:#999;font-size:.16rem"
  290. >暂无相关数据</div>
  291. </div>
  292. <!-- 单注投注表 -->
  293. <div v-show="isBetting == 1">
  294. <oddBettingTable/>
  295. </div>
  296. <!-- 串式投注表 -->
  297. <div v-show="isBetting == 2">
  298. <eventBettingTable/>
  299. </div>
  300. </div>
  301. <!-- 联系我们 -->
  302. <div class="mainright-contactUs">
  303. <div class="mainright-contactUs-title row item-center">联系我们</div>
  304. <div class="mainright-contactUs-box">
  305. <div class="contactUs row center">
  306. <div class="contactUs-txt triangle fz14">
  307. <div class="row item-center">
  308. <div>
  309. <img src="@/assets/st-imges/dianhua.png" alt>
  310. </div>
  311. <div class="fz14" style="margin-left:.15rem; line-height: .25rem;">
  312. <p>客服热线:</p>
  313. <p>0063-9958276789</p>
  314. </div>
  315. </div>
  316. <div class="row item-center" style="margin-top:.16rem;">
  317. <div>
  318. <img src="@/assets/st-imges/xinfeng.png" alt>
  319. </div>
  320. <div class="fz14" style="margin-left:.15rem;line-height: .25rem;">
  321. <p>电邮地址:</p>
  322. <p>HX669.com@gmail.com</p>
  323. </div>
  324. </div>
  325. </div>
  326. </div>
  327. </div>
  328. </div>
  329. </div>
  330. </div>
  331. </div>
  332. <!-- 页尾 -->
  333. <div style="background:linear-gradient(180deg,rgba(153,153,153,1) 0%,rgba(86,86,86,1) 100%);">
  334. <!-- <div class="middle bottomA-top row fz14" style="margin:0 auto">
  335. <div class="bottomA-top-left">
  336. <h3>其他相关链接</h3>
  337. <ul>
  338. <li>关于我们</li>
  339. <li>网站导览</li>
  340. <li>博彩责任</li>
  341. <li>规则与条款</li>
  342. <li>隐私权政策</li>
  343. <li>代理加盟</li>
  344. </ul>
  345. </div>
  346. <div class="bottomA-top-center">
  347. <h3>是否需要帮助?</h3>
  348. <ul>
  349. <li>存款帮助</li>
  350. <li>取款帮助</li>
  351. <li>常见问题</li>
  352. <li>在线客服</li>
  353. <li>联系我们</li>
  354. </ul>
  355. </div>
  356. <div class="bottomA-top-right">
  357. <h3>支付方式</h3>
  358. <p>享受畅通无阻的存提款体验,我们的支付方式快速又安全。</p>
  359. <p>HX669支持全球主要支付方式!</p>
  360. <ul class="row item-center allAlignment" style="width:4.8rem;height:1.5rem;">
  361. <li>
  362. <img style="width:.8rem;height:.4rem" src="@/assets/st-imges/icon_quick_pay.png" alt>
  363. </li>
  364. <li>
  365. <img style="width:1.2rem;height:.5rem" src="@/assets/st-imges/icon_alipay.png" alt>
  366. </li>
  367. <li>
  368. <img style="width:1rem;height:.4rem" src="@/assets/st-imges/icon_qqpay.png" alt>
  369. </li>
  370. <li>
  371. <img style="width:1rem;height:.4rem" src="@/assets/st-imges/icon_wxpay.png" alt>
  372. </li>
  373. </ul>
  374. </div>
  375. </div> -->
  376. <div
  377. class="middle bottomA-bottom fz14 row center"
  378. style="margin:0 auto"
  379. >HX669属于HX669有限公司注册 版权所有©2019</div>
  380. </div>
  381. <div class="bigLoading" v-if="bigLoad">
  382. <bigLoading/>
  383. </div>
  384. <registered class="reg" v-if="regShow"/>
  385. </div>
  386. </template>
  387. <script>
  388. import "@/css/index.css";
  389. import liveTable from "@/components/liveTable";
  390. import navLIstData from "@/assets/navLIstData";
  391. import oddBettingTable from "@/components/oddBettingTable";
  392. import eventBettingTable from "@/components/eventBettingTable";
  393. import champion from "@/components/champion";
  394. import startAndEnd from "@/components/startAndEnd";
  395. import theBallSize from "@/components/theBallSize";
  396. import singleAndDouble from "@/components/singleAndDouble";
  397. import playBetting from "@/components/playBetting";
  398. import tennisRollBall from "@/components/tennisRollBall";
  399. import footballRollBall from "@/components/footballRollBall";
  400. import OnlyWin from "@/components/OnlyWin";
  401. import totalGoal from "@/components/totalGoal";
  402. import Fullhalf from "@/components/Fullhalf";
  403. import WaveBravery from "@/components/WaveBravery";
  404. import zqRollBall from "@/components/zqRollBall";
  405. import lqRollBall from "@/components/lqRollBall";
  406. import bqRollBall from "@/components/bqRollBall";
  407. import wqRollBall from "@/components/wqRollBall";
  408. import BasketballRollBall from "@/components/BasketballRollBall";
  409. import baseballRollBall from "@/components/baseballRollBall";
  410. import basketballTheBallSize from "@/components/basketballTheBallSize";
  411. import baseballTheBallSize from "@/components/baseballTheBallSize";
  412. import tennisThePlateTheBureau from "@/components/tennisThePlateTheBureau";
  413. import elasticFrame from "@/components/elasticFrame";
  414. import loading from "@/components/loading";
  415. import bigLoading from "@/components/bigLoading";
  416. import registered from "@/components/registered";
  417. export default {
  418. data() {
  419. return {
  420. info: "", //登录时错误提示
  421. account: "", //用户名
  422. password: "", //密码
  423. zoom: true, //缩放
  424. bettingList: true, //投注数据
  425. userIsLogin: false, // 用户是否登录
  426. user: { userName: "", balance: 0 }, // 用户信息
  427. userData: "", //用户数据
  428. img: {
  429. user: require("@/assets/st-imges/user.png"),
  430. userHover: require("@/assets/st-imges/user-hover.png"),
  431. wallet: require("@/assets/st-imges/wallet.png"),
  432. walletHover: require("@/assets/st-imges/wallet-hover.png"),
  433. eaml: require("@/assets/st-imges/emal.png"),
  434. eamlHover: require("@/assets/st-imges/emal-hover.png")
  435. }, //头部图片
  436. List: [
  437. { title: "体育赛事", num: 0 },
  438. // { title: "优惠", num: 1 },
  439. // { title: "手机版", num: 2 }
  440. ], // 头部导航列表
  441. imgNum: 0, //头部图片hover效果
  442. num: 0, //头部导航激活样式
  443. navList: [
  444. { name: "滚球", type_code: "StRollBall", id: 0 },
  445. { name: "即将", type_code: "StSoon", id: 1 },
  446. { name: "今日", type_code: "StToday", id: 2 },
  447. { name: "早盘", type_code: "StMorningPlate", id: 3 },
  448. { name: "串场", type_code: "StStringScene", id: 4 }
  449. // { name: "冠军",type_code:'StChampion', id: 5 }
  450. ],
  451. leftData: "", //左侧导航数据
  452. dataIndex: "StMorningPlatezq0", //左侧导航数据下标
  453. ball_code: "", //球类代码
  454. nav_code: "StMorningPlate", //活动代码默认早盘
  455. play_code: "CO", //滚球玩法代码默认'StRollBall'
  456. ballType: "zq", //球类型
  457. timers: true, //
  458. isBetting: 0, //显示投注窗默契不显示1=单式、2串式
  459. lodShow: false, // 小挡板显示,
  460. bigLoad: false, //大挡板显示
  461. regShow: false, //注册显示
  462. Limit:'',//
  463. };
  464. },
  465. /***
  466. * 方法
  467. */
  468. methods: {
  469. // 登录
  470. login() {
  471. // appip_source = '来源';
  472. // appuip_user = '1008'
  473. if (this.account.length > 0 && this.password.length > 0) {
  474. this.$http
  475. .post(this.$ports.login.login, {
  476. account: this.account,
  477. password: this.password
  478. })
  479. .then(res => {
  480. if (res.data.status == 1) {
  481. this.info = "";
  482. this.$public.setItem("user",res.data.data[0]);
  483. //投注限制
  484. this.$public.setItem("limit",JSON.stringify(res.data.data[0].bet_money_limit));
  485. localStorage.setItem("token", res.data.data[0].token);
  486. this.$store.dispatch("SET_TOKEN", res.data.data[0].token);
  487. this.$dialog.toast({ mes: "登录成功!", timeout: 2000 });
  488. this.userIsLogin = true;
  489. this.user.userName = res.data.data[0].name;
  490. this.user.balance = res.data.data[0].cash;
  491. this.timers = true;
  492. } else {
  493. this.userIsLogin = false;
  494. this.info = res.data.msg;
  495. }
  496. });
  497. } else {
  498. this.userIsLogin = false;
  499. this.info = "账号或密码有误";
  500. }
  501. },
  502. // 退出登录
  503. // escLogin() {
  504. // localStorage.setItem("token", "");
  505. // localStorage.setItem("user", "");
  506. // this.$dialog.toast({ mes: "退出登录", timeout: 1000 });
  507. // this.userIsLogin = false;
  508. // this.timers = false;
  509. // },
  510. escLogin() {
  511. this.$http
  512. .post(this.$ports.login.loginOut, {
  513. token: localStorage.getItem("token")
  514. })
  515. .then(res => {
  516. if (res.data.msg === "成功") {
  517. this.$dialog.toast({ mes: "退出登录成功", timeout: 2000 });
  518. localStorage.setItem("token", "");
  519. localStorage.setItem("name", "");
  520. localStorage.setItem("balance", "");
  521. this.userIsLogin = false;
  522. this.$router.push("/");
  523. } else {
  524. this.$dialog.toast({ mes: "退出登录失败", timeout: 2000 });
  525. }
  526. });
  527. },
  528. // 跳转到个人中心必须要在登录成功状态
  529. PersonalCenterTo() {
  530. if (this.userIsLogin == true) {
  531. this.$router.push("/PersonalCenter");
  532. } else {
  533. this.$dialog.toast({ mes: "未登录,请登录。", timeout: 1500 });
  534. }
  535. },
  536. //左侧激活
  537. /*---------------------------------------*/
  538. mainLeftClick(code, odds_code, type, index) {
  539. console.log('状态',code,odds_code,type,index);
  540. let activity = this.$store.getters.getActivity
  541. if (type) {
  542. this.ballType = type;
  543. } else {
  544. this.ballType = "zq";
  545. }
  546. if (this.dataIndex == activity+type + index) return false;
  547. this.$store.dispatch("SET_LEAGUEDATA",[]);
  548. //console.log(type);
  549. this.$store.dispatch("SET_BALL_CODE", type);
  550. this.dataIndex = activity+type + index;
  551. if (odds_code) {
  552. this.$store.dispatch("SET_PALY_CODE", odds_code);
  553. this.$store.dispatch("SET_CONTROLROUTING", odds_code);
  554. } else {
  555. let activity_code = "StRollBall"; //默认足球StRollBall
  556. if (type == "lq") {
  557. activity_code = 10001;
  558. } else if (type == "bq") {
  559. activity_code = 10002;
  560. } else if (type == "wq") {
  561. activity_code = 10003;
  562. }
  563. this.$store.dispatch("SET_CONTROLROUTING", activity_code);
  564. }
  565. this.leftData.forEach(e => {
  566. //if(e.code == code ){
  567. e.list.forEach(res => {
  568. if (res.odds_code == odds_code && e.code == code) {
  569. this.$set(res, "active", true);
  570. } else {
  571. this.$set(res, "active", false);
  572. }
  573. });
  574. });
  575. },
  576. // 头部激活
  577. /*--------------------------------------*/
  578. listActive(index) {
  579. this.num = index;
  580. },
  581. //活动
  582. /*--------------------------------------*/
  583. navActive(index, type_code) {
  584. // console.log(index, type_code);
  585. if (this.nav_code == type_code) return false;
  586. this.nav_code = type_code;
  587. this.$store.dispatch("SETACTIVITY", type_code);
  588. if (this.nav_code != "StRollBall") {
  589. this.$store.dispatch("SET_BALL_CODE", 'zq');
  590. this.ballType = "zq";
  591. this.$store.dispatch("SET_PALY_CODE",'CO');
  592. this.$store.dispatch("SET_CONTROLROUTING",'CO');
  593. let isBreak = false;
  594. for(let i = 0; i < navLIstData.Other.length;i++ ){
  595. for(let j = 0 ; j<navLIstData.Other[i].list.length; j++){
  596. if(navLIstData.Other[i].list[j].active){
  597. this.$set(navLIstData.Other[i].list[j], "active", false);
  598. isBreak = true;
  599. break;
  600. }
  601. }
  602. if(isBreak)break;
  603. }
  604. this.$set(navLIstData.Other[0].list[0], "active", true);
  605. } else if (this.nav_code == "StRollBall") {
  606. this.$store.dispatch("SET_BALL_CODE", 'zq');
  607. this.ballType = "zq";
  608. this.$store.dispatch("SET_CONTROLROUTING", "StRollBall");
  609. navLIstData.RollBall.forEach((res,index)=>{
  610. this.$set(res.list[0],"active", false);
  611. })
  612. this.$set(navLIstData.RollBall[0].list[0],"active", true);
  613. }
  614. if (type_code == "StStringScene") {
  615. this.$store.dispatch("SET_BETTINGTYPE", 2);
  616. } else {
  617. this.$store.dispatch("SET_BETTINGTYPE", 1);
  618. }
  619. this.getAjax(this.nav_code);
  620. },
  621. //主页右侧缩放
  622. /*-----------------------------------*/
  623. zoomClick() {
  624. this.zoom = !this.zoom;
  625. },
  626. //后面要放弃此方法
  627. imgMT(index) {
  628. this.imgNum = index;
  629. },
  630. //后面要放弃此方法
  631. imgOUT() {
  632. this.imgNum = 0;
  633. },
  634. /*----------------------------------- */
  635. //普通活动数据组合
  636. dataCombination(data) {
  637. this.pointsBallFinishing(0, data.zq);
  638. this.pointsBallFinishing(1, data.lq);
  639. this.pointsBallFinishing(2, data.bq);
  640. this.pointsBallFinishing(3, data.wq);
  641. },
  642. /*------------------------------------*/
  643. //分球处理
  644. pointsBallFinishing(num, data) {
  645. let obj = navLIstData.Other;
  646. if (data.length > 0) {
  647. obj[num].num = data[0].game_num;
  648. data.forEach(res => {
  649. obj[num].list.forEach(e => {
  650. if (e.odds_code == res.p_code) {
  651. e.num = res.code_num;
  652. }
  653. });
  654. });
  655. } else {
  656. obj[num].num = 0;
  657. obj[num].list.forEach(e => {
  658. e.num = 0;
  659. });
  660. }
  661. },
  662. /*-------------------------------------*/
  663. //滚球数据组合
  664. rollBallData(e) {
  665. let obj = navLIstData.RollBall;
  666. let zq = e.zq,lq = e.lq, wq = e.wq,bq = e.bq;
  667. obj[0].num = zq.length > 0 ? zq[0].game_num : 0;
  668. obj[0].list[0].num = zq.length > 0 ? zq[0].game_num : 0;
  669. obj[1].num = lq.length > 0 ? lq[0].game_num : 0;
  670. obj[1].list[0].num = lq.length > 0 ? lq[0].game_num : 0;
  671. obj[2].num = bq.length > 0 ? bq[0].game_num : 0;
  672. obj[2].list[0].num = bq.length > 0 ? bq[0].game_num : 0;
  673. obj[3].num = wq.length > 0 ? wq[0].game_num : 0;
  674. obj[3].list[0].num = wq.length > 0 ? wq[0].game_num : 0;
  675. this.leftData = obj;
  676. //console.log(this.leftData);
  677. },
  678. /*--------------------------------------- */
  679. //获取导航球类和玩法数量
  680. getAjax(type) {
  681. //console.log(type);
  682. this.leftData = [];
  683. this.$http.get(this.$ports.home.gameList, { type }).then(res => {
  684. let zq = [],lq = [],bq = [],wq = [];
  685. //console.log(res);
  686. if (res.data.status == 1) {
  687. if (res.data.data.length > 0) {
  688. res.data.data.forEach(e => {
  689. if (e.game_code == "zq") {
  690. zq.push(e);
  691. } else if (e.game_code == "lq") {
  692. lq.push(e);
  693. } else if (e.game_code == "bq") {
  694. bq.push(e);
  695. } else if (e.game_code == "wq") {
  696. wq.push(e);
  697. }
  698. });
  699. let obj = { zq, lq, bq, wq };
  700. if (type == "StRollBall") {
  701. this.rollBallData(obj);
  702. } else {
  703. this.dataCombination(obj);
  704. this.leftData = navLIstData.Other;
  705. }
  706. } else {
  707. if (type == "StRollBall") {
  708. this.leftData = navLIstData.RollBall;
  709. } else {
  710. this.leftData = navLIstData.initOther;
  711. }
  712. }
  713. }
  714. if (this.leftData.length > 0) {
  715. this.bigLoad = false;
  716. }
  717. });
  718. },
  719. /*------------------------------------------- */
  720. //获取玩法别名
  721. getAjaxanme: function() {
  722. this.$http
  723. .get(this.$ports.gambling.getOddsCode, {
  724. type: "p_code"
  725. })
  726. .then(res => {
  727. this.$store.dispatch("SET_PLAYALIAS", res.data.data);
  728. // console.log(res.data.data);
  729. });
  730. },
  731. // 获取个人中心用户信息
  732. getUserData() {
  733. this.$http
  734. .post(this.$ports.login.getAgent, {
  735. token: localStorage.getItem("token")
  736. })
  737. .then(res => {
  738. if (res.data.data) {
  739. this.userData = res.data.data;
  740. this.userIsLogin = true;
  741. this.user.userName = res.data.data.name;
  742. this.user.balance = res.data.data.cash;
  743. } else {
  744. this.timers = false;
  745. this.userIsLogin = false;
  746. this.user.userName ='';
  747. this.user.balance = '';
  748. localStorage.setItem("token", "");
  749. this.$dialog.alert({
  750. mes: "您好,您的登录已过期,请您前往登录",
  751. timeout: 1500
  752. });
  753. localStorage.setItem("token", "");
  754. this.userIsLogin = false;
  755. this.timers = false;
  756. }
  757. });
  758. },
  759. //每隔2分钟获取用户信息,用于判断用户是否登录过期
  760. getUserDataTime() {
  761. let _this = this;
  762. this.$public.ajaxTimerFun(timing => {
  763. if (_this.timers) {
  764. _this.getUserData();
  765. } else {
  766. clearInterval(timing);
  767. }
  768. }, 1000 * 10);
  769. },
  770. //注册框的展示
  771. regShowClick() {
  772. this.$store.dispatch("GETRGSHOW", true);
  773. },
  774. },
  775. /**
  776. * 计算属性
  777. */
  778. computed: {
  779. //获取获取路由码数据
  780. getControlRouting() {
  781. return this.$store.getters.getControlRouting;
  782. },
  783. //获取投注数量
  784. getLimit() {
  785. return this.$store.getters.getLimit;
  786. },
  787. getPassLimit(){
  788. return this.$store.getters.getPassLimit;
  789. },
  790. getLodShow() {
  791. return this.$store.getters.getLoading;
  792. },
  793. getActy() {
  794. return this.$store.getters.getActivity;
  795. },
  796. // 获取注册框状态
  797. getRgShow() {
  798. return this.$store.getters.getRgShow;
  799. },
  800. },
  801. /**
  802. * 监听器
  803. */
  804. watch: {
  805. //监听页面路由
  806. getControlRouting(val) {
  807. // console.log(val);
  808. this.play_code = val;
  809. },
  810. //是否显示投注窗口
  811. getLimit(val) { // val的值为选中数
  812. this.Limit = val;
  813. if (val > 0) {
  814. this.isBetting = 1;
  815. }
  816. },
  817. getPassLimit(val){
  818. this.Limit = val;
  819. if(val > 0){
  820. this.isBetting =2;
  821. }
  822. },
  823. getLodShow(val) {
  824. //console.log("val", val);
  825. this.lodShow = val;
  826. },
  827. getActy(val) {
  828. this.bigLoad = true;
  829. this.lodShow = false;
  830. this.isBetting = this.$store.getters.getBettingType;
  831. },
  832. getRgShow(val) {
  833. this.regShow = val;
  834. },
  835. // getToken(val) {
  836. // if (val) {
  837. // let userInfo = JSON.parse(this.$public.getItem("user"));
  838. // this.userIsLogin = true;
  839. // this.user.userName = userInfo[0].name;
  840. // this.user.balance = userInfo[0].cash;
  841. // }
  842. // }
  843. },
  844. /**
  845. * 页面初始化完成挂载
  846. */
  847. mounted() {
  848. // //活动代码activity SETACTIVITY
  849. // this.nav_code = this.$store.getters.getActivity;
  850. // //玩法代码
  851. // this.play_code = this.$store.getters.getPaly_code;
  852. // //球类代码
  853. // this.ball_code = this.$store.getters.getBallCode;
  854. //左侧默认数据
  855. this.getAjax(this.nav_code);
  856. //获取玩法代码
  857. this.getAjaxanme();
  858. // if (localStorage.getItem("token")) {
  859. // let userInfo = localStorage.getItem("user") != null ? JSON.parse(localStorage.getItem("user")) :'' ;
  860. // this.userIsLogin = true;
  861. // this.user.userName = userInfo[0].name;
  862. // this.user.balance = userInfo[0].cash;
  863. // }
  864. //登录后获取用户信息
  865. if (localStorage.getItem("token")) {
  866. this.getUserDataTime();
  867. this.getUserData();
  868. }
  869. },
  870. beforeDestroy() {
  871. this.timers = false;
  872. },
  873. components: {
  874. oddBettingTable,
  875. eventBettingTable,
  876. champion,
  877. startAndEnd,
  878. theBallSize,
  879. singleAndDouble,
  880. playBetting,
  881. tennisRollBall,
  882. footballRollBall,
  883. OnlyWin,
  884. totalGoal,
  885. Fullhalf,
  886. WaveBravery,
  887. zqRollBall,
  888. lqRollBall,
  889. bqRollBall,
  890. wqRollBall,
  891. WaveBravery,
  892. BasketballRollBall,
  893. baseballRollBall,
  894. baseballTheBallSize,
  895. basketballTheBallSize,
  896. tennisThePlateTheBureau,
  897. elasticFrame,
  898. loading,
  899. bigLoading,
  900. registered,
  901. liveTable,
  902. }
  903. };
  904. </script>
  905. <style scoped>
  906. .header-top {
  907. position: fixed;
  908. left: 0;
  909. top: 0;
  910. z-index: 9;
  911. width: 100%;
  912. }
  913. .fz16 {
  914. font-size: 0.16rem;
  915. }
  916. .fz14 {
  917. font-size: 0.14rem;
  918. }
  919. .br05 {
  920. border-radius: 0.05rem;
  921. }
  922. .hover:hover {
  923. background: #bbb;
  924. color: #f76649;
  925. }
  926. .pointer {
  927. cursor: pointer;
  928. }
  929. .headerA-top {
  930. height: 1rem;
  931. background: linear-gradient(
  932. 180deg,
  933. rgba(153, 153, 153, 1) 0%,
  934. rgba(86, 86, 86, 1) 100%
  935. );
  936. }
  937. .headerA-bottom {
  938. height: 0.5rem;
  939. background: #444444;
  940. }
  941. .headerA-title {
  942. font-size: 0.42rem;
  943. margin-left: 0.3rem;
  944. }
  945. .headerA-nav {
  946. font-size: 0.24rem;
  947. height: 100%;
  948. color: #fff;
  949. }
  950. .headerA-nav li {
  951. height: 100%;
  952. }
  953. .headerA-nav li.active {
  954. font-weight: bold;
  955. }
  956. .triangle.active::after {
  957. border-width: 0.1rem;
  958. border-left-color: #444;
  959. border-top-color: #444;
  960. left: 37%;
  961. bottom: -0.12rem;
  962. transform: rotate(45deg);
  963. }
  964. .headerA-login {
  965. height: 100%;
  966. }
  967. .headerA-login > div {
  968. height: 0.4rem;
  969. }
  970. .headerA-login div input {
  971. width: 2rem;
  972. height: 100%;
  973. border: none;
  974. background: #eeeeee;
  975. color: #999;
  976. padding-left: 0.2rem;
  977. }
  978. .headerA-login-pwd {
  979. width: 3rem;
  980. margin-left: 0.1rem;
  981. position: relative;
  982. }
  983. .headerA-login-pwd span {
  984. color: #f76649;
  985. position: absolute;
  986. left: 1rem;
  987. bottom: -0.25rem;
  988. cursor: pointer;
  989. }
  990. .headerA-login-txt {
  991. width: 1rem;
  992. height: 0.4rem;
  993. background: #f76649;
  994. border: none;
  995. color: #ffffff;
  996. font-size: 0.18rem;
  997. }
  998. .headerA-login-txt:active {
  999. background: #a83131;
  1000. }
  1001. .headerA-top-left {
  1002. width: 55%;
  1003. }
  1004. .headerA-list {
  1005. padding-left: 1.88rem;
  1006. height: 100%;
  1007. color: #ccc;
  1008. font-size: 0.18rem;
  1009. }
  1010. .headerA-list li {
  1011. width: 0.8rem;
  1012. height: 100%;
  1013. }
  1014. .headerA-list li:hover {
  1015. color: #fff;
  1016. font-weight: bold;
  1017. }
  1018. .headerA-list li.active {
  1019. color: #fff;
  1020. font-weight: bold;
  1021. position: relative;
  1022. }
  1023. .headerA-list li.active::after {
  1024. content: "";
  1025. display: inline-block;
  1026. width: 0.3rem;
  1027. height: 0.04rem;
  1028. background: #f76649;
  1029. position: absolute;
  1030. left: 32%;
  1031. bottom: 0;
  1032. }
  1033. .loginTo > div {
  1034. height: 100%;
  1035. font-size: 0.18rem;
  1036. color: #fff;
  1037. }
  1038. .headerA-img img {
  1039. width: 0.3rem;
  1040. height: 0.3rem;
  1041. margin-left: 0.2rem;
  1042. }
  1043. .headerA-img {
  1044. margin-left: 0.5rem;
  1045. }
  1046. .headerA-img > div {
  1047. position: relative;
  1048. }
  1049. .mainLeft {
  1050. width: 2.8rem;
  1051. height: 8.2rem;
  1052. overflow-y: auto;
  1053. overflow-x: hidden;
  1054. }
  1055. .mainLeft-scroll {
  1056. height: 100%;
  1057. width: 2.7rem;
  1058. background: #ccc;
  1059. }
  1060. .mainLeft-title {
  1061. height: 0.6rem;
  1062. color: #eee;
  1063. background: linear-gradient(
  1064. 180deg,
  1065. rgba(153, 153, 153, 1) 0%,
  1066. rgba(86, 86, 86, 1) 100%
  1067. );
  1068. padding: 0 0.1rem 0 0.2rem;
  1069. }
  1070. .mainLeft-title img {
  1071. width: 0.22rem;
  1072. height: 0.22rem;
  1073. margin-right: 0.16rem;
  1074. }
  1075. .mainLeft-title-num {
  1076. width: 0.4rem;
  1077. height: 0.4rem;
  1078. background: #f76649;
  1079. border-radius: 50%;
  1080. font-size: 0.1rem;
  1081. text-align: center;
  1082. line-height: 0.4rem;
  1083. }
  1084. .mainLeft-list li {
  1085. height: 0.4rem;
  1086. border-bottom: 0.01rem solid #ccc;
  1087. line-height: 0.4rem;
  1088. padding: 0 0.25rem 0 .2rem;
  1089. color: #666666;
  1090. background: #ddd;
  1091. }
  1092. .mainLeft-list li.active {
  1093. background: #fff;
  1094. border-left: 0.04rem solid #f76649;
  1095. }
  1096. .main {
  1097. width: 9rem;
  1098. /* margin: 0 .1rem; */
  1099. }
  1100. .mainactive {
  1101. width: 10rem;
  1102. /* margin: 0 0.1rem; */
  1103. /* margin-left: 0.1rem; */
  1104. }
  1105. input {
  1106. border: none;
  1107. background: #efefef;
  1108. padding-left: 0.2rem;
  1109. width: 4.6rem;
  1110. height: 0.3rem;
  1111. /* border-radius: 0.05rem 0 0 0.05rem; */
  1112. }
  1113. img {
  1114. width: 0.2rem;
  1115. height: 0.2rem;
  1116. filter: brightness(1.2)
  1117. }
  1118. .mainright {
  1119. width: 4rem;
  1120. height: 8.2rem;
  1121. overflow-x: hidden;
  1122. overflow-y: auto;
  1123. margin-left: 0.1rem;
  1124. }
  1125. .mainrightactive {
  1126. width: 3rem;
  1127. height: 7.8rem;
  1128. overflow-x: hidden;
  1129. overflow-y: auto;
  1130. /* margin-left: 0.2rem; */
  1131. }
  1132. .mainright-liveSystem {
  1133. position: relative;
  1134. }
  1135. .mainright-liveSystem-btn {
  1136. width: 0.28rem;
  1137. height: 0.28rem;
  1138. background: #555;
  1139. }
  1140. .bettinbox {
  1141. background: linear-gradient(
  1142. 180deg,
  1143. rgba(153, 153, 153, 1) 0%,
  1144. rgba(86, 86, 86, 1) 100%
  1145. );
  1146. height: 0.5rem;
  1147. font-size: 0.18rem;
  1148. color: #eee;
  1149. padding-left: 0.2rem;
  1150. }
  1151. .bettinbox::after {
  1152. border-width: 0.08rem;
  1153. left: 0.36rem;
  1154. bottom: -0.087rem;
  1155. transform: rotate(45deg);
  1156. }
  1157. .bettinboxactive::after {
  1158. border-left-color: #e5e5e5;
  1159. border-top-color: #e5e5e5;
  1160. }
  1161. .bettinboxinactive::after {
  1162. border-left-color: #777;
  1163. border-top-color: #777;
  1164. }
  1165. .mainright-betting {
  1166. margin-top: 0.2rem;
  1167. }
  1168. .mainright-contactUs {
  1169. margin-top: 0.2rem;
  1170. }
  1171. .mainright-contactUs-title {
  1172. padding-left: 0.2rem;
  1173. height: 0.5rem;
  1174. background: linear-gradient(
  1175. 180deg,
  1176. rgba(153, 153, 153, 1) 0%,
  1177. rgba(86, 86, 86, 1) 100%
  1178. );
  1179. font-size: 0.18rem;
  1180. color: #eee;
  1181. }
  1182. .mainright-contactUs-box {
  1183. height: 2.36rem;
  1184. background: url("../../assets/st-imges/contactUs.png") no-repeat;
  1185. background-size: 100% 100%;
  1186. }
  1187. .bottomA-top {
  1188. padding-top: 0.4rem;
  1189. height: 3.3rem;
  1190. color: #fff;
  1191. }
  1192. .title {
  1193. font-size: 0.18rem;
  1194. }
  1195. h3 {
  1196. font-size: 0.18rem;
  1197. margin-bottom: 0.2rem;
  1198. }
  1199. .bottomA-top div {
  1200. margin-right: 2.2rem;
  1201. flex-wrap: nowrap;
  1202. }
  1203. .bottomA-top-left li {
  1204. line-height: 0.36rem;
  1205. }
  1206. .bottomA-top-center li {
  1207. line-height: 0.36rem;
  1208. }
  1209. .bottomA-top-right p {
  1210. line-height: 0.36rem;
  1211. }
  1212. .bottomA-bottom {
  1213. color: #ccc;
  1214. height: 0.68rem;
  1215. }
  1216. .contactUs {
  1217. width: 100%;
  1218. height: 100%;
  1219. background: rgba(0, 0, 0, 0.5);
  1220. }
  1221. .contactUs-txt {
  1222. color: #fff;
  1223. width: 80%;
  1224. height: 1.6rem;
  1225. background: rgba(247, 102, 73, 0.5);
  1226. padding: 0.16rem 0.3rem;
  1227. }
  1228. .contactUs-txt div {
  1229. flex-wrap: wrap;
  1230. }
  1231. .contactUs-txt::after {
  1232. border-width: 0.15rem;
  1233. border-left-color: rgba(247, 102, 73, 0.5);
  1234. border-top-color: rgba(247, 102, 73, 0.5);
  1235. left: 45%;
  1236. bottom: -0.14rem;
  1237. transform: rotate(-135deg);
  1238. }
  1239. .betting-input {
  1240. width: 1.6rem;
  1241. height: 0.34rem;
  1242. background: #fff;
  1243. }
  1244. .betting-earn {
  1245. background: #e7ffda;
  1246. border: 1px solid #bfe2b3;
  1247. width: 1.6rem;
  1248. height: 0.34rem;
  1249. margin-left: 0.2rem;
  1250. color: #999;
  1251. padding-left: 0.1rem;
  1252. }
  1253. .eorr {
  1254. width: 3.5rem;
  1255. height: 0.5rem;
  1256. background: #a83131;
  1257. color: #fff;
  1258. }
  1259. .main-center {
  1260. height: 8rem;
  1261. overflow-x: hidden;
  1262. overflow-y: auto;
  1263. }
  1264. .elvesfigureBox li {
  1265. width: 0.3rem;
  1266. height: 0.3rem;
  1267. cursor: pointer;
  1268. }
  1269. .userIcon {
  1270. display: none;
  1271. }
  1272. .headerA-img > div:hover .userIcon {
  1273. display: block;
  1274. width: 1.3rem;
  1275. padding: 0.1rem 0.2rem;
  1276. height: 1rem;
  1277. line-height: 0.4rem;
  1278. font-size: 0.14rem;
  1279. position: absolute;
  1280. left: -0.3rem;
  1281. border-radius: 0.05rem;
  1282. z-index: 999;
  1283. bottom: -1.1rem;
  1284. background: rgba(85, 85, 85, 0.9);
  1285. box-shadow: -2px 0px 5px 1px rgba(0, 0, 0, 0.1),
  1286. 0px -2px 5px 1px rgba(0, 0, 0, 0.1), 2px 0px 5px 1px rgba(0, 0, 0, 0.1),
  1287. 0px 2px 5px 1px rgba(0, 0, 0, 0.1);
  1288. }
  1289. .login div {
  1290. height: 0.4rem;
  1291. }
  1292. .bigLoading {
  1293. position: fixed;
  1294. z-index: 999;
  1295. left: 0;
  1296. top: 0;
  1297. width: 100%;
  1298. height: 100%;
  1299. }
  1300. </style>