修复了爆炸现场
parent
5c55686420
commit
415075c217
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
export interface Token {
|
export interface Token {
|
||||||
accessToken: string;
|
accessToken: string;
|
||||||
refreshToken: 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 axios, {AxiosRequestConfig, AxiosResponse} from "axios";
|
||||||
|
import {store} from "../models/store";
|
||||||
|
|
||||||
//export const baseUrl = "https://www.hammer-hfut.tk/api/"
|
export const baseUrl = "http://101.34.228.45:8080/"
|
||||||
export const baseUrl = "https://mock.apifox.cn/m1/2116708-0-ae5ae4e4/"
|
//export const baseUrl = "https://mock.apifox.cn/m1/2116708-0-ae5ae4e4/"
|
||||||
|
|
||||||
const axiosInstance = axios.create({
|
const axiosInstance = axios.create({
|
||||||
baseURL: baseUrl,
|
baseURL: baseUrl,
|
||||||
|
@ -11,7 +12,8 @@ const axiosInstance = axios.create({
|
||||||
axiosInstance.interceptors.request.use(
|
axiosInstance.interceptors.request.use(
|
||||||
function (config: AxiosRequestConfig) {
|
function (config: AxiosRequestConfig) {
|
||||||
console.log(config)
|
console.log(config)
|
||||||
|
// @ts-ignore
|
||||||
|
config.headers.Authorization = "bearer "+store.getState().token.accessToken
|
||||||
return config
|
return config
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
|
|
Loading…
Reference in New Issue