sonar 58 left

This commit is contained in:
Cindy Chang
2024-08-01 16:06:30 +08:00
parent a426f22db0
commit a33eaa3a41
3 changed files with 10 additions and 9 deletions

View File

@@ -87,7 +87,7 @@ export default {
},
created() {
// Save token in Headers.
const token = document.cookie.replace(/(?:(?:^|.*;\s*)luciaToken\s*\=\s*([^;]*).*$)|^.*$/, "$1");
const token = document.cookie.replace(/(?:(?:^|.*;\s*)luciaToken\s*=\s*([^;]*).*$)|^.*$/, "$1");
this.$http.defaults.headers.common['Authorization'] = `Bearer ${token}`;
},
// 重新整理畫面以及第一次進入網頁時beforeRouteEnter這個hook會被執行然而beforeRouteUpdate不會被執行