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">
<view wx:if="{{expressInfoDetailList.length}}">
<text class="message-title">{{expressSender}}</text>
<view class="header-detail">
... ... @@ -38,5 +39,9 @@
</view>
</block>
</view>
</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
... ...