|
@@ -2,7 +2,7 @@
|
|
|
<view class="container">
|
|
|
<view class="express-info">
|
|
|
<view class="express-text">物流公司:{{expressData.company}}</view>
|
|
|
- <view class="express-text">物流单号:{{expressData.logisticCode}}</view>
|
|
|
+ <view class="express-text">物流单号:{{expressData.logisticCode ? expressData.logisticCode : ''}}</view>
|
|
|
</view>
|
|
|
<view class="express-list">
|
|
|
<uni-steps :options="expressList" active-color="#008AFF" direction="column" :active="0"></uni-steps>
|
|
@@ -29,12 +29,16 @@
|
|
|
company: '顺丰',
|
|
|
logisticCode: res.data.logisticCode,
|
|
|
}
|
|
|
- this.expressList = res.data.traces && res.data.traces.map(site => {
|
|
|
- return {
|
|
|
- title: site.acceptStation,
|
|
|
- desc: site.acceptTime
|
|
|
- }
|
|
|
- })
|
|
|
+ if (res.data.traces.length) {
|
|
|
+ this.expressList = res.data.traces && res.data.traces.map(site => {
|
|
|
+ return {
|
|
|
+ title: site.acceptStation,
|
|
|
+ desc: site.acceptTime
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.expressList = [{title: ' ', desc: '暂无物流信息'}]
|
|
|
+ }
|
|
|
}).catch(error => {
|
|
|
console.log('物流追踪',error)
|
|
|
this.$refs.uTips.show({
|