From b93e5f6364f82eb8523c49f1f64f9da96897d4ab Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Mon, 4 Dec 2023 16:36:07 +0800 Subject: [PATCH] http --- src/config/http.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/config/http.js b/src/config/http.js index b02cce6..94718e6 100644 --- a/src/config/http.js +++ b/src/config/http.js @@ -2,6 +2,7 @@ import axios from 'axios' import { Dialog } from './utils.js' import store from '../vuex/store' import router from '@/router' +import i18n from '../i18n/i18n' axios.defaults.timeout = 50000 axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8' @@ -19,6 +20,7 @@ axios.interceptors.request.use( config.data = config.data.formData } } + config.headers.post['Accept-Language'] = i18n.locale === 'en-us' ? 'en' : 'zh' return config }, error => {