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:
2026-03-06 12:44:33 +08:00
parent 6af7253d08
commit 147b16ca34
29 changed files with 301 additions and 270 deletions

View File

@@ -137,7 +137,6 @@
</template>
<script>
import { storeToRefs, mapActions, } from 'pinia';
import axios from 'axios';
import moment from 'moment';
import LoadingStore from '@/stores/loading.js';
import PerformanceStore from '@/stores/performance.js';
@@ -152,7 +151,6 @@ import { simpleTimeLabel, followTimeLabel,
} from '@/module/timeLabel.js';
import FreqChart from './FreqChart.vue';
import { PRIME_VUE_TICKS_LIMIT } from '../../../constants/constants.js';
import { getCookie } from "@/utils/cookieUtil.js";
const primeVueTicksLimit = PRIME_VUE_TICKS_LIMIT;
@@ -921,10 +919,6 @@ export default {
if (isCheckPage) {
const conformanceStore = ConformanceStore();
// Save token in Headers.
const token = getCookie('luciaToken');
axios.defaults.headers.common['Authorization'] = `Bearer ${token}`;
switch (to.params.type) {
case 'log':
conformanceStore.conformanceLogCreateCheckId = to.params.fileId;