// 显示加载中
wx.showLoading({
title: '加载物流信息...',
mask: true
});
// 查询订单信息,获取物流信息
const db = wx.cloud.database();
db.collection('orders').doc(orderId).get().then(res => {
const orderData = res.data;
// 确保有物流信息
if (!orderData.productLogistics || orderData.productLogistics.length === 0) {
if (orderData.logistics && orderData.logistics.waybill_id) {
// 使用旧版本物流信息
this.getWaybillToken(orderData.logistics.waybill_id,
orderData.logistics.delivery_id || 'SF',
orderData._openid,
orderData.address.phone,
orderData);
} else {
wx.hideLoading();
wx.showToast({
title: '暂无物流信息',
icon: 'none'
});
this.setData({ isButtonClick: false });
}
return;
}
查看物流 是调用的查询物流组件,不知道为什么卡在这里了