h5 获取经纬度
function getLocation() {
    if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition((res) => {
            console.log("经度" + res.coords.longitude + "纬度" + res.coords.latitude)
        })
    }
    else {
        alert("Geolocation is not supported by this browser.")
    }
}
Nuxt3 ssg 报错问题处理
可以在 nuxt.config.ts 中添加如下配置试试
nitro: {
  routeRules: {
    "/*": {
      cors: true,
    },
  },
  prerender: {
    crawlLinks: true,
    failOnError: false,
  },
  externals: {
    traceInclude: [],
  },
}
