|
@@ -128,6 +128,7 @@
|
|
import {
|
|
import {
|
|
getOrderList, signPay, existPayPwd
|
|
getOrderList, signPay, existPayPwd
|
|
} from '@/api/order.js'
|
|
} from '@/api/order.js'
|
|
|
|
+ import moment from 'moment'
|
|
export default {
|
|
export default {
|
|
components: {},
|
|
components: {},
|
|
data() {
|
|
data() {
|
|
@@ -194,6 +195,15 @@
|
|
onUnload() {
|
|
onUnload() {
|
|
uni.$off('refresh', this.handleRefresh)
|
|
uni.$off('refresh', this.handleRefresh)
|
|
},
|
|
},
|
|
|
|
+ // 下拉刷新
|
|
|
|
+ onPullDownRefresh() {
|
|
|
|
+ console.log('refresh')
|
|
|
|
+ this.pageNo = 1
|
|
|
|
+ this.getRow()
|
|
|
|
+ setTimeout(function () {
|
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
|
+ }, 200)
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
pageInit() {
|
|
pageInit() {
|
|
this.sortIndex = 1
|
|
this.sortIndex = 1
|
|
@@ -267,10 +277,14 @@
|
|
} else {
|
|
} else {
|
|
this.list = res.data.list || []
|
|
this.list = res.data.list || []
|
|
}
|
|
}
|
|
- let nowT = new Date().valueOf() // 现在时间戳
|
|
|
|
|
|
+ // let nowT = new Date().valueOf() // 现在时间戳
|
|
|
|
+ console.log(new Date(),'----当前时间')
|
|
|
|
+ let nowT = moment(new Date()).unix() // 当前时间戳
|
|
this.list.map(item=>{
|
|
this.list.map(item=>{
|
|
- let orderT = new Date(item.orderTime).valueOf() // 下单时间戳
|
|
|
|
|
|
+ // let orderT = new Date(item.orderTime).valueOf() // 下单时间戳
|
|
|
|
+ let orderT = moment(item.orderTime).unix() // 下单时间戳
|
|
let tt = ((1800 * 1000) - (nowT - orderT))/1000 // 距离30分钟支付 相差时间戳
|
|
let tt = ((1800 * 1000) - (nowT - orderT))/1000 // 距离30分钟支付 相差时间戳
|
|
|
|
+ console.log(tt,'-------------tt')
|
|
item.leftTimeT = tt > 0 ? tt : 0
|
|
item.leftTimeT = tt > 0 ? tt : 0
|
|
})
|
|
})
|
|
this.total = res.data.count || 0
|
|
this.total = res.data.count || 0
|