为什么scope.userLocationBackground在wx.authorize中不起作用?
发布于 7 年前 作者 wzhang 8105 次浏览 来自 官方Issues

原本scope:那里设为scope.userLocationBackground,但是点击后直接调用fail了,改成scope.userLocation才能弹出授权提示。

在app.json也定义了scope.userLocationBackground,但奇怪的是运行的时候会有警告。

而且文档中对调用opensetting后页面展示的效果是这样的:

而我调用的效果是这样的:

附上这段代码:

有没有可能是scope.userLocationBackground有什么问题?还是我理解或是代码出了什么问题?另外我版本号是2.9.4

先谢过,鞠躬~

1 回复

你好,需要在app.json中配置requiredBackgroundModes: [‘location’]后使用

回到顶部