onReachBottom 安卓端不触发
发布于 4 年前 作者 fanxia 13132 次浏览 来自 问答

线上项目刚出现的问题,求官方解答

2 回复

你好,请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

所有安卓机型 可关注非诚勿撩和鹿鹿Lite 两款小程序 ios可以滑动,安卓滑不了了

//上滑加载更多

onReachBottom: function () {

var that = this;

var systemp = that.data.systemmsg

if (systemp.indexOf(“iOS”) != -1) {

wx.pageScrollTo({

scrollTop: 0,

duration: 0

})

} else {

wx.pageScrollTo({

scrollTop: 0,

duration: 300

})

}

num++;

if (num < that.data.peoplelist.length) {

that.setData({

isShowId: that.data.peoplelist[num],

// huashow: false,

});

var token = wx.getStorageSync(‘token’);

var user_id = that.data.peoplelist[num - 1].id;

if (token == ‘’) {

that.setData({

videoplay: false,

status: 1

})

//that.markAsRead();

} else {

server.post(server.like_reject_others, {

token: token,

user_id: user_id,

status: 2,

}).then(res => {

if (res.data.key == 1000) {

that.setData({

videoplay: false,

status: 1

})

//that.markAsRead();

} else if (res.data.key == 1001) {

that.setData({

videoplay: false,

status: 1

})

//that.markAsRead();

} else if (res.data.key == 1200) {

that.setData({

modal2Hidden: true,

modalHiddenb: true,

})

} else if (res.data.key == 1245) {

wx.showModal({

content: res.data.message,

showCancel: false,

});

return false;

} else {

wx.showModal({

content: res.data.message,

showCancel: false,

});

//that.markAsRead()

}

})

}

var systemp= that.data.systemmsg

if (systemp.indexOf(“iOS”) != -1)  {

wx.pageScrollTo({

scrollTop: 0,

duration: 0

})

}else{

wx.pageScrollTo({

scrollTop: 0,

duration: 300

})

}

} else {

num = that.data.peoplelist.length - 1

that.reloadCurrent();

// feedbackApi.showToast({ title: ‘没有更多了呦!’ })

var systemp = that.data.systemmsg

if (systemp.indexOf(“iOS”) != -1) {

wx.pageScrollTo({

scrollTop: 0,

duration: 0

})

} else {

wx.pageScrollTo({

scrollTop: 0,

duration: 300

})

}

}

console.log(num)

console.log(that.data.peoplelist.length)

},

回到顶部