Commit cae91d5f authored by Facius's avatar Facius

详情页面优化

parent 096c917d
...@@ -278,13 +278,14 @@ ...@@ -278,13 +278,14 @@
this.updateTime() this.updateTime()
} }
}, },
methods: { methods: {
// title:标题,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动
handleClick() { handleClick() {
// if (this.buttonDisabled) return // if (this.buttonDisabled) return
this.$emit('action', this.orderData, this.title) this.$emit('action', this.orderData, this.title, this.showCountTime)
}, },
handleClickCell() { handleClickCell() {
this.$emit('click', this.orderData, this.title) this.$emit('click', this.orderData, this.title, this.showCountTime)
}, },
handleChange(timestamp) { handleChange(timestamp) {
if (this.timeout) this.$refs['order-count-down'].seconds += 2 if (this.timeout) this.$refs['order-count-down'].seconds += 2
......
...@@ -282,14 +282,13 @@ ...@@ -282,14 +282,13 @@
} }
}); });
}, },
handleClick(item, title) { handleClick(item, title, showCountTime) { // title:标题,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动
console.log(item, title)
if(item.orderStatus===86 || item.orderStatus===88){ if(item.orderStatus===86 || item.orderStatus===88){
this.filish(item) this.filish(item)
return return
} }
uni.navigateTo({ uni.navigateTo({
url: 'pages/order/detail?id=' + item.orderId + '&title=' + title url: 'pages/order/detail?id=' + item.orderId + '&title=' + title + '&showCountTime=' + showCountTime
}) })
}, },
filish(item){ filish(item){
......
<template> <template>
<view class="order-wrap"> <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> <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> <image class="bottom-tag-view" :src="tagImage"></image>
<!-- 倒计时 --> <!-- 倒计时 -->
<view class="title"> <view class="title">
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
timeout: false, timeout: false,
timestamp: 0, timestamp: 0,
showFile: false, // 显示查看业务文件 showFile: false, // 显示查看业务文件
loading: true showCountTime : false
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -176,11 +176,15 @@ ...@@ -176,11 +176,15 @@
if (option && option.id) { if (option && option.id) {
this.orderId = option.id this.orderId = option.id
} }
if (option) {
this.showCountTime = option.showCountTime
}
if (option && option.title) { if (option && option.title) {
this.title = decodeURIComponent(option.title) this.title = decodeURIComponent(option.title)
} else { } else {
this.title = "订单信息" this.title = "订单信息"
} }
this.loadOrderDetail() this.loadOrderDetail()
this.getLocation() this.getLocation()
if (option && option.isFromMine) { if (option && option.isFromMine) {
...@@ -345,7 +349,6 @@ ...@@ -345,7 +349,6 @@
'orderId': self.orderId 'orderId': self.orderId
}; };
self.$u.api.orderDetail(data, self.orderId).then((res) => { self.$u.api.orderDetail(data, self.orderId).then((res) => {
this.loading = false
if (res.code == 200) { if (res.code == 200) {
self.order = res.data self.order = res.data
this.getCurrentBtn() 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