feat: 多机构用户登录时选择机构(600临时token二次登录);设置密码页增加警示文案(Alert新增warning样式)

This commit is contained in:
2026-10-27 15:18:17 +08:00
parent 78a1e6c60a
commit 45b62ba131
4 changed files with 198 additions and 53 deletions

View File

@@ -13,6 +13,8 @@ import {
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Spinner } from "@/components/ui/spinner";
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
import { TriangleAlert } from "lucide-react";
import { initUserPassword } from "@/apis/user";
import { useMutation } from "@tanstack/react-query";
import { toast } from "sonner";
@@ -69,10 +71,17 @@ export function InitPassword() {
</div>
<div className="w-[480px] p-10 bg-white rounded-xl">
<div className="text-center text-2xl">设置密码</div>
<Alert variant="warning" className="mt-4">
<TriangleAlert />
<AlertTitle>首次登录请设置新密码</AlertTitle>
<AlertDescription>
设置成功后即可正常使用系统。密码长度 6-32 位,支持字母、数字和特殊字符
</AlertDescription>
</Alert>
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
className="space-y-8 mt-12"
className="space-y-8 mt-6"
>
<FormField
control={form.control}