diff --git a/.env.development b/.env.development index 12912cd..9b5fc16 100644 --- a/.env.development +++ b/.env.development @@ -6,6 +6,7 @@ VITE_GLOB_API_URL=/basic-api # 全局加密开关(即开启了加解密功能才会生效 不是全部接口加密 需要和后端对应) VITE_GLOB_ENABLE_ENCRYPT=true +# VITE_APP_ENCRYPT=true # RSA公钥 请求加密使用 注意这两个是两对RSA公私钥 请求加密-后端解密是一对 响应解密-后端加密是一对 VITE_GLOB_RSA_PUBLIC_KEY=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdHnzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ== # RSA私钥 响应解密使用 注意这两个是两对RSA公私钥 请求加密-后端解密是一对 响应解密-后端加密是一对 diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index 0ec23d5..7eb46e2 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -74,7 +74,9 @@ export function userAdd(data: any) { } export function userUpdate(data: any) { - return defHttp.putWithMsg({ url: Api.root, data }); + return defHttp.putWithMsg({ url: Api.root, data },{ + encrypt: true, + },); } export function userStatusChange(data: any) { diff --git a/src/locales/setupI18n.ts b/src/locales/setupI18n.ts index 80f9c6c..ae6d71e 100644 --- a/src/locales/setupI18n.ts +++ b/src/locales/setupI18n.ts @@ -13,7 +13,7 @@ export let i18n: ReturnType; async function createI18nOptions(): Promise { const localeStore = useLocaleStoreWithOut(); const locale = localeStore.getLocale; - const defaultLocal = await import(`./lang/${locale}.ts`); + const defaultLocal = await import(`./lang/${locale}`); const message = defaultLocal.default?.message ?? {}; setHtmlPageLang(locale);