|
@@ -2,26 +2,26 @@
|
|
|
<view class="detail">
|
|
|
<u-navbar title="物流详情" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
|
|
|
<!-- 物流信息 -->
|
|
|
- <view class="detail-info" v-if="list.length>1?true:false">
|
|
|
- <view class="detail-info-one" v-for="(item,index) in list" :key="index" @click="jumpPosition(index)" :class="{'aside-active':listIndex === index}"> 包裹{{index+1}} </view>
|
|
|
+ <view class="detail-info" v-if="deliverList.length>1?true:false">
|
|
|
+ <view class="detail-info-one" v-for="(item,index) in deliverList" :key="index" @click="jumpPosition(index)" :class="{'aside-active':listIndex === index}"> 包裹{{index+1}} </view>
|
|
|
</view>
|
|
|
|
|
|
<view class="detail-info">
|
|
|
<view class="detail-info-title">商品信息</view>
|
|
|
<view class="detail-info-content">
|
|
|
<view class="detail-info-content-goods">
|
|
|
- <view class="flex detail-info-content-goods__detail">
|
|
|
+ <view class="flex detail-info-content-goods__detail" v-for="(item,index) in deliverListData[listIndex]" :key="index">
|
|
|
<view class="detail-info-content-goods__detail__left">
|
|
|
<view class="img">
|
|
|
- <image class="img" :src="list[listIndex].picUrl" mode="aspectFill">
|
|
|
+ <image class="img" :src="item.picUrl" mode="aspectFill">
|
|
|
</image>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="detail-info-content-goods__detail__right">
|
|
|
- <view class="ells title">{{ list[listIndex].title }}</view>
|
|
|
- <view class="sku" v-if="list[listIndex].properties">规格:{{ list[listIndex].properties }}
|
|
|
+ <view class="ells title">{{ item.title }}</view>
|
|
|
+ <view class="sku" v-if="item.properties">规格:{{ item.properties }}
|
|
|
</view>
|
|
|
- <view class="num">数量:{{ list[listIndex].goodsNum }}</view>
|
|
|
+ <view class="num">数量:{{ item.goodsNum }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -31,18 +31,18 @@
|
|
|
<view class="detail-info">
|
|
|
<view class="detail-info-content-desc">
|
|
|
<view>配送方式:</view>
|
|
|
- <view>{{ list[listIndex].companyName ? "快递发货" : "无需物流" }}</view>
|
|
|
+ <view>{{ deliverListData[listIndex].companyName ? "快递发货" : "无需物流" }}</view>
|
|
|
</view>
|
|
|
- <view class="detail-info-content-desc" v-if="list[listIndex].companyName?true:false">
|
|
|
- <view>{{ list[listIndex].companyName }}:</view>
|
|
|
- <view class="copy" @click="copyDeliveryFlowId(list[listIndex].deliveryFlowId)">复制</view>
|
|
|
- <view>{{ list[listIndex].deliveryFlowId }}</view>
|
|
|
+ <view class="detail-info-content-desc" v-if="deliverListData[listIndex].companyName?true:false">
|
|
|
+ <view>{{ deliverListData[listIndex].companyName }}:</view>
|
|
|
+ <view class="copy" @click="copyDeliveryFlowId(deliverListData[listIndex].deliveryFlowId)">复制</view>
|
|
|
+ <view>{{ deliverListData[listIndex].deliveryFlowId }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
|
|
|
- <view class="detail-info" v-if="list[listIndex].companyName && logistics!==''?true:false">
|
|
|
- <u-steps current="1" direction="column" dot>
|
|
|
+ <view class="detail-info" v-if="deliverListData[listIndex].companyName && logistics!==''?true:false">
|
|
|
+ <u-steps current="0" direction="column" dot>
|
|
|
<u-steps-item :desc="item.context" :title="item.status + ' ' + item.time"
|
|
|
v-for="(item,index) in logistics">
|
|
|
<!-- <text class="slot-icon" slot="icon" v-if="item.status == '签收'">签</text> -->
|
|
@@ -51,7 +51,7 @@
|
|
|
</u-steps-item>
|
|
|
</u-steps>
|
|
|
</view>
|
|
|
- <view v-else-if="list[listIndex].companyName?true:false" class="detail-info">
|
|
|
+ <view v-else-if="deliverListData[listIndex].companyName?true:false" class="detail-info">
|
|
|
<view style="color: #b1b1b1;">
|
|
|
暂无物流信息
|
|
|
</view>
|
|
@@ -72,7 +72,13 @@
|
|
|
deliveryId: '',
|
|
|
}],
|
|
|
orderId: '',
|
|
|
- deliverList: '',
|
|
|
+ deliverList: [{
|
|
|
+ companyName:'',
|
|
|
+ }],
|
|
|
+ deliverListData:[{
|
|
|
+ companyName:'',
|
|
|
+ }],
|
|
|
+ ListData:[],
|
|
|
listIndex: 0,
|
|
|
logistics: '',
|
|
|
|
|
@@ -93,17 +99,20 @@
|
|
|
|
|
|
// uni.hideLoading();
|
|
|
this.info = res.data
|
|
|
+ this.deliverList = res.data.deliverList;
|
|
|
res.data.items.forEach(item => {
|
|
|
let picUrlArr = item.picUrl.split(',')
|
|
|
item.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/170'
|
|
|
})
|
|
|
+
|
|
|
res.data.deliverList && res.data.deliverList.forEach((item) => {
|
|
|
item.items.forEach((ele) => {
|
|
|
let picUrlArr = ele.picUrl.split(",");
|
|
|
ele.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/170';
|
|
|
+ this.ListData.push(item.items)
|
|
|
});
|
|
|
});
|
|
|
- this.deliverList = res.data.deliverList;
|
|
|
+ this.deliverListData = this.ListData
|
|
|
this.list = res.data.items
|
|
|
this.logisticsQuery()
|
|
|
}).catch(() => {
|