wxml
<button open-type="getUserInfo" bindgetuserinfo="fetchInfo">获取位置</button><view bindtap="getLocalPath">{{localPath}}</view>
js
data: { "localPath":"请选择位置" }, getLocalPath:function(){ var that = this;
//调用微信位置接口 wx.chooseLocation({ success:function(res){ that.setData({localPath:res.address}); }, }) },