vue开发高德地图点击地图获取到了经纬度但是用逆地理编码获取信息失败返回INVALID_USER_SCODE

// 初始化地图
    init() {
      AMapLoader.load({
        key: "20e*****************fef3bcd2", // 申请好的Web端开发者Key
        version: "2.0", // 指定要加载的 JSAPI 的版本
        plugins: ["AMap.Geolocation", "AMap.Geocoder", "AMap.Marker"], // 需要使用的的插件列表
      })
        .then((AMap) => {
          this.map = new AMap.Map("map", {
            zoom: 13, //缩放比例
            center: [120.306376, 31.588048],
            viewMode: "2D",
            terrain: true, //开启地形图
            mapStyle: "amap://styles/dark",
          });
        })
        .catch((e) => {
          console.log(e, "地图加载失败");
        });
    },
//点击地图
    clickLocation() {
      this.map.on("click", this.clickMap);
    },
    clickMap(e) {
      let arr = [e.lnglat.lng, e.lnglat.lat];
      console.log(arr);
      if (this.mark) {
        this.map.removeControl(this.mark);
      }
      this.mark = new AMap.Marker({
        position: arr,
      });
      this.geocoder = new AMap.Geocoder({
        city: "全国",
        radius: 500,
        extensions: "all",
      });
      this.map.addControl(this.mark);
      try {
        this.geocoder.getAddress(arr, function (status, result) {
          console.log(status, result);
        });
      } catch (error) {
        console.log(error, "错误");
      }
    },

这个的得看 api 得说明文档 具体代表什么

看你的写法好像用安装的是原生的amap,我安装的vue-amap也有同样问题,搜索的时候也报这个错,好像是密钥的问题官方给了个这么个解决办法,但是我安装的vue-amap这样写还是不行,你可以试试

img