Commit 9c69c1a5 authored by Junling Bu's avatar Junling Bu
Browse files

fix[litemall-wx]: 订单物流信息显示不正确

parent f76c8efc
......@@ -23,20 +23,6 @@ Page({
wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh() //停止下拉刷新
},
getOrderExpress: function() {
let that = this;
util.request(api.ExpressQuery, {
expCode: that.data.orderInfo.expCode,
expNo: that.data.orderInfo.expNo
}, 'POST').then(function(res) {
if (res.errno === 0) {
that.setData({
expressInfo: res.data
});
}
});
},
expandDetail: function() {
let that = this;
this.setData({
......@@ -44,6 +30,14 @@ Page({
})
},
getOrderDetail: function () {
wx.showLoading({
title: '加载中',
});
setTimeout(function () {
wx.hideLoading()
}, 2000);
let that = this;
util.request(api.OrderDetail, {
orderId: that.data.orderId
......@@ -53,14 +47,12 @@ Page({
that.setData({
orderInfo: res.data.orderInfo,
orderGoods: res.data.orderGoods,
handleOption: res.data.orderInfo.handleOption
handleOption: res.data.orderInfo.handleOption,
expressInfo: res.data.expressInfo
});
// 请求物流信息,仅当订单状态为发货时才请求
if (res.data.orderInfo.handleOption.confirm) {
that.getOrderExpress();
}
}
wx.hideLoading();
});
},
// “去付款”按钮点击效果
......
......@@ -74,13 +74,11 @@
<view class="order-express" bindtap="expandDetail" wx:if="{{ handleOption.confirm }}">
<view class="order-express">
<view class="title">
<view class="t">快递公司:{{expressInfo.expName}}</view>
<view class="b">物流单号:{{expressInfo.expCode}}</view>
<view class="t">快递公司:{{expressInfo.shipperName}}</view>
<view class="b">物流单号:{{expressInfo.shipperCode}}</view>
</view>
<image class="ti" src="/static/images/address_right.png" background-size="cover"></image>
</view>
<!-- <view class="order-express" > -->
<view class="traces" wx:for="{{expressInfo.Traces}}" wx:key="item" wx:for-item="iitem" wx:if="{{ flag }}">
<view class="trace">
<view class="acceptStation">{{iitem.AcceptStation}}</view>
......
Supports Markdown
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