在本地打开正常是这样的
在服务器上打开是这样的,别的页面都能打开,就这个页面不行
路由配置是`{
path: '/activate-account/:userEmail/:ConfirmKeyCode',
name: 'activateAccount',
component: activateAccount
},
在activateAccount页面中加了
created () {
location.pathname = '/lessoners/'
}
config/index.js中配置为`
module.exports = {
build: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
productionSourceMap: true,
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
bundleAnalyzerReport: process.env.npm_config_report
},
dev: {
env: require('./dev.env'),
port: 8080,
autoOpenBrowser: true,
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
// Ajax
'/lessonersapi': {
target: 'http://192.168.1.145',
changeOrigin: true,
},
}
assetsPublicPath改为 './',从本地打开就会出现cannot Get/ 没有用history模式,求解?
大话西游666
RISEBY
www说
相关分类