const http = axios.create() http.interceptors.request.use( config => { // 加你的判断条件 if(...) { config.headers['content-type'] = 'application/x-www-form-urlencoded' } } )