發布之后正常訪問的地址為http://zhangsan.lisi/index.html#/ 這樣是沒有問題的
但如果直接以http://zhangsan.lisi/訪問不會跳轉到index.html界面,而是會出現直觀的資料

不管是本地發布還是服務器發布都會這樣
但本地直接run dev的時候是沒有問題的,哪怕把后面的/index.html#/刪掉也是會能跳轉到index.html界面的
路由里面也是寫了*和/ 的跳轉的
{
path: "*",
redirect: "/"
},
{
path: '/',
redirect: '/index/IndexPage',
name: '首頁',
component: DefaultContainer,
children: [{
path: 'index',
redirect: '/index/IndexPage',
name: '',
component: {
render(c) {
return c('router-view')
}
},
children: [{
path: 'IndexPage',
name: '首頁',
component: IndexPage
}]
}]
},請問有人遇過這樣的情況嗎??
uj5u.com熱心網友回復:
登錄情況下就會出現這個問題,未登錄的時候會跳轉登錄界面轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/55625.html
標籤:其他技術討論專區
上一篇:關于影像識別的AP問題
