fix: Remove my-account API in main page.
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
|
||||
<script>
|
||||
import { storeToRefs } from 'pinia';
|
||||
import LoginStore from '@/stores/login.js';
|
||||
import LoadingStore from '@/stores/loading.js';
|
||||
import AllMapDataStore from '@/stores/allMapData.js';
|
||||
import ConformanceStore from '@/stores/conformance.js';
|
||||
@@ -23,15 +22,13 @@ import { leaveFilter, leaveConformance } from '@/module/alertModal.js';
|
||||
export default {
|
||||
name: 'MainContainer',
|
||||
setup() {
|
||||
const loginStore = LoginStore();
|
||||
const loadingStore = LoadingStore();
|
||||
const allMapDataStore = AllMapDataStore();
|
||||
const conformanceStore = ConformanceStore();
|
||||
const { checkLogin } = loginStore;
|
||||
const { tempFilterId, createFilterId, temporaryData, postRuleData, ruleData } = storeToRefs(allMapDataStore);
|
||||
const { conformanceLogTempCheckId, conformanceFilterTempCheckId } = storeToRefs(conformanceStore);
|
||||
|
||||
return { checkLogin, loadingStore, temporaryData, tempFilterId, createFilterId, postRuleData, ruleData, conformanceLogTempCheckId, conformanceFilterTempCheckId, allMapDataStore, conformanceStore };
|
||||
return { loadingStore, temporaryData, tempFilterId, createFilterId, postRuleData, ruleData, conformanceLogTempCheckId, conformanceFilterTempCheckId, allMapDataStore, conformanceStore };
|
||||
},
|
||||
components: {
|
||||
Header,
|
||||
@@ -42,9 +39,6 @@ export default {
|
||||
// Save token in Headers.
|
||||
const token = document.cookie.replace(/(?:(?:^|.*;\s*)luciaToken\s*\=\s*([^;]*).*$)|^.*$/, "$1");
|
||||
this.$http.defaults.headers.common['Authorization'] = `Bearer ${token}`;
|
||||
|
||||
// check login for 'my-account' api
|
||||
this.checkLogin();
|
||||
},
|
||||
beforeRouteUpdate(to, from, next) {
|
||||
// 離開 Map 頁時判斷是否有無資料和需要存檔
|
||||
|
||||
Reference in New Issue
Block a user