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}); }, }) },

 

相关文章:

  • 2021-11-28
  • 2021-11-28
  • 2022-12-23
  • 2021-12-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-09-23
  • 2022-12-23
相关资源
相似解决方案