21557a17175cd6e47c8635ae87110b228e290944.svn-base 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663
  1. <template>
  2. <div>
  3. <div class="box">
  4. <div class="row allAlignment center head_on_box">
  5. <p
  6. class="logo"
  7. style="font-size:.6rem;color:#E1E1DF;font-family: 'Franklin Gothic Medium'"
  8. >
  9. <i style="color:#F76649;">HX</i>669
  10. </p>
  11. <p style="color:#fffffe;font-size:.36rem">投注记录</p>
  12. <!-- <img class="log" src="../assets/st-imges/indexlogo.png" alt=""> -->
  13. <div class="row allAlignment center">
  14. <img class="user-ion" @click="toRouter()" src="@/assets/st-imges/close.png" alt>
  15. <!-- <div v-if="nameShow" class="row allAlignment center username">
  16. {{name}}
  17. </div>-->
  18. <img
  19. style="margin-left: 0.44rem;"
  20. class="user-ion"
  21. src="@/assets/st-imges/contact.png"
  22. alt
  23. >
  24. </div>
  25. </div>
  26. </div>
  27. <div class="boxIn row item-center">
  28. <div class="date row center">
  29. <yd-button-group>
  30. <yd-button size="large" bgcolor="rgba(0,0,0,0)" @click.native="openStart">{{startTime}}</yd-button>
  31. </yd-button-group>
  32. </div>
  33. <p style="margin:0 .22rem">至</p>
  34. <div class="date row center">
  35. <yd-button-group>
  36. <yd-button size="large" bgcolor="rgba(0,0,0,0)" @click.native="openEnd">
  37. <div>{{endTime}}</div>
  38. </yd-button>
  39. </yd-button-group>
  40. </div>
  41. <button class="dateBtn" @click="reset()">查询</button>
  42. </div>
  43. <div
  44. class="row center average betting-btn"
  45. style="height:.88rem;background:#f4f4f4;margin:.1rem 0;"
  46. >
  47. <button
  48. :class="recordConditions==1?'active':''"
  49. style=" border-radius: .05rem;"
  50. @click="recordCode(1)"
  51. >单式投注记录</button>
  52. <button
  53. :class="recordConditions==2?'active':''"
  54. style=" border-radius: .05rem;"
  55. @click="recordCode(2)"
  56. >串式投注记录</button>
  57. </div>
  58. <div class="row classify average">
  59. <div
  60. v-for="(item,index) in table"
  61. :class="item.id==classifynum?'classifyactive':''"
  62. :key="index"
  63. @click="classifyclick(index)"
  64. >{{item.title}}</div>
  65. </div>
  66. <div>
  67. <div class="datalist">
  68. <yd-infinitescroll :callback="loadList" :distance="200" ref="infinitescrollDemo">
  69. <yd-list theme="5" slot="list">
  70. <yd-list-item v-for="(item,index) in list" :key="index">
  71. <yd-list-other slot="other">
  72. <div
  73. v-if="recordConditions==1"
  74. style="width:100%;padding:0 .2rem;"
  75. class="list-box"
  76. >
  77. <div class="row average center" style="margin-bottom:.1rem;">
  78. <div style="width:56%;height:100%;">
  79. <p>{{item.home_team}}vs{{item.guest_team}}</p>
  80. <p>{{item.odds_name}}</p>
  81. <p>{{item.odds_name.slice(item.odds_name.lastIndexOf('|')+1)}}&emsp;{{(item.odds_name.slice(item.odds_name.lastIndexOf('|')+1)=='独赢'?item.condition=='1'?'主队':item.condition=='2'?'客队':'和局':item.condition)+'@' + item.odds}}</p>
  82. <p>投注额:{{item.bet_money}}</p>
  83. </div>
  84. <div style="width:44%;padding:0 .1rem">
  85. <p>
  86. 赢/输:
  87. <span style="color:red">{{item.winMoney==0?'无':item.winMoney}}</span>
  88. </p>
  89. <p>可赢额:{{item.willMoney}}</p>
  90. <div class="row">
  91. <p
  92. class="row center"
  93. :class="item.addBet!=1?'bg':''"
  94. :style="item.addBet==1?'background:#f76649;':'background:#aaa;'"
  95. style="width:1rem;height:.4rem;border-radius: .25rem;color:#f4f4f4;margin-top:.1rem;"
  96. >加注</p>
  97. <div
  98. class="row center"
  99. @click="detailsShow(index)"
  100. style="width:1rem;height:.4rem;border-radius: .25rem;color:#f4f4f4;margin-top:.1rem;background:#aaa;font-size:.5rem;margin-left:.1rem;margin-bottom:.2rem;"
  101. >
  102. <img
  103. v-if="details!=index"
  104. style="width:.25rem;height:.25rem;"
  105. src="@/assets/st-imges/jia.png"
  106. >
  107. <img
  108. v-if="details==index"
  109. style="width:.3rem;height:.3rem;"
  110. src="@/assets/st-imges/jian.png"
  111. >
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. <div
  117. v-show="details === index"
  118. style="width:100%;height:2rem;border-top:.01rem solid #aaa;padding-top:.1rem;"
  119. >
  120. <div>
  121. <span>{{item.lg_name}}</span>
  122. </div>
  123. <div class="row item-center">
  124. <span>投注时间:</span>
  125. <span>{{item.ctime}}</span>
  126. </div>
  127. <div class="row item-center">
  128. <span>开赛时间:</span>
  129. <span>{{item.match_date}}&emsp;{{item.match_time}}</span>
  130. </div>
  131. <div>
  132. <span>订单号:</span>
  133. <span>{{item.order_id}}</span>
  134. </div>
  135. <div>
  136. <span>赛果:</span>
  137. <span style="color:red">{{item.matchResult==''?'无':item.matchResult}}</span>
  138. </div>
  139. </div>
  140. </div>
  141. <div v-if="recordConditions==2" style="width:100%;">
  142. <div class="list-box row average center">
  143. <div style="width:100%;">
  144. <p
  145. class="row allAlignment item-center"
  146. style="height:.6rem;background:#a0a0a0;color:#f4f4f4;margin-bottom:.2rem;padding:0 .2rem;"
  147. >
  148. <span>订单号:{{item.order_id}}</span>
  149. <span>可赢额:{{item.prize_money}}</span>
  150. </p>
  151. <div
  152. v-for="(items,i) in item.money_buy"
  153. :key="i"
  154. style="width:100%;margin-bottom:.2rem;padding:.1rem .5rem;background:#fff;border-radius: .08rem"
  155. >
  156. <div class="row average center">
  157. <div style="width:56%;height:100%;">
  158. <p>{{items.home_team}}vs{{items.guest_team}}</p>
  159. <p>{{items.odds_name}}</p>
  160. <p>{{items.odds_name.slice(items.odds_name.lastIndexOf('|')+1)}}&emsp;{{(items.odds_name.slice(items.odds_name.lastIndexOf('|')+1)=='独赢'?items.condition=='1'?'主队':items.condition=='2'?'客队':'和局':items.condition)+'@' + items.odds}}</p>
  161. <p>投注额:{{items.bet_money}}</p>
  162. </div>
  163. <div style="width:50%;height:100%;" class="list-txt">
  164. <p>
  165. 审核:
  166. <span
  167. style="color:red"
  168. >{{items.status==0?'待开奖':items.status==1?'中奖':'未中奖'}}</span>
  169. </p>
  170. <p>可赢额:{{item.money}}</p>
  171. <div class="row">
  172. <p
  173. class="row center"
  174. :class="items.addBet!=1?'bg':''"
  175. :style="items.addBet==1?'background:#f76649;':'background:#aaa;'"
  176. style="width:1rem;height:.4rem;border-radius: .25rem;color:#f4f4f4;margin-top:.1rem;"
  177. >加注</p>
  178. <div
  179. class="row center"
  180. @click="oddShow(index,i)"
  181. style="width:1rem;height:.4rem;border-radius: .25rem;color:#f4f4f4;margin-top:.1rem;background:#aaa;font-size:.5rem;margin-left:.1rem;margin-bottom:.2rem;"
  182. >
  183. <img
  184. v-if="!items.istrue"
  185. style="width:.25rem;height:.25rem;"
  186. src="@/assets/st-imges/jia.png"
  187. >
  188. <img
  189. v-if="items.istrue"
  190. style="width:.3rem;height:.3rem;"
  191. src="@/assets/st-imges/jian.png"
  192. >
  193. </div>
  194. </div>
  195. </div>
  196. </div>
  197. <div
  198. v-if="items.istrue"
  199. style="width:100%;height:2rem;border-top:.01rem solid #aaa;padding-top:.2rem;"
  200. >
  201. <div>联赛:{{items.lg_name}}</div>
  202. <div class="row item-center">
  203. <span>投注时间:</span>
  204. <span>{{item.money_time}}</span>
  205. </div>
  206. <div class="row item-center">
  207. <span>开赛时间:{{items.match_date}}&emsp;{{items.match_time}}</span>
  208. <span></span>
  209. </div>
  210. <div>
  211. <span>订单号:</span>
  212. <span>{{items.batch_id}}</span>
  213. </div>
  214. <div>
  215. <span>赛果:</span>
  216. <span style="color:red">{{items.matchResult==''?'无':items.matchResult}}</span>
  217. </div>
  218. </div>
  219. </div>
  220. </div>
  221. </div>
  222. </div>
  223. </yd-list-other>
  224. </yd-list-item>
  225. </yd-list>
  226. </yd-infinitescroll>
  227. </div>
  228. </div>
  229. <yd-cell-group style="display:none;">
  230. <yd-cell-item arrow>
  231. <yd-datetime
  232. type="date"
  233. ref="datetimeStart"
  234. :end-date="endTime"
  235. slot="right"
  236. v-model="startTime"
  237. ></yd-datetime>
  238. </yd-cell-item>
  239. </yd-cell-group>
  240. <yd-cell-group style="display:none;">
  241. <yd-cell-item arrow>
  242. <yd-datetime
  243. type="date"
  244. ref="datetimeEnd"
  245. :start-date="startTime"
  246. :end-date="date"
  247. slot="right"
  248. v-model="endTime"
  249. ></yd-datetime>
  250. </yd-cell-item>
  251. </yd-cell-group>
  252. </div>
  253. </template>
  254. <script>
  255. import "@/css/index.css";
  256. export default {
  257. name: "BettingRecord",
  258. data() {
  259. return {
  260. img: require("@/assets/st-imges/date.png"),
  261. img1: require("@/assets/st-imges/home.png"),
  262. img2: require("@/assets/st-imges/gengduo-1.png"),
  263. active: 0,
  264. list: '',
  265. // 当前时间 同时也是日历结束时间
  266. date: "",
  267. // 日历开始时间
  268. startDate: "",
  269. // 查询开始时间
  270. startTime: "",
  271. // 查询结束时间
  272. endTime: "",
  273. recordConditions: 1,
  274. table: [
  275. { title: "待开奖", id: 0 },
  276. { title: "中奖", id: 1 },
  277. { title: "未中奖", id: 2 }
  278. ],
  279. classifynum: 0,
  280. // 分页开始页
  281. page: 1,
  282. // 分页数据条数
  283. pageSize: 10,
  284. timers: true,
  285. details: 99999
  286. };
  287. },
  288. methods: {
  289. oddShow(index, odd) {
  290. this.list.forEach(e=>{
  291. if(e.money_buy){
  292. e.money_buy.forEach(a=>{
  293. this.$set(a,'istrue',a.istrue?true:false)
  294. })
  295. }
  296. })
  297. this.$set(this.list[index].money_buy[odd],'istrue',this.list[index].money_buy[odd].istrue?false:true)
  298. this.$forceUpdate()
  299. },
  300. detailsShow(num) {
  301. if (this.details == num) {
  302. this.details = 99999;
  303. } else {
  304. this.details = num;
  305. }
  306. },
  307. //判断登录是否过期
  308. getuserData() {
  309. if (localStorage.getItem("token")) {
  310. this.$http
  311. .post(this.$ports.login.getAgent, {
  312. token: localStorage.getItem("token")
  313. })
  314. .then(res => {
  315. if (res.data.status == -4001) {
  316. this.$store.dispatch("SET_TOKEN", "");
  317. this.$store.dispatch("GET_ISSHOW", false);
  318. this.$dialog.toast({
  319. mes: "对不起您的登录已过期,请您重新登录",
  320. timeout: 3000
  321. });
  322. this.$router.push("/");
  323. }
  324. });
  325. }
  326. },
  327. reset() {
  328. this.list = '';
  329. this.page = 1;
  330. // 重置下拉加载
  331. this.$refs.infinitescrollDemo.$emit("ydui.infinitescroll.reInit");
  332. this.loadList();
  333. },
  334. //投注类型查询
  335. recordCode(num) {
  336. this.recordConditions = num;
  337. this.reset();
  338. },
  339. // 导航
  340. toRouter() {
  341. this.$router.go(-2);
  342. },
  343. // 初始化时间
  344. initialTime() {
  345. // 现在的时间
  346. let date = new Date();
  347. // 日历开始时间
  348. let date2 = new Date(date);
  349. date2.setMonth(date.getMonth() - 3);
  350. this.startDate = `${date2.getFullYear()}-${
  351. date2.getMonth() + 1 < 10
  352. ? "0" + (date2.getMonth() + 1)
  353. : date2.getMonth() + 1
  354. }-${date2.getDate() < 10 ? "0" + date2.getDate() : date2.getDate()}`;
  355. this.date = `${date.getFullYear()}-${
  356. date.getMonth() + 1 < 10
  357. ? "0" + (date.getMonth() + 1)
  358. : date.getMonth() + 1
  359. }-${date.getDate() < 10 ? "0" + date.getDate() : date.getDate()}`;
  360. // 查询结束时间
  361. this.endTime = `${date.getFullYear()}-${
  362. date.getMonth() + 1 < 10
  363. ? "0" + (date.getMonth() + 1)
  364. : date.getMonth() + 1
  365. }-${date.getDate() < 10 ? "0" + date.getDate() : date.getDate()}`;
  366. this.startTime = `${date.getFullYear()}-${
  367. date.getMonth() - 2 < 10
  368. ? "0" + (date.getMonth() - 2)
  369. : date.getMonth() - 2
  370. }-${date.getDate() < 10 ? "0" + date.getDate() : date.getDate()}`;
  371. // console.log(this.startDate);
  372. // console.log(this.endTime, "bbb");
  373. // console.log(this.startTime, "cccc");
  374. },
  375. // 发送请求
  376. loadList() {
  377. // 补全时间
  378. let date = new Date();
  379. let hours = date.getHours();
  380. let min = date.getMinutes();
  381. let sec = date.getSeconds();
  382. this.$http
  383. .post(this.$ports.login.bettingRecord, {
  384. currentPage: this.page,
  385. pageSize: this.pageSize,
  386. startTime: this.startTime + " 00:00:00",
  387. endTime:
  388. this.endTime +
  389. " " +
  390. (hours < 10 ? "0" + hours : hours) +
  391. ":" +
  392. (min < 10 ? "0" + min : min) +
  393. ":" +
  394. (sec < 10 ? "0" + sec : sec),
  395. result: this.classifynum,
  396. token: localStorage.getItem("token"),
  397. type: this.recordConditions
  398. })
  399. .then(res => {
  400. console.log(res);
  401. /* 单次请求数据完毕 */
  402. if (res.data.data) {
  403. let table = res.data.data.list;
  404. this.list = [...this.list, ...table];
  405. console.log(this.list, "我的");
  406. if (res.data.data.list.length < 10) {
  407. this.$dialog.toast({ mes: "当前已经没有记录", timeout: 1500 });
  408. /* 所有数据加载完毕 */
  409. this.$refs.infinitescrollDemo.$emit(
  410. "ydui.infinitescroll.loadedDone"
  411. );
  412. return;
  413. } else {
  414. /* 单次请求数据完毕 */
  415. this.$refs.infinitescrollDemo.$emit(
  416. "ydui.infinitescroll.finishLoad"
  417. );
  418. this.page++;
  419. }
  420. }
  421. });
  422. },
  423. // 点击待开奖,中奖未中奖
  424. classifyclick(i) {
  425. this.classifynum = i;
  426. this.reset();
  427. },
  428. // 日历开关
  429. openStart() {
  430. this.$refs.datetimeStart.open();
  431. },
  432. openEnd() {
  433. this.$refs.datetimeEnd.open();
  434. }
  435. },
  436. mounted() {
  437. this.initialTime();
  438. this.reset();
  439. let _this = this;
  440. this.$public.ajaxTimerFun(function(timing) {
  441. if (_this.timers) {
  442. _this.getuserData();
  443. } else {
  444. clearInterval(timing);
  445. }
  446. }, 1000 * 60);
  447. },
  448. beforeDestroy() {
  449. this.timers = false;
  450. }
  451. };
  452. </script>
  453. <style scoped>
  454. div /deep/ .yd-list-img {
  455. display: none;
  456. }
  457. .list-txt p {
  458. height: 100%;
  459. }
  460. .list-txt {
  461. }
  462. .bg {
  463. background: #f76649;
  464. }
  465. .yd-list {
  466. background: rgba(0, 0, 0, 0);
  467. padding: 0;
  468. }
  469. .list-box {
  470. width: 100%;
  471. height: 100%;
  472. font-size: 0.26rem;
  473. background: #f8f8f8;
  474. margin-bottom: 0.1rem;
  475. margin: 0 auto;
  476. }
  477. .yd-btn-block {
  478. height: 100%;
  479. width: 100%;
  480. }
  481. .dateBtn {
  482. width: 0.94rem;
  483. height: 0.6rem;
  484. border: none;
  485. border-radius: 0.08rem;
  486. background-image: linear-gradient(7deg, #565656 0%, #999999 100%),
  487. linear-gradient(#4a4949, #4a4949);
  488. color: #ffffff;
  489. margin-left: 0.22rem;
  490. }
  491. .boxIn {
  492. background: #e4e4e4;
  493. height: 0.88rem;
  494. padding: 0 0.32rem;
  495. }
  496. .betting-btn button {
  497. height: 0.6rem;
  498. border: none;
  499. width: 2rem;
  500. background: #a0a0a0;
  501. color: #dcdcdc;
  502. }
  503. .betting-btn button.active {
  504. background: #dcdcdc;
  505. color: #363636 !important;
  506. }
  507. .listbox p {
  508. width: 5rem;
  509. height: 0.45rem;
  510. }
  511. .paging {
  512. width: 100%;
  513. height: 0.88rem;
  514. position: absolute;
  515. bottom: 0;
  516. }
  517. .paging p {
  518. width: 0.6rem;
  519. height: 0.6rem;
  520. margin-left: 0.05rem;
  521. border-radius: 0.08rem;
  522. background: #ccc;
  523. display: flex;
  524. justify-content: center;
  525. align-items: center;
  526. color: #363636;
  527. }
  528. .paging p input {
  529. width: 0.6rem;
  530. height: 0.6rem;
  531. background: #ebebeb;
  532. border: 2px solid #ccc;
  533. border-radius: 0.08rem;
  534. }
  535. .paging p button {
  536. width: 0.6rem;
  537. height: 0.6rem;
  538. border: none;
  539. background: #555;
  540. color: #efefef;
  541. display: flex;
  542. justify-content: center;
  543. align-items: center;
  544. border-radius: 0.08rem;
  545. }
  546. .paging p button:active {
  547. background: rgb(126, 125, 125);
  548. color: #ccc;
  549. }
  550. .datalistbox {
  551. height: 2.2rem;
  552. margin-top: 0.3rem;
  553. background: #efefef;
  554. padding: 0.2rem 0.3rem;
  555. font-size: 0.28rem;
  556. color: #555555;
  557. line-height: 0.4rem;
  558. }
  559. .datalist {
  560. position: relative;
  561. }
  562. .datalistlet {
  563. background-color: #cccccc;
  564. }
  565. .datalist .active {
  566. background: #f76649 !important;
  567. color: #efefef !important;
  568. }
  569. .msg {
  570. height: 0.88rem;
  571. margin-top: 0.3rem;
  572. color: #ccc;
  573. background: #333;
  574. }
  575. .classifyactive {
  576. color: #f76649;
  577. border-bottom: 2px solid #f76649;
  578. }
  579. .classify {
  580. height: 0.88rem;
  581. font-size: 0.3rem;
  582. line-height: 0.66rem;
  583. font-weight: normal;
  584. color: #777777;
  585. background-color: #efefef;
  586. padding: 0.1rem 0;
  587. }
  588. .active {
  589. color: rgb(247, 102, 73) !important;
  590. }
  591. .box {
  592. background: #ebebeb;
  593. padding-left: 0.14rem;
  594. }
  595. .date {
  596. width: 2.5rem;
  597. height: 0.6rem;
  598. border-radius: 0.25rem;
  599. background: #ccc;
  600. }
  601. #NavSlide {
  602. width: 100%;
  603. overflow: hidden;
  604. }
  605. #NavSlide nav {
  606. padding-top: 0.1rem;
  607. display: -webkit-box;
  608. display: -ms-flexbox;
  609. display: flex;
  610. -webkit-box-align: middle;
  611. -ms-flex-align: middle;
  612. align-items: middle;
  613. overflow: auto;
  614. }
  615. div /deep/ .yd-datetime-content,
  616. div /deep/ .yd-datetime-shade,
  617. div /deep/ .yd-datetime-indicator {
  618. height: 2rem !important;
  619. }
  620. div /deep/ .yd-button {
  621. padding: 0;
  622. width: 100%;
  623. height: 100%;
  624. }
  625. div /deep/ .yd-button button {
  626. margin: 0;
  627. border-radius: 0;
  628. }
  629. #NavSlide p {
  630. text-align: center;
  631. font-size: 0.28rem;
  632. -ms-flex-negative: 0;
  633. flex-shrink: 0;
  634. padding: 0 0.1rem;
  635. color: #b8b8b8;
  636. }
  637. /* #NavSlide p a{
  638. color: #E5E5E5;
  639. text-decoration: none;
  640. } */
  641. #NavSlide p span.active {
  642. color: #363636;
  643. }
  644. .head_on_box {
  645. padding: 0 0.32rem;
  646. }
  647. .box {
  648. height: 0.88rem;
  649. background: linear-gradient(to bottom, #999999, #6a6a6b);
  650. overflow: hidden;
  651. }
  652. .user-ion {
  653. width: 0.3rem;
  654. height: 0.3rem;
  655. }
  656. #NavSlide p {
  657. width: 1.1rem;
  658. }
  659. </style>