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

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

问题

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

解决

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

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

看图,网上帖子对新手不友好,还不好用就重启,亲测有效
uniapp 微信小程序,开启定位权限,permission : scope.userLocation_第1张图片
uniapp 微信小程序,开启定位权限,permission : scope.userLocation_第2张图片

你可能感兴趣的:(uniapp,小程序,定位)