feat: i18n与jetcache

This commit is contained in:
2023-11-16 10:04:27 +08:00
parent d366daeccc
commit ac856ed2f6
24 changed files with 476 additions and 114 deletions

View File

@@ -18,10 +18,12 @@ const service = axios.create({
// request拦截器
service.interceptors.request.use(
config => {
const lang = localStorage.getItem('lang')
if (getToken()) {
config.headers['Authorization'] = getToken() ? 'Bearer ' + getToken() : undefined // 让每个请求携带自定义token 请根据实际情况自行修改
}
config.headers['Content-Type'] = 'application/json'
config.headers['Accept-Language'] = lang
return config
},
error => {