微信小程序
1.要获取用户的地理位置时,只需要:
wx.getLocation({
type: ‘wgs84’,
success: (res) => {
const latitude = res.latitude // 纬度
const longitude = res.longitude // 经度
}
})
2.调用微信扫一扫能力,只需要:
wx.scanCode({
success: (res) => {
console.log(res)
}
})
3.名字就可以把该组件显示在界面上,例如,你需要在界面上显示地图,你只需要这样写即可: