更改router 的base // biz是二级目录,路由文件改成
const router = new VueRouter({
  mode: 'history',
  // base: process.env.BASE_URL,
  base: '/biz/', // biz是二级目录
  routes
})

下面是nginx配置

server {
        listen       34567;
        server_name  localhost;
        location / {
            index  index.html index.htm;
            try_files $uri $uri/ /biz/index.html;
        }
}

 

相关文章:

  • 2021-06-23
  • 2021-07-17
  • 2022-03-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-14
猜你喜欢
  • 2021-07-28
  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
相关资源
相似解决方案