|
@@ -37,19 +37,22 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="check-row">
|
|
|
- <view v-if="item.orderState=='WAIT_PAY'" class="text-right">
|
|
|
- <text style="margin-right: 30upx;">支付剩余{{filterTime(item.orderTime)}}</text>
|
|
|
- <u-button class="btn-cont" @click="toPay(item)" shape="circle" type="error" size="medium">去支付</u-button>
|
|
|
+ <view v-if="item.orderState=='WAIT_PAY'" class="text-right left-time">
|
|
|
+ <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-button :custom-style="btnStyle" @click="toPay(item)" shape="circle" type="error" size="medium">去支付</u-button>
|
|
|
</view>
|
|
|
<view v-if="item.orderState=='WAIT_SEND'" class="text-right">
|
|
|
- <u-button class="btn-cont" @click="showTip" shape="circle" size="medium">提醒发货</u-button>
|
|
|
+ <u-button :custom-style="btnStyle" @click="showTip" shape="circle" size="medium">提醒发货</u-button>
|
|
|
</view>
|
|
|
<view v-if="item.orderState=='SEND_ALL'" class="text-right">
|
|
|
- <u-button @click="showLog(item)" class="btn-cont" style="margin-right: 20upx;" shape="circle" size="medium">查看物流</u-button>
|
|
|
- <u-button class="btn-cont" shape="circle" type="primary" size="medium">确认收货</u-button>
|
|
|
+ <u-button @click="showLog(item)" :custom-style="btnStyle" style="margin-right: 20upx;" shape="circle" size="medium">查看物流</u-button>
|
|
|
+ <u-button :custom-style="btnStyle" shape="circle" type="primary" size="medium">确认收货</u-button>
|
|
|
</view>
|
|
|
<view v-if="item.orderState=='FINISH'" class="text-right">
|
|
|
- <u-button @click="showLog(item)" class="btn-cont" shape="circle" size="medium">查看物流</u-button>
|
|
|
+ <u-button @click="showLog(item)" :custom-style="btnStyle" shape="circle" size="medium">查看物流</u-button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -108,6 +111,10 @@
|
|
|
components: {},
|
|
|
data() {
|
|
|
return {
|
|
|
+ btnStyle:{
|
|
|
+ width: '180rpx',
|
|
|
+ fontSize: '30rpx',
|
|
|
+ },
|
|
|
status: 'loadmore',
|
|
|
noDataText: '暂无数据',
|
|
|
tabList: [{
|
|
@@ -148,6 +155,7 @@
|
|
|
},
|
|
|
total: 0,
|
|
|
totalPrice: 0, // 支付合计
|
|
|
+ password: '', // 支付密码
|
|
|
action: 'swiperChange', // 操作类型,上划分页,或左右滑动
|
|
|
showSetPswModal: false, // 设置支付密码弹窗
|
|
|
showInputPsw: false, // 打开输入密码弹窗
|
|
@@ -155,15 +163,16 @@
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
- this.pageInit()
|
|
|
},
|
|
|
onLoad() {
|
|
|
// 监听设置密码是否成功
|
|
|
uni.$once('setPswSuccess', this.setPsw)
|
|
|
+ // 监听详情支付成功事件
|
|
|
+ uni.$on('refresh', this.handleRefresh)
|
|
|
+ this.pageInit()
|
|
|
},
|
|
|
onUnload() {
|
|
|
- uni.$off('refreshBL', this.refresh)
|
|
|
- uni.$off('refreshBl-handle', this.handleRefresh)
|
|
|
+ uni.$off('refresh', this.handleRefresh)
|
|
|
},
|
|
|
methods: {
|
|
|
pageInit() {
|
|
@@ -265,29 +274,12 @@
|
|
|
},
|
|
|
// 支付剩余时间
|
|
|
filterTime (time) {
|
|
|
+ console.log(time,'tttttt')
|
|
|
let nowT = new Date().valueOf() // 现在时间戳
|
|
|
let orderT = new Date(time).valueOf() // 下单时间戳
|
|
|
let tt = (1800 * 1000) - (nowT - orderT) // 距离30分钟支付 相差时间戳
|
|
|
-
|
|
|
- setInterval(()=>{
|
|
|
- if(tt>0) {
|
|
|
- tt = tt -1000
|
|
|
- } else {
|
|
|
- clearInterval()
|
|
|
- // this.getRow()
|
|
|
- }
|
|
|
- },1000)
|
|
|
- //计算相差分钟数
|
|
|
- var leave1 = tt % (3600 * 1000); //计算小时数后剩余的毫秒数
|
|
|
- var minutes = Math.floor(tt / (60 * 1000));
|
|
|
- //计算相差秒数
|
|
|
- var leave3 = leave1 % (60 * 1000); //计算分钟数后剩余的毫秒数
|
|
|
- var seconds = Math.round(leave3 / 1000);
|
|
|
-
|
|
|
- console.log(minutes + "天 " + seconds + "小时 ")
|
|
|
-
|
|
|
- // console.log(new Date(time).valueOf(),dt.valueOf(),'ttttttt')
|
|
|
- return minutes + "分 " + seconds + "秒"
|
|
|
+ console.log(tt,'tttttt')
|
|
|
+ return tt
|
|
|
},
|
|
|
|
|
|
// 跳转到设置支付密码页
|
|
@@ -480,7 +472,6 @@
|
|
|
justify-content: space-between;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
.btn-cont {
|
|
|
width: 180upx;
|
|
|
font-size: 30upx;
|