Merge pull request '注销后自动退出登录' (#12) from delete_account into main

Reviewed-on: https://git.wishpal.cn/wishpal_ironfan/tiefen_space_h5/pulls/12
This commit is contained in:
yezian 2024-12-25 17:06:30 +08:00
commit 17f58f0ade
1 changed files with 7 additions and 2 deletions

View File

@ -7,6 +7,8 @@ import { faAngleLeft } from "@fortawesome/free-solid-svg-icons";
import { useRouter } from "next/navigation";
import { formatDeadline } from "@/utils/tools";
import requireAPI from "@/utils/requireAPI";
import { handleLogout } from "@/api/public";
export default function DeleteAccount() {
const [deadline, setDeadline] = useState();
const router = useRouter();
@ -49,6 +51,8 @@ export default function DeleteAccount() {
}
checkAccountStatus();
showMobal.current?.close();
await handleLogout();
router.replace("/login");
} catch (error) {
// console.error(error);
}
@ -73,7 +77,8 @@ export default function DeleteAccount() {
const handleShowDialog = () => {
showMobal.current = Dialog.show({
title: "您确认要注销此账号吗?",
content: "注销后无法恢复,请仔细阅读《注销必看须知》后确认。",
content:
"提交注销后我们将在7个自然日后完全清除您的账号信息在此期间若您再次登陆则视为放弃注销。请仔细阅读《注销必看须知》后确认。",
bodyStyle: {
maxHeight: "none",
width: "80vw",
@ -144,7 +149,7 @@ export default function DeleteAccount() {
</p>
<p className="text-white text-base font-medium mt-2">3注销时间</p>
<p className="text-[#FFFFFFB2] text-base">
您发起注销账户申请后我们将在7个自然日后完全清除您的账号信息在此期间您可以随时在本页面撤销该申请
您发起注销账户申请后我们将在7个自然日后完全清除您的账号信息在此期间若您再次登陆则视为放弃注销
</p>
<p className="text-white text-base font-medium mt-2">4其他</p>
<p className="text-[#FFFFFFB2] text-base">