小程序
小游戏
企业微信
微信支付
扫描小程序码分享
- 当前 Bug 的表现(可附上截图)
- 预期表现
- 复现路径
- 提供一个最简复现 Demo
onshow 在页面加载中没有触发
1 个回答
onShow() {
var that = this
console.log("获取定位开始")
wx.getLocation({
success: function (res) {
that.setData({
longitude: res.longitude,
latitude: res.latitude
})
}
},
内容中可能包含密钥、AppSecret等私密参数,泄漏会有安全风险,请检查内容并确认。
onShow() {
var that = this
console.log("获取定位开始")
wx.getLocation({
success: function (res) {
that.setData({
longitude: res.longitude,
latitude: res.latitude
})
}
})
},