This commit is contained in:
2025-05-06 22:16:31 +08:00
commit 54f5caeeaa
33 changed files with 7191 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import axios from "axios"
import { getEncodeHeader } from "./tool/index"
// axios 拦截器
const api = axios.create({
baseURL: "https://live-open.biliapi.com"
// baseURL: "http://test-live-open.biliapi.net" //test
})
// 鉴权加密处理headers下次请求自动带上
api.interceptors.request.use(config => {
const headers = getEncodeHeader(
config.data,
global.appKey,
global.appSecret
)
console.log('headers: ', headers)
config.headers = headers
return config
})
export default api