Commit aceab809 authored by 郑磊's avatar 郑磊

更新axios实例的默认参数

parent 7de43669
......@@ -69,8 +69,15 @@ const INTERNAL_OPTION_KEYS: (keyof ApiRequestDefaultOptions)[] = [
/**
* 创建用于请求接口的Axios实例
*/
export function createAxiosInstance(): ApiAxiosInstance {
const instance = axios.create()
export function createAxiosInstance(
options: CreateInstanceDefaults = {
source: 'xinxiuweb',
app_version: '1.0.0',
device: 'wap',
signature_secret: 'asdasgfdwqew',
},
): ApiAxiosInstance {
const instance = axios.create(options)
//按倒序注入请求拦截器,最后处理的最先注入
//加密请求体
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment