tiefen_space_h5/app/my/setting/page.js

67 lines
1.9 KiB
JavaScript
Raw Normal View History

2024-07-02 23:08:38 +08:00
"use client";
import React from "react";
import { List } from "antd-mobile";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faAngleLeft } from "@fortawesome/free-solid-svg-icons";
import { useRouter } from "next/navigation";
2024-07-12 22:52:48 +08:00
import {handleLogout} from "@/api/public"
2024-07-02 23:08:38 +08:00
export default function Setting() {
const router = useRouter();
return (
<div>
<div className="p-4 fixed top-0 z-10 w-full">
<div className="w-9 h-9 flex items-center justify-center bg-[#FFFFFF1A] rounded-full absolute">
<FontAwesomeIcon
icon={faAngleLeft}
size="xl"
onClick={() => {
router.back();
}}
/>
</div>
<p className="text-base text-center leading-9">设置</p>
</div>
{/* 内容 */}
<div className="pt-16 ">
<List mode="card">
<List.Item arrow onClick={() => {
2024-07-12 22:52:48 +08:00
handleLogout();
2024-07-03 19:59:39 +08:00
router.push("/login");
}}>退出账号</List.Item>
{/* <List.Item arrow onClick={() => {
2024-07-02 23:08:38 +08:00
router.push("/my/setting/switchAccount");
2024-07-03 19:59:39 +08:00
}}>切换账号</List.Item> */}
2024-07-02 23:08:38 +08:00
<List.Item arrow onClick={() => {
router.push("/my/setting/editPassword");
}}>修改密码</List.Item>
<List.Item
arrow
onClick={() => {
router.push("/my/setting/feedback");
}}
>
意见反馈
</List.Item>
<List.Item
arrow
onClick={() => {
router.push("/my/setting/deleteAccount");
}}
>
账号注销
</List.Item>
<List.Item
arrow
onClick={() => {
router.push("/my/setting/aboutUs");
}}
>
关于我们
</List.Item>
</List>
</div>
</div>
);
}