Files
loan-pricing/doc/implementation-report-2026-03-30-login-password-encryption-frontend.md

17 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 密码加密传输前端实施记录
## 修改内容
- 新增 `ruoyi-ui/src/utils/passwordTransfer.js`,统一处理密码字段 AES/ECB/PKCS7 加密。
-`ruoyi-ui/package.json` 增加 `test:password-transfer` 脚本,并引入 `crypto-js` 依赖。
-`ruoyi-ui/src/api/login.js` 中为登录、注册请求只加密 `password` 字段。
-`ruoyi-ui/src/api/system/user.js` 中为个人修改密码、管理员新增用户、管理员重置密码请求加密受控密码字段。
-`ruoyi-ui/.env.development``ruoyi-ui/.env.staging``ruoyi-ui/.env.production` 增加 `VUE_APP_PASSWORD_TRANSFER_KEY` 配置。
- 页面组件保持明文表单值和原有校验逻辑不变。
## 新增验证
- 新增 `ruoyi-ui/tests/password-transfer-api.test.js`,覆盖密码加密工具、登录、注册、个人修改密码、管理员新增用户、管理员重置密码 API。
## 验证结果
- 执行 `npm run test:password-transfer`,结果通过。
- 执行 `npm run build:stage`,结果通过;仅存在既有的打包体积 warning无新增构建错误。