-
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-09-27 16:14:58
wxml
<view bindtap="getLocalPath">{{localPath}}</view>
js
data: {
localPath:"请选择位置",
},
getLocalPath:function(){
var that = this;
wx.chooseLocation({
success: function(res) {
that.setData({localPath:res.address});
},
})
},