功能:邮件配置布局
This commit is contained in:
45
src/pages/Setup/components/Other/components/Email/index.tsx
Normal file
45
src/pages/Setup/components/Other/components/Email/index.tsx
Normal file
@@ -0,0 +1,45 @@
|
||||
import { Button, Form, Input } from "antd"
|
||||
|
||||
export default () => {
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const handleSubmit = async (values) => {
|
||||
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="mt-8">
|
||||
<Form
|
||||
form={form}
|
||||
size='large'
|
||||
layout="vertical"
|
||||
onFinish={handleSubmit}
|
||||
className="w-full lg:w-[500px] md:ml-10"
|
||||
>
|
||||
<Form.Item label="服务器" name="host">
|
||||
<Input placeholder="smtp.qq.com" />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item label="端口" name="port">
|
||||
<Input placeholder="465" />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item label="用户名" name="host">
|
||||
<Input placeholder="3311118881@qq.com" />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item label="密码" name="host">
|
||||
<Input placeholder="audhaudhaudhauddwq" />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item>
|
||||
<Button type="primary" htmlType="submit" className="w-full">
|
||||
保存
|
||||
</Button>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
44
src/pages/Setup/components/Other/index.tsx
Normal file
44
src/pages/Setup/components/Other/index.tsx
Normal file
@@ -0,0 +1,44 @@
|
||||
import { useState } from "react";
|
||||
import { Segmented } from "antd";
|
||||
import { HiOutlineMail } from "react-icons/hi";
|
||||
import Email from './components/Email'
|
||||
|
||||
type Tab = "email" | "statis" | "storage" | string
|
||||
|
||||
export default () => {
|
||||
const [tab, setTab] = useState<Tab>("email")
|
||||
|
||||
const tabList = [
|
||||
{
|
||||
label: "邮箱配置",
|
||||
value: "email",
|
||||
icon: <HiOutlineMail />,
|
||||
className: "[&>div]:flex [&>div]:items-center [&>div]:!px-4"
|
||||
},
|
||||
{
|
||||
label: "统计配置",
|
||||
value: "statis",
|
||||
icon: <HiOutlineMail />,
|
||||
className: "[&>div]:flex [&>div]:items-center [&>div]:!px-4"
|
||||
},
|
||||
{
|
||||
label: "存储配置",
|
||||
value: "storage",
|
||||
icon: <HiOutlineMail />,
|
||||
className: "[&>div]:flex [&>div]:items-center [&>div]:!px-4"
|
||||
}
|
||||
]
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Segmented<string>
|
||||
size="large"
|
||||
options={tabList}
|
||||
onChange={setTab}
|
||||
className="ml-10"
|
||||
/>
|
||||
|
||||
{tab === "email" && <Email />}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -1,11 +1,15 @@
|
||||
import { useState } from 'react';
|
||||
import { Card } from 'antd';
|
||||
|
||||
import Title from '@/components/Title';
|
||||
import { BiGlobe, BiLayout, BiShieldQuarter, BiUser } from 'react-icons/bi';
|
||||
import System from './components/System'
|
||||
import Web from './components/Web'
|
||||
import Layout from './components/Theme'
|
||||
import My from './components/My'
|
||||
import Other from './components/Other'
|
||||
|
||||
import { BiGlobe, BiLayout, BiShieldQuarter, BiUser } from 'react-icons/bi';
|
||||
import { AiOutlineSetting } from "react-icons/ai";
|
||||
|
||||
interface Setup {
|
||||
title: string;
|
||||
@@ -20,19 +24,19 @@ const SetupPage = () => {
|
||||
const iconSty = "w-5 h-8 mr-1"
|
||||
const list: Setup[] = [
|
||||
{
|
||||
title: "系统配置",
|
||||
title: "系统设置",
|
||||
description: "配置管理员账号、登录时间等",
|
||||
icon: <BiShieldQuarter className={iconSty} />,
|
||||
key: "system"
|
||||
},
|
||||
{
|
||||
title: "网站配置",
|
||||
title: "网站设置",
|
||||
description: "配置网站标题、LOGO、描述、SEO等",
|
||||
icon: <BiGlobe className={iconSty} />,
|
||||
key: "web"
|
||||
},
|
||||
{
|
||||
title: "主题配置",
|
||||
title: "主题设置",
|
||||
description: "配置网站主题风格",
|
||||
icon: <BiLayout className={iconSty} />,
|
||||
key: "layout"
|
||||
@@ -42,6 +46,12 @@ const SetupPage = () => {
|
||||
description: "配置个人信息等",
|
||||
icon: <BiUser className={iconSty} />,
|
||||
key: "my"
|
||||
},
|
||||
{
|
||||
title: "其他设置",
|
||||
description: "杂七八乱的各种配置",
|
||||
icon: <AiOutlineSetting className={iconSty} />,
|
||||
key: "other"
|
||||
}
|
||||
];
|
||||
|
||||
@@ -72,6 +82,7 @@ const SetupPage = () => {
|
||||
{active === "web" && <Web />}
|
||||
{active === "layout" && <Layout />}
|
||||
{active === "my" && <My />}
|
||||
{active === "other" && <Other />}
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
@@ -3,8 +3,9 @@ import { Modal, notification } from "antd";
|
||||
import { useUserStore } from "@/stores";
|
||||
|
||||
// 配置项目API域名
|
||||
// export const baseURL = "http://localhost:9003/api";
|
||||
export const baseURL = "https://api.liuyuyang.net/api";
|
||||
export const baseURL = "http://localhost:9003/api";
|
||||
// export const baseURL = "https://api.liuyuyang.net/api";
|
||||
// export const baseURL = "http://api.thrive.liuyuyang.net/api";
|
||||
|
||||
// 创建 axios 实例
|
||||
export const instance = axios.create({
|
||||
|
||||
Reference in New Issue
Block a user