在微信小程序中,我们可以很方便的通过API接口来获取我们当前的位置,接下来我讲告诉大家微信获取定位的API—wx.getLocation的用法,以及我们通过获取定位,得到当地的位置,天气等信息。
{{weather.temperature.data}}℃ {{weather.weather.data}} {{weather.winddirection.data}} {{weather.windpower.data}} 友情提示:今天天气不错,是风和日丽的,适合出去玩 {{weather.city.data}}