更改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; } }