支持多包裹快递展示物流信息
parent
7148b32c43
commit
2d0b78af52
|
@ -319,3 +319,12 @@ export function reBuy(sn) {
|
||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查看包裹列表
|
||||||
|
export function getPackage(orderSn) {
|
||||||
|
return http.request({
|
||||||
|
url: `/order/order/getPackage/${orderSn}`,
|
||||||
|
method: Method.GET,
|
||||||
|
needToken: true,
|
||||||
|
});
|
||||||
|
}
|
|
@ -718,6 +718,12 @@
|
||||||
"navigationBarTitleText": "订单详情"
|
"navigationBarTitleText": "订单详情"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "deliverDetail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "物流详情"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "evaluate/evaluateDetail",
|
"path": "evaluate/evaluateDetail",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- 物流信息 -->
|
<!-- 物流信息 -->
|
||||||
<view class="info-view logistics-view">
|
<view class="info-view logistics-view">
|
||||||
<view class="logistics-List" v-if="logisticsList && logisticsList.traces.length != 0 ">
|
<view class="logistics-List" v-if="logisticsList && logisticsList.traces && logisticsList.traces.length != 0 ">
|
||||||
<view class="logistics-List-title">
|
<view class="logistics-List-title">
|
||||||
{{ logisticsList.traces[logisticsList.traces.length - 1].AcceptStation }}
|
{{ logisticsList.traces[logisticsList.traces.length - 1].AcceptStation }}
|
||||||
</view>
|
</view>
|
||||||
|
@ -23,6 +23,14 @@
|
||||||
<view class="verificationCode" v-if="order.verificationCode">
|
<view class="verificationCode" v-if="order.verificationCode">
|
||||||
券码: {{ order.orderStatus == 'CANCELLED' ? '已失效' : order.verificationCode }}
|
券码: {{ order.orderStatus == 'CANCELLED' ? '已失效' : order.verificationCode }}
|
||||||
</view>
|
</view>
|
||||||
|
<view @click="handleClickDeliver()" class="info-view logi-view" v-if="orderPackage && orderPackage.length">
|
||||||
|
<view class="verificationCode">
|
||||||
|
当前订单有 {{ orderPackage.length }} 个包裹快递
|
||||||
|
</view>
|
||||||
|
<div>
|
||||||
|
点击此处查看
|
||||||
|
</div>
|
||||||
|
</view>
|
||||||
<view v-else class="logistics-List-title">
|
<view v-else class="logistics-List-title">
|
||||||
{{ '暂无物流信息' }}
|
{{ '暂无物流信息' }}
|
||||||
</view>
|
</view>
|
||||||
|
@ -250,7 +258,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getExpress } from "@/api/trade.js";
|
import { getExpress, getPackage } from "@/api/trade.js";
|
||||||
import { cancelOrder, confirmReceipt, getOrderDetail } from "@/api/order.js";
|
import { cancelOrder, confirmReceipt, getOrderDetail } from "@/api/order.js";
|
||||||
|
|
||||||
import shares from "@/components/m-share/index"; //分享
|
import shares from "@/components/m-share/index"; //分享
|
||||||
|
@ -308,6 +316,7 @@ export default {
|
||||||
cancelList: "",
|
cancelList: "",
|
||||||
rogShow: false,
|
rogShow: false,
|
||||||
reason: "",
|
reason: "",
|
||||||
|
orderPackage:"",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
@ -315,6 +324,19 @@ export default {
|
||||||
this.sn = options.sn;
|
this.sn = options.sn;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//获取包裹
|
||||||
|
async getOrderPackage() {
|
||||||
|
getPackage(this.order.sn).then(res => {
|
||||||
|
if (res.data.success) {
|
||||||
|
this.orderPackage = res.data.result
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleClickDeliver(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/order/deliverDetail?order_sn=${this.order.sn}`,
|
||||||
|
});
|
||||||
|
},
|
||||||
// 退款状态枚举
|
// 退款状态枚举
|
||||||
refundPriceList(status) {
|
refundPriceList(status) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
|
@ -375,7 +397,8 @@ export default {
|
||||||
this.orderGoodsList = order.orderItems;
|
this.orderGoodsList = order.orderItems;
|
||||||
this.orderDetail = res.data.result;
|
this.orderDetail = res.data.result;
|
||||||
if (this.order.deliveryMethod === 'LOGISTICS') {
|
if (this.order.deliveryMethod === 'LOGISTICS') {
|
||||||
this.loadLogistics(sn)
|
this.loadLogistics(sn);
|
||||||
|
this.getOrderPackage();
|
||||||
}
|
}
|
||||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue