refactor(backend): 重构后端代码 wave 3
This commit is contained in:
1 parent
affe139bf9
commit
8415653365
97 files changed
+4673
-6164
No files matched your search
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* features/auth/views/ResetPasswordView.vue
|
||||
* 企微 textcard / 邮件链接重置密码页(/reset-password?token=...)。
|
||||
* 依赖:user.api resetPasswordConfirm、vue-i18n、MinimalShell。
|
||||
* 依赖:auth.api confirmPasswordReset、vue-i18n、MinimalShell。
|
||||
* 逻辑:校验 token 与两次密码一致后调 confirm 接口,成功后跳转 /login。
|
||||
*/
|
||||
import { onMounted, ref } from 'vue';
|
||||
@@ -10,7 +10,7 @@ import { useRoute, useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { Lock, AlertCircle, CheckCircle } from 'lucide-vue-next';
|
||||
import MinimalShell from '@/shared/layouts/MinimalShell.vue';
|
||||
import { resetPasswordConfirm } from '@/features/auth/api/user.api';
|
||||
import { confirmPasswordReset } from '@/features/auth/api/auth.api';
|
||||
import { BusinessError } from '@/shared/api/client';
|
||||
import { resolveCasdoorErrorMessage } from '@/shared/utils/casdoor';
|
||||
|
||||
@@ -65,7 +65,7 @@ onMounted(() => {
|
||||
|
||||
/**
|
||||
* 提交新密码并重置 token。
|
||||
* 核心逻辑:前端校验 → resetPasswordConfirm → 成功 3 秒后跳转登录页。
|
||||
* 核心逻辑:前端校验 → confirmPasswordReset → 成功 3 秒后跳转登录页。
|
||||
*/
|
||||
const handleReset = async () => {
|
||||
if (!token.value) {
|
||||
@@ -91,7 +91,7 @@ const handleReset = async () => {
|
||||
message.value = '';
|
||||
|
||||
try {
|
||||
await resetPasswordConfirm(token.value, password.value);
|
||||
await confirmPasswordReset(token.value, password.value);
|
||||
status.value = 'success';
|
||||
message.value = t('resetPassword.successRedirect');
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in new issue
Block a user