小程序云开发 res =>不执行,怎么解决?
发布于 6 年前 作者 yangdai 7190 次浏览 来自 问答
 getData:function(callback){
     if(!callback){
       callback = res=>{}
     }
     wx.showLoading({
       title: '数据加载中',
      
     })
     console.log('1')
    todos.skip(this.pageData.skip).get().then(res =>{
      this.setData({
        tasks:res.data
      })
    },res =>{
      console.log('2')
      this.pageData.skip = this.pageData.skip + 20
      wx.hideLoading()
      console.log('2')
      callback();
      
    })
   },
z最后一段res=>{}不执行  
h还有一个问题wx.hideLoading不管用
1 回复
1、最后一段res=>{}不执行 

它为什么会执行?

2、还有一个问题wx.hideLoading不管用

最后一段res都没执行,也就没触发wx.hideLoading,当然不管用了




回到顶部