修复了爆炸现场

main
白封羽 2022-12-26 21:20:24 +08:00
parent 5c55686420
commit 415075c217
3 changed files with 97 additions and 162 deletions

View File

@ -1,3 +1,4 @@
export interface Token {
accessToken: string;
refreshToken: string;

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,8 @@
import axios, {AxiosRequestConfig, AxiosResponse} from "axios";
import {store} from "../models/store";
//export const baseUrl = "https://www.hammer-hfut.tk/api/"
export const baseUrl = "https://mock.apifox.cn/m1/2116708-0-ae5ae4e4/"
export const baseUrl = "http://101.34.228.45:8080/"
//export const baseUrl = "https://mock.apifox.cn/m1/2116708-0-ae5ae4e4/"
const axiosInstance = axios.create({
baseURL: baseUrl,
@ -11,7 +12,8 @@ const axiosInstance = axios.create({
axiosInstance.interceptors.request.use(
function (config: AxiosRequestConfig) {
console.log(config)
// @ts-ignore
config.headers.Authorization = "bearer "+store.getState().token.accessToken
return config
},
function (error) {