總而言之 簡單粗暴
uni.getLocation({
type:''wgs84",
geocode:true,//必寫項
success:(res)=>{
if (data.address){
this.city = data.address.city;
var city = this.city
uni.request({
url:'http://wthrcdn.etouch.cn/weather_mini?city=' + city,
data:{},
success:(res)=>{
console.log(res)
}
})
}
}
})