Commit cb7d4094 authored by 琉璃丶c's avatar 琉璃丶c

1.去除 订单详情的 keepAlive

2.修复物流信息为空时不提示的问题
3.修复 nav-bar 警告问题
parent 47be9b1e
......@@ -4,10 +4,10 @@
id="nav-bar"
v-if="navBar.show"
:left-arrow="navBar.leftArrow"
@click-left="navBar.leftClick"
@click-left="leftClick"
:right-text="navBar.rightText"
:left-text="navBar.leftText"
@click-right="navBar.rightClick"
@click-right="rightClick"
:fixed="navBar.fixed"
:title="navBar.title">
<template #right>
......@@ -37,6 +37,14 @@ export default {
this.$router.back()
}
})
},
methods: {
leftClick() {
this.navBar.leftClick()
},
rightClick() {
this.navBar.rightClick()
}
}
}
</script>
......
......@@ -14,8 +14,7 @@ const myOrder = [
name: 'orderDetail',
meta: {
title: '订单详情',
auth: false,
keepAlive: true
auth: false
},
component: resolve => require(['@/views/myOrder/detail/orderDetail'], resolve)
},
......
<template>
<div class="logistics-content">
<van-empty description="暂无数据"
v-if="!shippingInfo&&!shippingInfo.shippingNo&&
(!stepList|| stepList.length<0)&&(!mapPointList||mapPointList.length < 0)"/>
<a-map-view :transport="sendType" :point-list="mapPointList" :drive-point="driveLine" v-if="mapPointList&&mapPointList.length > 0"/>
v-if="!((mapPointList&&mapPointList.length > 0)||(shippingInfo&&shippingInfo.shippingNo)||(stepList&&stepList.length > 0))"/>
<!-- 高德地图 -->
<a-map-view :transport="sendType" :point-list="mapPointList" :drive-point="driveLine"
v-if="mapPointList&&mapPointList.length > 0"/>
<!-- 物流主信息 -->
<div class="logistics-header" v-if="shippingInfo&&shippingInfo.shippingNo">
<div class="header-title">
<van-icon class="logistic-logo" :name="icons.logo"/>
......@@ -26,10 +28,11 @@
<span class="logistic-values">{{ shippingInfo.estimatedArrivalTime }}</span>
</div>
</span>
<span class="logistic-type">{{shippingInfo.roadType==='D'?'市内':'市外'}}</span>
<span class="logistic-type">{{ shippingInfo.roadType === 'D' ? '市内' : '市外' }}</span>
</div>
</div>
<div id="stepLine" :class="stepList.length>2?'logistics-step-line':'logistics-step-line_show'" v-if="stepList">
<!-- 物流追踪信息 -->
<div id="stepLine" :class="stepList.length>2?'logistics-step-line':'logistics-step-line_show'" v-if="stepList&&stepList.length > 0">
<logistics-step>
<step-item v-for="(item, index) in stepList" :stepInfo=item :key="index"/>
</logistics-step>
......@@ -200,7 +203,7 @@ export default {
<style lang="scss" scoped>
.logistics-content {
background-color:#f2f3f5;
background-color: #f2f3f5;
height: calc(100vh - 46px);
overflow: scroll;
......@@ -261,8 +264,8 @@ export default {
height: 150px;
overflow: hidden;
position: relative;
background-color:#fff;
padding:1px;
background-color: #fff;
padding: 1px;
.show-more {
display: block;
......@@ -278,8 +281,9 @@ export default {
}
.logistics-step-line_show {
background-color:#fff;
background-color: #fff;
padding: 1px 1px 10px 1px;
.show-more {
display: none;
}
......
......@@ -145,7 +145,22 @@ export default {
}
}
},
activated() {
// activated() {
// this.initPager()
// },
// deactivated() {
// // 当页面销毁必须要移除这个事件,vue不刷新页面,不移除会重复执行这个事件
// window.removeEventListener('popstate', this.onBrowserBack, false)
// },
mounted() {
this.initPager()
},
destroyed() {
// 当页面销毁必须要移除这个事件,vue不刷新页面,不移除会重复执行这个事件
window.removeEventListener('popstate', this.onBrowserBack, false)
},
methods: {
initPager() {
// 设置标题栏关闭返回按钮
this.$store.commit('setNavBar', {
show: true,
......@@ -163,16 +178,6 @@ export default {
this.getInvoiceDetail()
this.getTrackInfoDetail()
},
deactivated() {
// 当页面销毁必须要移除这个事件,vue不刷新页面,不移除会重复执行这个事件
window.removeEventListener('popstate', this.onBrowserBack, false)
},
mounted() {
},
destroyed() {
},
methods: {
onBrowserBack() {
this.$router.go(-1)
},
......
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