new UI and handle cashing

This commit is contained in:
2026-06-16 19:47:28 +03:30
parent e174ae28c5
commit 6e5ea0319f
41 changed files with 2936 additions and 641 deletions
+7 -3
View File
@@ -1,4 +1,5 @@
import {baseURL} from '@/themeConfig'
import { getConfigApp } from '@/utils/config'
import { baseURL as fallbackBaseURL } from '@/themeConfig'
import type {AxiosRequestConfig, AxiosResponse} from 'axios'
import axios from 'axios'
import {getToken, removeToken} from "@/utils";
@@ -20,13 +21,16 @@ const headers = {
}
const _axios = axios.create({
baseURL,
baseURL: fallbackBaseURL,
headers,
})
_axios.interceptors.request.use(
(config) => {
//console.log('request config', config)
const runtimeBaseURL = getConfigApp('node_server')
if (runtimeBaseURL) {
config.baseURL = runtimeBaseURL
}
if (config.headers) {
const token = getToken()
if (token) {