收藏
回答

查询物流组件的调用 怎么卡住了?

  // 显示加载中
  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;
    }


查看物流 是调用的查询物流组件,不知道为什么卡在这里了

回答关注问题邀请回答
收藏

1 个回答

  • 智能回答 智能回答 该问答由AI生成
    04-11
    有用
登录 后发表内容