wx.hideloading 还是会关闭 wx.showToast

发布于 8 年前作者 weilong8715 次浏览最后编辑 8 年前来自 ask

例如 :

// 之前有个 wx.showLoading({})


wx.request({

 
    success (res) => {
  

        wx.showToast({

title: 'hello',

duration: 2000000

})

    },

   complete () {

       wx.hideLoading({})

   }

 
})

请求成功后, toast不会显示,或者一闪而过。

2 回复
longyong
longyong1 楼6 年前

我是考虑,出错的话, 页面的loading就会 一直转

xiuying46
xiuying462 楼6 年前

complete里面的 wx.hideLoading({})去掉