修复了爆炸现场
parent
5c55686420
commit
415075c217
|
@ -1,3 +1,4 @@
|
|||
|
||||
export interface Token {
|
||||
accessToken: string;
|
||||
refreshToken: string;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue