Authored by 肖亚东

物流信息为空时显示无数据页面 — review by 李其昌

... ... @@ -7,7 +7,6 @@ Page({
*/
data: {
expressSender: '',
// logisticsList: [ {'content':'南京市正在派送中,请准备签收(派件人:小明 电话:18323458818)', 'time': '2018.09.15 19:23:59'}, {'content':'南京市正在派送中,请准备签收(派件人:小明 电话:18323458818)', 'time': '2018.09.15 19:23:59'}, {'content':'南京市正在派送中,请准备签收(派件人:小明 电话:18323458818)', 'time': '2018.09.15 19:23:59'}],
expressCompanyName: '',
wayBillCode: '',
expressInfoDetailList: [],
... ... @@ -18,18 +17,16 @@ Page({
*/
onLoad: function (options) {
// let orderCode = '9790272561152';
let orderCode = options.orderCode;
let orderCode = options.orderCode ? options.orderCode : '';
this.fetchLogisticsInfo(orderCode);
},
fetchLogisticsInfo: function (orderCode) {
let that = this;
// let params = {
// orderCode,
// debug: 'XYZ'
// }
let params = {
orderCode
orderCode,
uid: '500031132',
debug: 'XYZ'
}
let api = new logisticsService();
... ...
{}
\ No newline at end of file
{
"navigationBarBackgroundColor": "#ffffff",
"usingComponents": {
"no-data-show-view": "../../../components/no-data-show-view/no-data-show-view"
}
}
\ No newline at end of file
... ...
<!--dist/pages/logistics.wxml-->
<view class="container">
<text class="message-title">{{expressSender}}</text>
<view wx:if="{{expressInfoDetailList.length}}">
<text class="message-title">{{expressSender}}</text>
<view class="header-detail">
<image src="../../../assets/images/express_info@2x.png" class="express-icon" mode="aspectFill" />
<view class="header-content">
<view class="company">
<text class="tips">快递公司:</text>
<text class="express-content">{{expressCompanyName}}</text>
</view>
<view class="number">
<text class="tips">快递单号:</text>
<text class="express-content">{{wayBillCode}}</text>
</view>
</view>
</view>
<view class="header-detail">
<image src="../../../assets/images/express_info@2x.png" class="express-icon" mode="aspectFill" />
<view class="header-content">
<view class="company">
<text class="tips">快递公司:</text>
<text class="express-content">{{expressCompanyName}}</text>
</view>
<view class="number">
<text class="tips">快递单号:</text>
<text class="express-content">{{wayBillCode}}</text>
</view>
</view>
</view>
<view class="space-line"></view>
<view class="space-line"></view>
<view class='logistics-list'>
<block wx:for="{{expressInfoDetailList}}" wx:key="{{index}}">
<view class='cell'>
<view class="left-view">
<view wx:if="{{index==0}}" class="black-view">
<image class="icon" src="../../../assets/images/xuanze@2x.png"></image>
<view class="first-line"></view>
<view class='logistics-list'>
<block wx:for="{{expressInfoDetailList}}" wx:key="{{index}}">
<view class='cell'>
<view class="left-view">
<view wx:if="{{index==0}}" class="black-view">
<image class="icon" src="../../../assets/images/xuanze@2x.png"></image>
<view class="first-line"></view>
</view>
<view wx:else class="gray-view">
<view class="circle"></view>
<view class="line"></view>
</view>
</view>
<view wx:else class="gray-view">
<view class="circle"></view>
<view class="line"></view>
<view class="right-view">
<view class="content {{index==0?'black':''}}">{{item.acceptRemark}}</view>
<view class="time {{index==0?'black':''}}">{{item.createTimeStr}}</view>
</view>
</view>
<view class="right-view">
<view class="content {{index==0?'black':''}}">{{item.acceptRemark}}</view>
<view class="time {{index==0?'black':''}}">{{item.createTimeStr}}</view>
</view>
</block>
</view>
</block>
</view>
<view wx:else class='empty'>
<no-data-show-view emptyText="暂无物流"></no-data-show-view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -112,3 +112,12 @@
color: #000000;
}
.empty {
display: flex;
justify-content: center;
font-family: PingFang-SC-Regular;
color: #999;
font-size: 30rpx;
letter-spacing: 0.8px;
margin-top: 200rpx;
}
\ No newline at end of file
... ...