vue打包之后的dist文件夹下的文件,我直接放到服务器的某个文件夹下,例如根目录下的wx文件夹,然后界面里面写的router都不跳转了,请问应该怎么解决?
wx重定向地址:
var redirecturl = encodeURIComponent(http://域名/wx/index.html
)
vuerouter配置:
export default new Router({
// mode: 'history',
// base: '/wx/',
routes: [
// ==首页==
{
path: '/',
name: 'Home',
component: () => import('@/components/Home'),
meta: { title: 'Home' }
},
{
path: '/SendExpress',
name: 'SendExpress',
component: () => import('@/components/SendExpress'),
meta: { title: 'SendExpress' }
}
]
})
界面里面跳转方法:
this.$router.push('/UserList')
但是点了之后打印可以发现方法触发了,但是界面不会跳转。这是什么原因呢
webpack的publicPath设置为./