@@ -114,7 +114,11 @@
"optimization" : {
"subPackages" : true
},
- "permission" : {}
+ "permission" : {
+ "scope.userLocation" : {
+ "desc" : "获取当前天气"
+ }
"mp-alipay" : {
"usingComponents" : true
@@ -96,6 +96,12 @@
myAmapFun.getWeather({
success:res=>{
this.weatherInfo = res.liveData;
+ },
+ fail:err=>{
+ uni.showModal({
+ title:'天气',
+ content:JSON.stringify(err)
+ })
}
})