onshow 在页面加载中没有触发
发布于 5 年前 作者 wuguiying 14290 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)
  • 预期表现
  • 复现路径
  • 提供一个最简复现 Demo

onshow 在页面加载中没有触发

1 回复

onShow() {

var that = this

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

wx.getLocation({

success: function (res) {

that.setData({

longitude: res.longitude,

latitude: res.latitude

})

}

})

},

回到顶部