onShow

发布于 6 年前作者 djin6190 次浏览最后编辑 6 年前来自 ask

小程序第一次启动home 页面,数据加载成功 onshow 方法没走

onShow: function() {

var that = this;

wx.onUserCaptureScreen(function(res) {

var screenshotlog = wx.getStorageSync(“screenshotlog”)

console.log(“======================onUserCaptureScreen”, screenshotlog + “========”);

if (screenshotlog) {

that.post();

}

});

},

日志没有打印出来

2 回复
xiuying69
xiuying691 楼6 年前

用户主动截图才会触发onUserCaptureScreen,如果没用系统截屏按键截屏,日志不会打印的吧

lihao
lihao2 楼4 年前

碰到过同样的情况,后来发现是有两个 onShow。