欢迎关注前端小讴的github,阅读更多原创技术文章
问题一:assetsPublicPath配置错误
解决办法:打开config/index.js文件前端
build:{ // assetsPublicPath: '/' assetsPublicPath: './' }
问题二:路由history模式配置有误
解决办法:关闭路由historym模式git
export default new Router({ // mode: 'history', // require service support scrollBehavior: () => ({ y: 0 }), routes: constantRouterMap })