onshow 在页面加载中没有触发

发布于 7 年前作者 wuguiying14427 次浏览最后编辑 7 年前来自 ask
  • 当前 Bug 的表现(可附上截图)

  • 预期表现

  • 复现路径

  • 提供一个最简复现 Demo

onshow 在页面加载中没有触发

1 回复
na40
na401 楼5 年前

onShow() {

var that = this

console.log(“获取定位开始”)

wx.getLocation({

success: function (res) {

that.setData({

longitude: res.longitude,

latitude: res.latitude

})

}

})

},