uniapp 微信小程序,开启定位权限,permission : scope.userLocation

uniapp 微信小程序,开启定位权限,scope.userLocation

问题

在网上看了好多帖子,一言两语,想骂人,

解决

注意uniapp项目在manifest.json 文件下配置,不要迷路

  "mp-weixin": {
    /* 微信小程序特有相关 */
    "appid": "wxxxxxxxxxxxxx2",
    "setting": {
      "urlCheck": false
    },
    "usingComponents": true,
    "permission": {
      "scope.userLocation": {
        "desc": "小程序将使用定位功能"
      }
    }
  },

看图,网上帖子对新手不友好,还不好用就重启,亲测有效
在这里插入图片描述
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_43141746/article/details/107624142