小程序开发中,清除受权状态后,从新编译,提示:getLocation 须要在 app.json 中声明 Permission 字段json
须要在 app.json 里面增长 permission 属性配置(小游戏需在game.json中配置):小程序
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展现"
}
},
效果:app
肯定以后便可受权。spa