- 小程序中引用了高德通过授权获取经纬度信息,本地测试的时候会提示用户授权,授权后相应操作也可以获取经纬度。但是上线后, 不会提示用户授权,也获取不到经纬度。已经把 高德的https://restapi.amap.com添加到request合法域名中,这是为啥?应该怎么调整》?
- 以下是本地测试时正常提示与获取信息
上线后,提示的错误信息:MiniProgramError
e.fail is not a function. (In 'e.fail({errCode:"0",errMsg:r.errMsg||""})', 'e.fail' is undefined)
TypeError: e.fail is not a function. (In 'e.fail({errCode:"0",errMsg:r.errMsg||""})', 'e.fail' is undefined)
fail@https://usr//app-service.js:7704:103930
@https://lib/WAServiceMainContext.js:1:883480
at <api getLocation fail callback function>
Ou@https://lib/WAServiceMainContext.js:1:644304
Nu@https://lib/WAServiceMainContext.js:1:645036
@https://lib/WAServiceMainContext.js:1:645235
s@https://lib/WAServiceMainContext.js:1:123191
callAndRemove@https://lib/WAServiceMainContext.js:1:118739
invokeCallbackHandler@https://lib/WAServiceMainContext.js:1:122238
登录小程序后台,设置--基础设置
可以检查下
1.隐私协议设置有没有添加?
2.隐私接口有没有开通获取当前位置经纬度权限?