Commit cae91d5f authored by Facius's avatar Facius

详情页面优化

parent 096c917d
......@@ -278,13 +278,14 @@
this.updateTime()
}
},
methods: {
methods: {
// title:标题,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动
handleClick() {
// if (this.buttonDisabled) return
this.$emit('action', this.orderData, this.title)
this.$emit('action', this.orderData, this.title, this.showCountTime)
},
handleClickCell() {
this.$emit('click', this.orderData, this.title)
this.$emit('click', this.orderData, this.title, this.showCountTime)
},
handleChange(timestamp) {
if (this.timeout) this.$refs['order-count-down'].seconds += 2
......
......@@ -282,14 +282,13 @@
}
});
},
handleClick(item, title) {
console.log(item, title)
handleClick(item, title, showCountTime) { // title:标题,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动
if(item.orderStatus===86 || item.orderStatus===88){
this.filish(item)
return
}
uni.navigateTo({
url: 'pages/order/detail?id=' + item.orderId + '&title=' + title
url: 'pages/order/detail?id=' + item.orderId + '&title=' + title + '&showCountTime=' + showCountTime
})
},
filish(item){
......
<template>
<view class="order-wrap">
<u-navbar :title="title" title-color="#FFFFFF" title-size="32" back-icon-color="#FFFFFF" :background="background" :border-bottom="false" title-bold></u-navbar>
<view class="header" v-if="order.currentOverTime && showTimeOut || loading">
<view class="header" v-if="showCountTime || (order.currentOverTime && showTimeOut)">
<image class="bottom-tag-view" :src="tagImage"></image>
<!-- 倒计时 -->
<view class="title">
......@@ -167,7 +167,7 @@
timeout: false,
timestamp: 0,
showFile: false, // 显示查看业务文件
loading: true
showCountTime : false
}
},
onLoad(option) {
......@@ -176,11 +176,15 @@
if (option && option.id) {
this.orderId = option.id
}
if (option) {
this.showCountTime = option.showCountTime
}
if (option && option.title) {
this.title = decodeURIComponent(option.title)
} else {
this.title = "订单信息"
}
this.loadOrderDetail()
this.getLocation()
if (option && option.isFromMine) {
......@@ -345,7 +349,6 @@
'orderId': self.orderId
};
self.$u.api.orderDetail(data, self.orderId).then((res) => {
this.loading = false
if (res.code == 200) {
self.order = res.data
this.getCurrentBtn()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment