|
@@ -41,7 +41,9 @@
|
|
|
<text style="margin-right: 20upx;">
|
|
|
支付剩余
|
|
|
</text>
|
|
|
- <u-count-down @end="getRow" style="margin-right: 20upx;" separator ="zh" :timestamp="filterTime(item.orderTime)" :show-days="false" :show-hours="false"></u-count-down>
|
|
|
+ <u-count-down @end="getRow"
|
|
|
+ style="margin-right: 20upx;" separator ="zh"
|
|
|
+ :timestamp="item.leftTimeT" :show-days="false" :show-hours="false"></u-count-down>
|
|
|
<u-button :custom-style="btnStyle" @click="toPay(item)" shape="circle" type="error" size="medium">去支付</u-button>
|
|
|
</view>
|
|
|
<view v-if="item.orderState=='WAIT_SEND'||item.orderState=='SEND_PART'" class="text-right">
|
|
@@ -223,10 +225,12 @@
|
|
|
this.pageNo += 1
|
|
|
this.getRow()
|
|
|
} else {
|
|
|
- uni.showToast({
|
|
|
- title: '已经到底了',
|
|
|
- icon: 'none'
|
|
|
- });
|
|
|
+ if(this.list.length) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '已经到底了',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ }
|
|
|
this.status = "nomore"
|
|
|
}
|
|
|
},
|
|
@@ -250,6 +254,12 @@
|
|
|
} else {
|
|
|
this.list = res.data.list || []
|
|
|
}
|
|
|
+ let nowT = new Date().valueOf() // 现在时间戳
|
|
|
+ this.list.map(item=>{
|
|
|
+ let orderT = new Date(item.orderTime).valueOf() // 下单时间戳
|
|
|
+ let tt = ((1800 * 1000) - (nowT - orderT))/1000 // 距离30分钟支付 相差时间戳
|
|
|
+ item.leftTimeT = tt > 0 ? tt : 0
|
|
|
+ })
|
|
|
this.total = res.data.count || 0
|
|
|
} else {
|
|
|
this.list = []
|
|
@@ -277,15 +287,6 @@
|
|
|
this.searchParams = params
|
|
|
this.getRow(1)
|
|
|
},
|
|
|
- // 支付剩余时间
|
|
|
- filterTime (time) {
|
|
|
- console.log(time,'tttttt')
|
|
|
- let nowT = new Date().valueOf() // 现在时间戳
|
|
|
- let orderT = new Date(time).valueOf() // 下单时间戳
|
|
|
- let tt = (1800 * 1000) - (nowT - orderT) // 距离30分钟支付 相差时间戳
|
|
|
- console.log(tt,'tttttt')
|
|
|
- return tt
|
|
|
- },
|
|
|
|
|
|
// 跳转到设置支付密码页
|
|
|
toSetPwd () {
|