hideLoading把toast关掉的BUG一直没修复
发布于 5 年前 作者 yongqian 7844 次浏览 来自 问答

工具显示正常,客户端不正确,hideLoading把toast也关掉了

wx.showLoading({
      title: '处理中...',
      mask: true
    });
    wx.request({
      url: '',
      method: 'POST',
      header: {
        'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'
      },
      data: {
       xx:'xx'
      },
      success: function success(res) {
        wx.showToast({
          title: 'xx',
          icon: 'success',
          duration: 2000,
          mask:true,
          complete: function complete(res){
            setTimeout(function(){
              wx.navigateBack({
                delta:1
              })
            },2000);
          }
        });
      },
      fail: function fail(res){
        wx.showToast({
          title: 'xx',
          duration:2000,
          icon: 'none',
          mask: true
        })
      },
      complete: function complete(res){
         wx.hideLoading();
      }
2 回复

官方怎么都不修复这个呢

success和fail第一件事情就hideloading好了

回到顶部