获取用户位置信息
-
wxml
<view bindtap="getLocalPath">{{localPath}}</view>
-
js
data: {
localPath:"请选择位置",
},
getLocalPath:function(){
var that = this;
wx.chooseLocation({
success: function(res) {
that.setData({localPath:res.address});
},
})
}, -
2023-08-13 19:52:34
wxml
<view bindtap="getLocalPath">{{localPath}}</view>
js
data: {
localPath:"请选择位置",
},
getLocalPath:function(){
var that = this;
wx.chooseLocation({
success: function(res) {
that.setData({localPath:res.address});
},
})
},