onReady:function(){
let that = this;
var _id = that.data.commentId;
if(_id > 0){
console.log("pageScrollTo");
wx.pageScrollTo({
selector:'#Comment_'+_id,
duration: 100,
success: res => {
console.log(res)
},
complete: res => {
console.log(res)
}
});
}
}
在开发工具中执行没有问题,在iPhone7P的真机上没有滑动效果,且在真机上发现没有pageScrollTo方法返回,十分无奈,有能提供帮助的同学吗
弄一个 [ 能复现问题的简单的 ] 代码片段,我帮你看看
https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html
请学会如何「提问」(👈戳我)、【个体工商户】微信认证问题(👈戳我)
提供可复现问题的代码片段。我尝试下。
https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html
onReady: function () { let that = this; var _id = that.data.commentId; if (_id > 0) { console.log("pageScrollTo"); setTimeout(() => { wx.pageScrollTo({ selector: "#Comment_" + _id, duration: 100, success: (res) => { console.log(res); }, complete: (res) => { console.log(res); }, }); }, 500); } },
iPhone没有滑动效果