Add centralized API client with axios interceptors, remove vue-axios
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -85,11 +85,6 @@ export default {
|
||||
'refreshToken',
|
||||
],),
|
||||
},
|
||||
created() {
|
||||
// Save token in Headers.
|
||||
const token = getCookie('luciaToken');
|
||||
this.$http.defaults.headers.common['Authorization'] = `Bearer ${token}`;
|
||||
},
|
||||
// 重新整理畫面以及第一次進入網頁時,beforeRouteEnter這個hook會被執行,然而beforeRouteUpdate不會被執行
|
||||
// PSEUDOCODE
|
||||
// if (not logged in) {
|
||||
|
||||
Reference in New Issue
Block a user