| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663 |
- <template>
- <div>
- <div class="box">
- <div class="row allAlignment center head_on_box">
- <p
- class="logo"
- style="font-size:.6rem;color:#E1E1DF;font-family: 'Franklin Gothic Medium'"
- >
- <i style="color:#F76649;">HX</i>669
- </p>
- <p style="color:#fffffe;font-size:.36rem">投注记录</p>
- <!-- <img class="log" src="../assets/st-imges/indexlogo.png" alt=""> -->
- <div class="row allAlignment center">
- <img class="user-ion" @click="toRouter()" src="@/assets/st-imges/close.png" alt>
- <!-- <div v-if="nameShow" class="row allAlignment center username">
- {{name}}
- </div>-->
- <img
- style="margin-left: 0.44rem;"
- class="user-ion"
- src="@/assets/st-imges/contact.png"
- alt
- >
- </div>
- </div>
- </div>
- <div class="boxIn row item-center">
- <div class="date row center">
- <yd-button-group>
- <yd-button size="large" bgcolor="rgba(0,0,0,0)" @click.native="openStart">{{startTime}}</yd-button>
- </yd-button-group>
- </div>
- <p style="margin:0 .22rem">至</p>
- <div class="date row center">
- <yd-button-group>
- <yd-button size="large" bgcolor="rgba(0,0,0,0)" @click.native="openEnd">
- <div>{{endTime}}</div>
- </yd-button>
- </yd-button-group>
- </div>
- <button class="dateBtn" @click="reset()">查询</button>
- </div>
- <div
- class="row center average betting-btn"
- style="height:.88rem;background:#f4f4f4;margin:.1rem 0;"
- >
- <button
- :class="recordConditions==1?'active':''"
- style=" border-radius: .05rem;"
- @click="recordCode(1)"
- >单式投注记录</button>
- <button
- :class="recordConditions==2?'active':''"
- style=" border-radius: .05rem;"
- @click="recordCode(2)"
- >串式投注记录</button>
- </div>
- <div class="row classify average">
- <div
- v-for="(item,index) in table"
- :class="item.id==classifynum?'classifyactive':''"
- :key="index"
- @click="classifyclick(index)"
- >{{item.title}}</div>
- </div>
- <div>
- <div class="datalist">
- <yd-infinitescroll :callback="loadList" :distance="200" ref="infinitescrollDemo">
- <yd-list theme="5" slot="list">
- <yd-list-item v-for="(item,index) in list" :key="index">
- <yd-list-other slot="other">
- <div
- v-if="recordConditions==1"
- style="width:100%;padding:0 .2rem;"
- class="list-box"
- >
- <div class="row average center" style="margin-bottom:.1rem;">
- <div style="width:56%;height:100%;">
- <p>{{item.home_team}}vs{{item.guest_team}}</p>
- <p>{{item.odds_name}}</p>
- <p>{{item.odds_name.slice(item.odds_name.lastIndexOf('|')+1)}} {{(item.odds_name.slice(item.odds_name.lastIndexOf('|')+1)=='独赢'?item.condition=='1'?'主队':item.condition=='2'?'客队':'和局':item.condition)+'@' + item.odds}}</p>
- <p>投注额:{{item.bet_money}}</p>
- </div>
- <div style="width:44%;padding:0 .1rem">
- <p>
- 赢/输:
- <span style="color:red">{{item.winMoney==0?'无':item.winMoney}}</span>
- </p>
- <p>可赢额:{{item.willMoney}}</p>
- <div class="row">
- <p
- class="row center"
- :class="item.addBet!=1?'bg':''"
- :style="item.addBet==1?'background:#f76649;':'background:#aaa;'"
- style="width:1rem;height:.4rem;border-radius: .25rem;color:#f4f4f4;margin-top:.1rem;"
- >加注</p>
- <div
- class="row center"
- @click="detailsShow(index)"
- style="width:1rem;height:.4rem;border-radius: .25rem;color:#f4f4f4;margin-top:.1rem;background:#aaa;font-size:.5rem;margin-left:.1rem;margin-bottom:.2rem;"
- >
- <img
- v-if="details!=index"
- style="width:.25rem;height:.25rem;"
- src="@/assets/st-imges/jia.png"
- >
- <img
- v-if="details==index"
- style="width:.3rem;height:.3rem;"
- src="@/assets/st-imges/jian.png"
- >
- </div>
- </div>
- </div>
- </div>
- <div
- v-show="details === index"
- style="width:100%;height:2rem;border-top:.01rem solid #aaa;padding-top:.1rem;"
- >
- <div>
- <span>{{item.lg_name}}</span>
- </div>
- <div class="row item-center">
- <span>投注时间:</span>
- <span>{{item.ctime}}</span>
- </div>
- <div class="row item-center">
- <span>开赛时间:</span>
- <span>{{item.match_date}} {{item.match_time}}</span>
- </div>
- <div>
- <span>订单号:</span>
- <span>{{item.order_id}}</span>
- </div>
- <div>
- <span>赛果:</span>
- <span style="color:red">{{item.matchResult==''?'无':item.matchResult}}</span>
- </div>
- </div>
- </div>
- <div v-if="recordConditions==2" style="width:100%;">
- <div class="list-box row average center">
- <div style="width:100%;">
- <p
- class="row allAlignment item-center"
- style="height:.6rem;background:#a0a0a0;color:#f4f4f4;margin-bottom:.2rem;padding:0 .2rem;"
- >
- <span>订单号:{{item.order_id}}</span>
- <span>可赢额:{{item.prize_money}}</span>
- </p>
- <div
- v-for="(items,i) in item.money_buy"
- :key="i"
- style="width:100%;margin-bottom:.2rem;padding:.1rem .5rem;background:#fff;border-radius: .08rem"
- >
- <div class="row average center">
- <div style="width:56%;height:100%;">
- <p>{{items.home_team}}vs{{items.guest_team}}</p>
- <p>{{items.odds_name}}</p>
- <p>{{items.odds_name.slice(items.odds_name.lastIndexOf('|')+1)}} {{(items.odds_name.slice(items.odds_name.lastIndexOf('|')+1)=='独赢'?items.condition=='1'?'主队':items.condition=='2'?'客队':'和局':items.condition)+'@' + items.odds}}</p>
- <p>投注额:{{items.bet_money}}</p>
- </div>
- <div style="width:50%;height:100%;" class="list-txt">
- <p>
- 审核:
- <span
- style="color:red"
- >{{items.status==0?'待开奖':items.status==1?'中奖':'未中奖'}}</span>
- </p>
- <p>可赢额:{{item.money}}</p>
- <div class="row">
- <p
- class="row center"
- :class="items.addBet!=1?'bg':''"
- :style="items.addBet==1?'background:#f76649;':'background:#aaa;'"
- style="width:1rem;height:.4rem;border-radius: .25rem;color:#f4f4f4;margin-top:.1rem;"
- >加注</p>
- <div
- class="row center"
- @click="oddShow(index,i)"
- style="width:1rem;height:.4rem;border-radius: .25rem;color:#f4f4f4;margin-top:.1rem;background:#aaa;font-size:.5rem;margin-left:.1rem;margin-bottom:.2rem;"
- >
- <img
- v-if="!items.istrue"
- style="width:.25rem;height:.25rem;"
- src="@/assets/st-imges/jia.png"
- >
- <img
- v-if="items.istrue"
- style="width:.3rem;height:.3rem;"
- src="@/assets/st-imges/jian.png"
- >
- </div>
- </div>
- </div>
- </div>
- <div
- v-if="items.istrue"
- style="width:100%;height:2rem;border-top:.01rem solid #aaa;padding-top:.2rem;"
- >
- <div>联赛:{{items.lg_name}}</div>
- <div class="row item-center">
- <span>投注时间:</span>
- <span>{{item.money_time}}</span>
- </div>
- <div class="row item-center">
- <span>开赛时间:{{items.match_date}} {{items.match_time}}</span>
- <span></span>
- </div>
- <div>
- <span>订单号:</span>
- <span>{{items.batch_id}}</span>
- </div>
- <div>
- <span>赛果:</span>
- <span style="color:red">{{items.matchResult==''?'无':items.matchResult}}</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </yd-list-other>
- </yd-list-item>
- </yd-list>
- </yd-infinitescroll>
- </div>
- </div>
- <yd-cell-group style="display:none;">
- <yd-cell-item arrow>
- <yd-datetime
- type="date"
- ref="datetimeStart"
- :end-date="endTime"
- slot="right"
- v-model="startTime"
- ></yd-datetime>
- </yd-cell-item>
- </yd-cell-group>
- <yd-cell-group style="display:none;">
- <yd-cell-item arrow>
- <yd-datetime
- type="date"
- ref="datetimeEnd"
- :start-date="startTime"
- :end-date="date"
- slot="right"
- v-model="endTime"
- ></yd-datetime>
- </yd-cell-item>
- </yd-cell-group>
- </div>
- </template>
- <script>
- import "@/css/index.css";
- export default {
- name: "BettingRecord",
- data() {
- return {
- img: require("@/assets/st-imges/date.png"),
- img1: require("@/assets/st-imges/home.png"),
- img2: require("@/assets/st-imges/gengduo-1.png"),
- active: 0,
- list: '',
- // 当前时间 同时也是日历结束时间
- date: "",
- // 日历开始时间
- startDate: "",
- // 查询开始时间
- startTime: "",
- // 查询结束时间
- endTime: "",
- recordConditions: 1,
- table: [
- { title: "待开奖", id: 0 },
- { title: "中奖", id: 1 },
- { title: "未中奖", id: 2 }
- ],
- classifynum: 0,
- // 分页开始页
- page: 1,
- // 分页数据条数
- pageSize: 10,
- timers: true,
- details: 99999
- };
- },
- methods: {
- oddShow(index, odd) {
- this.list.forEach(e=>{
- if(e.money_buy){
- e.money_buy.forEach(a=>{
- this.$set(a,'istrue',a.istrue?true:false)
- })
- }
- })
- this.$set(this.list[index].money_buy[odd],'istrue',this.list[index].money_buy[odd].istrue?false:true)
- this.$forceUpdate()
- },
- detailsShow(num) {
- if (this.details == num) {
- this.details = 99999;
- } else {
- this.details = num;
- }
- },
- //判断登录是否过期
- getuserData() {
- if (localStorage.getItem("token")) {
- this.$http
- .post(this.$ports.login.getAgent, {
- token: localStorage.getItem("token")
- })
- .then(res => {
- if (res.data.status == -4001) {
- this.$store.dispatch("SET_TOKEN", "");
- this.$store.dispatch("GET_ISSHOW", false);
- this.$dialog.toast({
- mes: "对不起您的登录已过期,请您重新登录",
- timeout: 3000
- });
- this.$router.push("/");
- }
- });
- }
- },
- reset() {
- this.list = '';
- this.page = 1;
- // 重置下拉加载
- this.$refs.infinitescrollDemo.$emit("ydui.infinitescroll.reInit");
- this.loadList();
- },
- //投注类型查询
- recordCode(num) {
- this.recordConditions = num;
- this.reset();
- },
- // 导航
- toRouter() {
- this.$router.go(-2);
- },
- // 初始化时间
- initialTime() {
- // 现在的时间
- let date = new Date();
- // 日历开始时间
- let date2 = new Date(date);
- date2.setMonth(date.getMonth() - 3);
- this.startDate = `${date2.getFullYear()}-${
- date2.getMonth() + 1 < 10
- ? "0" + (date2.getMonth() + 1)
- : date2.getMonth() + 1
- }-${date2.getDate() < 10 ? "0" + date2.getDate() : date2.getDate()}`;
- this.date = `${date.getFullYear()}-${
- date.getMonth() + 1 < 10
- ? "0" + (date.getMonth() + 1)
- : date.getMonth() + 1
- }-${date.getDate() < 10 ? "0" + date.getDate() : date.getDate()}`;
- // 查询结束时间
- this.endTime = `${date.getFullYear()}-${
- date.getMonth() + 1 < 10
- ? "0" + (date.getMonth() + 1)
- : date.getMonth() + 1
- }-${date.getDate() < 10 ? "0" + date.getDate() : date.getDate()}`;
- this.startTime = `${date.getFullYear()}-${
- date.getMonth() - 2 < 10
- ? "0" + (date.getMonth() - 2)
- : date.getMonth() - 2
- }-${date.getDate() < 10 ? "0" + date.getDate() : date.getDate()}`;
- // console.log(this.startDate);
- // console.log(this.endTime, "bbb");
- // console.log(this.startTime, "cccc");
- },
- // 发送请求
- loadList() {
- // 补全时间
- let date = new Date();
- let hours = date.getHours();
- let min = date.getMinutes();
- let sec = date.getSeconds();
- this.$http
- .post(this.$ports.login.bettingRecord, {
- currentPage: this.page,
- pageSize: this.pageSize,
- startTime: this.startTime + " 00:00:00",
- endTime:
- this.endTime +
- " " +
- (hours < 10 ? "0" + hours : hours) +
- ":" +
- (min < 10 ? "0" + min : min) +
- ":" +
- (sec < 10 ? "0" + sec : sec),
- result: this.classifynum,
- token: localStorage.getItem("token"),
- type: this.recordConditions
- })
- .then(res => {
- console.log(res);
- /* 单次请求数据完毕 */
- if (res.data.data) {
- let table = res.data.data.list;
- this.list = [...this.list, ...table];
- console.log(this.list, "我的");
- if (res.data.data.list.length < 10) {
- this.$dialog.toast({ mes: "当前已经没有记录", timeout: 1500 });
- /* 所有数据加载完毕 */
- this.$refs.infinitescrollDemo.$emit(
- "ydui.infinitescroll.loadedDone"
- );
- return;
- } else {
- /* 单次请求数据完毕 */
- this.$refs.infinitescrollDemo.$emit(
- "ydui.infinitescroll.finishLoad"
- );
- this.page++;
- }
- }
-
- });
- },
- // 点击待开奖,中奖未中奖
- classifyclick(i) {
- this.classifynum = i;
- this.reset();
- },
- // 日历开关
- openStart() {
- this.$refs.datetimeStart.open();
- },
- openEnd() {
- this.$refs.datetimeEnd.open();
- }
- },
- mounted() {
- this.initialTime();
- this.reset();
- let _this = this;
- this.$public.ajaxTimerFun(function(timing) {
- if (_this.timers) {
- _this.getuserData();
- } else {
- clearInterval(timing);
- }
- }, 1000 * 60);
- },
- beforeDestroy() {
- this.timers = false;
- }
- };
- </script>
- <style scoped>
- div /deep/ .yd-list-img {
- display: none;
- }
- .list-txt p {
- height: 100%;
- }
- .list-txt {
- }
- .bg {
- background: #f76649;
- }
- .yd-list {
- background: rgba(0, 0, 0, 0);
- padding: 0;
- }
- .list-box {
- width: 100%;
- height: 100%;
- font-size: 0.26rem;
- background: #f8f8f8;
- margin-bottom: 0.1rem;
- margin: 0 auto;
- }
- .yd-btn-block {
- height: 100%;
- width: 100%;
- }
- .dateBtn {
- width: 0.94rem;
- height: 0.6rem;
- border: none;
- border-radius: 0.08rem;
- background-image: linear-gradient(7deg, #565656 0%, #999999 100%),
- linear-gradient(#4a4949, #4a4949);
- color: #ffffff;
- margin-left: 0.22rem;
- }
- .boxIn {
- background: #e4e4e4;
- height: 0.88rem;
- padding: 0 0.32rem;
- }
- .betting-btn button {
- height: 0.6rem;
- border: none;
- width: 2rem;
- background: #a0a0a0;
- color: #dcdcdc;
- }
- .betting-btn button.active {
- background: #dcdcdc;
- color: #363636 !important;
- }
- .listbox p {
- width: 5rem;
- height: 0.45rem;
- }
- .paging {
- width: 100%;
- height: 0.88rem;
- position: absolute;
- bottom: 0;
- }
- .paging p {
- width: 0.6rem;
- height: 0.6rem;
- margin-left: 0.05rem;
- border-radius: 0.08rem;
- background: #ccc;
- display: flex;
- justify-content: center;
- align-items: center;
- color: #363636;
- }
- .paging p input {
- width: 0.6rem;
- height: 0.6rem;
- background: #ebebeb;
- border: 2px solid #ccc;
- border-radius: 0.08rem;
- }
- .paging p button {
- width: 0.6rem;
- height: 0.6rem;
- border: none;
- background: #555;
- color: #efefef;
- display: flex;
- justify-content: center;
- align-items: center;
- border-radius: 0.08rem;
- }
- .paging p button:active {
- background: rgb(126, 125, 125);
- color: #ccc;
- }
- .datalistbox {
- height: 2.2rem;
- margin-top: 0.3rem;
- background: #efefef;
- padding: 0.2rem 0.3rem;
- font-size: 0.28rem;
- color: #555555;
- line-height: 0.4rem;
- }
- .datalist {
- position: relative;
- }
- .datalistlet {
- background-color: #cccccc;
- }
- .datalist .active {
- background: #f76649 !important;
- color: #efefef !important;
- }
- .msg {
- height: 0.88rem;
- margin-top: 0.3rem;
- color: #ccc;
- background: #333;
- }
- .classifyactive {
- color: #f76649;
- border-bottom: 2px solid #f76649;
- }
- .classify {
- height: 0.88rem;
- font-size: 0.3rem;
- line-height: 0.66rem;
- font-weight: normal;
- color: #777777;
- background-color: #efefef;
- padding: 0.1rem 0;
- }
- .active {
- color: rgb(247, 102, 73) !important;
- }
- .box {
- background: #ebebeb;
- padding-left: 0.14rem;
- }
- .date {
- width: 2.5rem;
- height: 0.6rem;
- border-radius: 0.25rem;
- background: #ccc;
- }
- #NavSlide {
- width: 100%;
- overflow: hidden;
- }
- #NavSlide nav {
- padding-top: 0.1rem;
- display: -webkit-box;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-align: middle;
- -ms-flex-align: middle;
- align-items: middle;
- overflow: auto;
- }
- div /deep/ .yd-datetime-content,
- div /deep/ .yd-datetime-shade,
- div /deep/ .yd-datetime-indicator {
- height: 2rem !important;
- }
- div /deep/ .yd-button {
- padding: 0;
- width: 100%;
- height: 100%;
- }
- div /deep/ .yd-button button {
- margin: 0;
- border-radius: 0;
- }
- #NavSlide p {
- text-align: center;
- font-size: 0.28rem;
- -ms-flex-negative: 0;
- flex-shrink: 0;
- padding: 0 0.1rem;
- color: #b8b8b8;
- }
- /* #NavSlide p a{
- color: #E5E5E5;
- text-decoration: none;
- } */
- #NavSlide p span.active {
- color: #363636;
- }
- .head_on_box {
- padding: 0 0.32rem;
- }
- .box {
- height: 0.88rem;
- background: linear-gradient(to bottom, #999999, #6a6a6b);
- overflow: hidden;
- }
- .user-ion {
- width: 0.3rem;
- height: 0.3rem;
- }
- #NavSlide p {
- width: 1.1rem;
- }
- </style>
|