feat: 增加用户关注列表 和 用户详情页

This commit is contained in:
alger
2025-03-24 22:54:04 +08:00
parent 9f5bac29a0
commit 2924ad6c18
13 changed files with 1059 additions and 16 deletions
+8 -2
View File
@@ -27,7 +27,8 @@ const baseURL = window.electron
const request = axios.create({
baseURL,
timeout: 5000
timeout: 5000,
withCredentials: true
});
// 最大重试次数
@@ -54,8 +55,13 @@ request.interceptors.request.use(
timestamp: Date.now()
};
const token = localStorage.getItem('token');
if (token) {
if (token && config.method !== 'post') {
config.params.cookie = config.params.cookie !== undefined ? config.params.cookie : token;
} else if (token && config.method === 'post') {
config.data = {
...config.data,
cookie: token
};
}
if (isElectron) {
const proxyConfig = setData?.proxyConfig;