一般使用axios來POST數據都正常
就只有登入跟註冊api透過 /oauth/
都會發生
The page has expired due to inactivity.
Please refresh and try again.
的問題,請問該如何解決
我是使用https://pressurejs.com的程式,透過npm install pressure --save,
想請問如何在 app.js 載入他,以及如何在我的component使用?
我好像找到問題
我console.log(Store.state.authenticated) 出來是 undefined
抱歉 更正一下
是多了
router.beforeEach((to, from, next) => {
if(to.meta.requiresAuth){
if(Store.state.authenticated){
return next()
}else{
return next({'name': 'login'})
}
}
})
components就沒辦法宣染出來了
原本是使用
export default new VueRouter({
mode:'history',
routes,
})
改成了
const router = new VueRouter({
mode:'history',
routes,
})
export default router
頁面就不會出來了
我在想是不是const的原因?
因為console也沒有任何的錯誤
想請教大神這要怎麼排除
謝謝,晚點來研究一下
抱歉又來提問了
透過 npm run watch 會幫我把我的組件編譯成 app.js 的檔案
但是我有兩個問題
app.js檔案過大,一隻要好幾MB,對於使用者瀏覽網站體驗不太好,想請問大神這個部分要怎麼處理
常常看到人家的 app.js 後方還有一串 英文加數字的亂碼來作為版本控制的樣子,如果瀏覽者的亂碼不一樣就要重新下載我的app.js不能用它緩存的檔案,想請教這個部分要怎麼處理呢
感謝
了解了,謝謝您!
跟著SPA的章節走,有一些畫面想另外做呈現(像是登入頁面),不要用App.Vue裡面的組件,要怎麼另外指定一個router到設定好的頁面不透過App.Vue?