nginx 403,vue3跳转新页面

451 阅读1分钟
  1. nginx访问站点出现如下问题

image.png 原因有一:

location / {
            root   /var/www/html;
            index  index.html index.htm;
        }

相应的/var/www/html目录下没有配置index.html文件。

2.vue3跳转新页面
方法一:windows.open(url,target)

const goToUrl = function (item) {
  if(item.id>3){
      let { href } = router.resolve({
          path:item.url,
          query:{
              id:item.id
          }
      })
      window.open(href,"_blank") // 当前站点跳转子页面,重开一个新窗口, href为如 /qrcode
  }else {
      window.open(item.url,"_blank") // 第三方链接跳转,如 https://www.baidu.com
  }
}