微信小程序第一次启动home 页面,数据加载成功 onshow 方法没走
onShow: function() {
var that = this;
wx.onUserCaptureScreen(function(res) {
var screenshotlog = wx.getStorageSync("screenshotlog")
console.log("======================onUserCaptureScreen", screenshotlog + "========");
if (screenshotlog) {
that.post();
}
});
},
日志没有打印出来
微信小程序开发问题解答
微信小程序开发者回答:
用户主动截图才会触发onUserCaptureScreen,如果没用系统截屏按键截屏,日志不会打印的吧
微信小程序开发者回答:
碰到过同样的情况,后来发现是有两个 onShow。
本文网址:http://www.91bianli.com/weixinxiaochengxu/11897.html