- view渲染有时候显示一下又消失了?
onReady: function () { var that = this wx.cloud.callFunction({ name: 'getUserList', data:{ id:that.data.pass_id }, success: res => { that.setData({ shop:res.result.list[0] }) // console.log(that.data.shop) const db = wx.cloud.database({}) db.collection('user_pic').where({ _openid:that.data.shop._openid }).get({ success:function(res){ // console.log(res.data) if(res.data.length != 0){ var devpic_str = res.data[0].devPic devpic_str = devpic_str.substr(0,devpic_str.length-1); var strs=devpic_str.split(","); //字符分割 that.setData({ user_pic:strs }) } } }) } }) //获取投递职位名称 wx.cloud.callFunction({ name: 'getmyTd2', data:{ opid:that.data.pass_id }, complete: res => { var ls_list = res.result.list var ep_list = [] ls_list.forEach(element => { ep_list.push( element.job_detail[0].job_name) }); that.setData({ sq_list:ep_list, }) } }) }, onLoad: function (options) { var that = this that.setData({ pass_id:options.id }) console.log(that.data.pass_id) wx.cloud.callFunction({ name: 'getmyTd', complete: res => { that.setData({ shop:res.result.list, page: 1, pages: 20, title:'我的投递', }) if(res.errMsg == "cloud.callFunction:ok"){ that.isLoading = false wx.stopPullDownRefresh(); setTimeout(function(){ wx.hideLoading() },500) } } }) }, 能渲染出来,就是不知道为什么会偶尔出现偶尔出现了又消失了,有时候干脆没有显示 [视频]
2020-09-19 - 小程序太可怕,偶尔不赋值?
在onload中调用云函数,用setdata赋值成功,但是页面绑定的变量为空,后台打印赋值成功了,但是标签页没有内容,偶尔出现,有时候返回上一层再进又显示了,大写的服气 [图片] [图片]
2020-09-14