|
@@ -4,33 +4,21 @@
|
4
|
4
|
<scroller :on-refresh="Refresh" :on-infinite="Infinite" ref="MyScroller">
|
5
|
5
|
<div class="Container">
|
6
|
6
|
<ul>
|
7
|
|
- <li v-for="(item, index) in PageList" :key="index">
|
8
|
|
- <ul>
|
9
|
|
- <router-link tag="li" v-for="(subItem, subIndex) in item.List" :key="subIndex" :to="{name: 'DingDanXiangQing', query: {id: subItem.OrderId}}" class="flex-h">
|
10
|
|
- <div class="Time">
|
11
|
|
- <span v-if="subIndex === 0" class="Month">{{item.Day}} <em>{{item.Month}}</em></span>
|
12
|
|
- <span>{{subItem.CreateDate}}</span>
|
13
|
|
- </div>
|
14
|
|
- <div class="flex-item flex-h">
|
15
|
|
- <div class="Icon">
|
16
|
|
- <img :src="subItem.Icon" class="centerLabel contain" alt="">
|
17
|
|
- </div>
|
18
|
|
- <div class="flex-item">
|
19
|
|
- <div>
|
20
|
|
- <span>{{subItem.Name}}</span>
|
21
|
|
- <div class="flex-h">
|
22
|
|
- <div class="flex-item">
|
23
|
|
- <span v-if="subItem.Status === 1">中奖:<em>¥{{subItem.PrizeNum}}</em></span>
|
24
|
|
- <span v-else>投注:<b>¥-{{subItem.PayNum}}</b></span>
|
25
|
|
- </div>
|
26
|
|
- <span :class="[subItem.Status === 0 ? 'Black' : subItem.Status === 1 ? 'Red' : '']">{{subItem.Status === 0 ? '未开奖' : subItem.Status === 1 ? '已中奖' : '未中奖'}}</span>
|
27
|
|
- </div>
|
28
|
|
- </div>
|
29
|
|
- </div>
|
30
|
|
- </div>
|
31
|
|
- </router-link>
|
32
|
|
- </ul>
|
33
|
|
- </li>
|
|
7
|
+ <router-link tag="li" v-for="(item, index) in PageList" :key="index" :to="{name: 'DingDanXiangQing', query: {id: item.orderId}}">
|
|
8
|
+ <div class="Title flex-h">
|
|
9
|
+ <span class="flex-item">{{item.customerBetting.lotteryName}}</span>
|
|
10
|
+ <span class="Prize" v-if="item.customerBetting.isWinning">奖金:<em>{{item.customerBetting.winAmount}}</em>牛币</span>
|
|
11
|
+ <span class="Status" :class="[item.customerBetting.isWinning ? 'Red' : 'Black']">{{!item.customerBetting.isDrawn ? '未出票' : !item.customerBetting.isOpen ? '未开奖' : !item.customerBetting.isWinning ? '未中奖' : !item.customerBetting.isCashed ? '待派奖' : '已派奖'}}</span>
|
|
12
|
+ </div>
|
|
13
|
+ <div class="OrderId">
|
|
14
|
+ <span>订单号:</span>
|
|
15
|
+ <span>{{item.orderId}}</span>
|
|
16
|
+ </div>
|
|
17
|
+ <div class="Date">
|
|
18
|
+ <span>{{item.customerBetting.totalPrice}}牛币</span>
|
|
19
|
+ <span>下单时间:{{ToolClass.DateFormat(item.createDate)}}</span>
|
|
20
|
+ </div>
|
|
21
|
+ </router-link>
|
34
|
22
|
</ul>
|
35
|
23
|
</div>
|
36
|
24
|
</scroller>
|
|
@@ -119,36 +107,7 @@ export default {
|
119
|
107
|
ToGetPageList (done = () => { }) { // 获取页面列表
|
120
|
108
|
if (this.HasNextPage) {
|
121
|
109
|
this.GetCurrentShopOrderList({ queryData: { ...this.PageData } }).then((res) => {
|
122
|
|
- let Arr = res.data.data.records || []
|
123
|
|
- Arr.map((item) => {
|
124
|
|
- if (this.PageList.length && (this.PageList[this.PageList.length - 1].List[this.PageList[this.PageList.length - 1].List.length - 1].CreateTimetamp - new Date(item.createDate).getTime() <= 1000 * 60 * 60 * 24)) {
|
125
|
|
- this.PageList[this.PageList.length - 1].List.push({
|
126
|
|
- OrderId: item.orderId,
|
127
|
|
- Icon: this.ReturnIcon(item.customerBetting.lotteryId),
|
128
|
|
- CreateDate: `${this.ToolClass.DoubleNum(new Date(item.createDate).getHours())}:${this.ToolClass.DoubleNum(new Date(item.createDate).getMinutes())}`,
|
129
|
|
- Name: item.customerBetting.planName,
|
130
|
|
- PayNum: 2,
|
131
|
|
- PrizeNum: item.customerBetting.totalPrice,
|
132
|
|
- Status: item.customerBetting.status,
|
133
|
|
- CreateTimetamp: new Date(item.createDate).getTime()
|
134
|
|
- })
|
135
|
|
- } else {
|
136
|
|
- this.PageList.push({
|
137
|
|
- Month: this.ReturnMonth(new Date(item.createDate).getMonth() + 1),
|
138
|
|
- Day: this.ToolClass.DoubleNum(new Date(item.createDate).getDate()),
|
139
|
|
- List: [{
|
140
|
|
- OrderId: item.orderId,
|
141
|
|
- Icon: this.ReturnIcon(item.customerBetting.lotteryId),
|
142
|
|
- CreateDate: `${this.ToolClass.DoubleNum(new Date(item.createDate).getHours())}:${this.ToolClass.DoubleNum(new Date(item.createDate).getMinutes())}`,
|
143
|
|
- Name: item.customerBetting.planName,
|
144
|
|
- PayNum: 2,
|
145
|
|
- PrizeNum: item.customerBetting.totalPrice,
|
146
|
|
- Status: item.customerBetting.status,
|
147
|
|
- CreateTimetamp: new Date(item.createDate).getTime()
|
148
|
|
- }]
|
149
|
|
- })
|
150
|
|
- }
|
151
|
|
- })
|
|
110
|
+ this.PageList = this.PageList.concat(res.data.data.records || [])
|
152
|
111
|
this.HasNextPage = res.data.data.total > this.CurrentShopOrderList.length
|
153
|
112
|
done()
|
154
|
113
|
}).catch(() => {
|