tangning 1 rok temu
rodzic
commit
56021045b5
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/utils/http/axios/index.ts

+ 1 - 1
src/utils/http/axios/index.ts

@@ -140,7 +140,7 @@ const transform: AxiosTransform = {
     // 请求之前处理config
     const token = getToken();
     const { locale } = useI18n();
-    const lang = locale == 'zh-CN' ? 'zh' : 'en';
+    const lang = locale.value == 'zh-CN' ? 'zh' : 'en';
     console.log('locale', locale);
     if (token && (config as Recordable)?.requestOptions?.withToken !== false) {
       // jwt token