1、去掉访问url中的"#"
修改main.js文件,添加mode: 'history'
const RouterConfig = {
  mode: 'history',
  routes: MainRoute
}
const router = new VueRouter(RouterConfig)2、vue项目build后发布的nginx的404问题
修改nginx配置文件
location / {
        root   /usr/share/nginx/html;
        try_files $uri $uri/ /index.html$is_args$args; ##添加这行
        index  index.html index.htm;
    }原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/opensource/193195.html
