Skip to content

Let's use AI to Earn!

pin

daoyian6e427e3eb389
diff --git a/src/api/pinterest.ts b/src/api/pinterest.ts
new file mode 100644
index 00000000..c1465bca
--- /dev/null
+++ b/src/api/pinterest.ts
@@ -0,0 +1,56 @@
+import http from "@/utils/request";
+
+// 获取广告账户
+export const getPinterestAccountApi = (adAccountId: string) => {
+ return http.get<any>(`plat/pinterest/account/${adAccountId}`);
+};
+
+// 创建广告用户
+export const createPinterestAdAccountApi = (adAccountId: string) => {
+ return http.get<any>(`plat/pinterest/AdAccount/${adAccountId}`);
+};
+
+// 获取广告账户列表
+export const getPinterestAccountListApi = () => {
+ return http.get<any>("plat/pinterest/account");
+};
+
+// 创建board
+export const createPinterestBoardApi = (data: any) => {
+ return http.post<any>("plat/pinterest/board", data);
+};
+
+// 获取board列表信息
+export const getPinterestBoardListApi = (params: any) => {
+ return http.get<any>("plat/pinterest/board", params);
+};
+
+// 获取单个board
+export const getPinterestBoardApi = (id: string) => {
+ return http.get<any>(`plat/pinterest/board/${id}`);
+};
+
+// 删除单个board
+export const deletePinterestBoardApi = (id: string) => {
+ return http.delete<any>(`plat/pinterest/board/${id}`);
+};
+
+// 创建pin
+export const createPinterestPinApi = (data: any) => {
+ return http.post<any>("plat/pinterest/pin", data);
+};
+
+// 获取pin列表
+export const getPinterestPinListApi = (params: any) => {
+ return http.get<any>("plat/pinterest/pin", params);
+};
+
+// 获取单个pin
+export const getPinterestPinApi = (id: string) => {
+ return http.get<any>(`plat/pinterest/pin/${id}`);
+};
+
+// 删除pin
+export const deletePinterestPinApi = (id: string) => {
+ return http.delete<any>(`plat/pinterest/pin/${id}`);
+};
\ No newline at end of file
diff --git a/src/api/types/pinterest.ts b/src/api/types/pinterest.ts
new file mode 100644
index 00000000..79053287
--- /dev/null
+++ b/src/api/types/pinterest.ts
@@ -0,0 +1 @@
+// Pinterest API 相关类型定义 - 最少化类型使用,多使用any
\ No newline at end of file
diff --git a/src/app/[lng]/accounts/plat/TiktokLogin.ts b/src/app/[lng]/accounts/plat/TiktokLogin.ts
index 46d65057..13224850 100644
--- a/src/app/[lng]/accounts/plat/TiktokLogin.ts
+++ b/src/app/[lng]/accounts/plat/TiktokLogin.ts
@@ -6,7 +6,7 @@ import { useAccountStore } from "@/store/account";
/**
- * b站被点击
+ * Tiktok被点击
* @param platType
*/
export async function tiktokSkip(platType: PlatType) {
diff --git a/src/app/[lng]/pinterest/page.tsx b/src/app/[lng]/pinterest/page.tsx
new file mode 100644
index 00000000..0ced3f4f
--- /dev/null
+++ b/src/app/[lng]/pinterest/page.tsx
@@ -0,0 +1,868 @@
+"use client";
+
+import { useState, useEffect, useRef } from "react";
+import {
+ Button,
+ Tabs,
+ Modal,
+ Form,
+ Input,
+ Select,
+ Upload,
+ message,
+ Pagination,
+ Spin,
+ Popconfirm,
+ Badge,
+ Card,
+ Row,
+ Col,
+ Statistic,
+ Typography,
+ Empty,
+ Divider
+} from "antd";
+import {
+ PlusOutlined,
+ DeleteOutlined,
+ EditOutlined,
+ PictureOutlined,
+ ReloadOutlined,
+ SearchOutlined,
+ UploadOutlined,
+ EyeOutlined,
+ LinkOutlined,
+ BarsOutlined,
+ PushpinOutlined,
+ UserOutlined,
+ BarChartOutlined
+} from "@ant-design/icons";
+import styles from "./pinterest.module.scss";
+import {
+ getPinterestAccountListApi,
+ getPinterestBoardListApi,
+ createPinterestBoardApi,
+ deletePinterestBoardApi,
+ getPinterestPinListApi,
+ createPinterestPinApi,
+ deletePinterestPinApi,
+ getPinterestAccountApi,
+ getPinterestBoardApi,
+ getPinterestPinApi
+} from "@/api/pinterest";
+
+const { Search } = Input;
+const { TextArea } = Input;
+const { Text, Title } = Typography;
+
+export default function PinterestPage() {
+ // 状态管理
+ const [activeTab, setActiveTab] = useState("boards");
+ const [loading, setLoading] = useState(false);
+ const [accounts, setAccounts] = useState<any[]>([]);
+ const [boards, setBoards] = useState<any[]>([]);
+ const [pins, setPins] = useState<any[]>([]);
+ const [selectedAccount, setSelectedAccount] = useState<any>(null);
+
+ // 模态框状态
+ const [boardModalVisible, setBoardModalVisible] = useState(false);
+ const [pinModalVisible, setPinModalVisible] = useState(false);
+ const [boardDetailModalVisible, setBoardDetailModalVisible] = useState(false);
+ const [pinDetailModalVisible, setPinDetailModalVisible] = useState(false);
+
+ // 表单
+ const [boardForm] = Form.useForm();
+ const [pinForm] = Form.useForm();
+
+ // 分页
+ const [currentPage, setCurrentPage] = useState(1);
+ const [pageSize, setPageSize] = useState(10);
+ const [total, setTotal] = useState(0);
+
+ // 搜索
+ const [searchKeyword, setSearchKeyword] = useState("");
+
+ // 选中的项目
+ const [selectedBoard, setSelectedBoard] = useState<any>(null);
+ const [selectedPin, setSelectedPin] = useState<any>(null);
+
+ // 图片上传
+ const [imageFile, setImageFile] = useState<File | null>(null);
+ const [imagePreview, setImagePreview] = useState<string>("");
+ const fileInputRef = useRef<HTMLInputElement>(null);
+
+ // 初始化数据
+ useEffect(() => {
+ loadAccountList();
+ }, []);
+
+ // 当选中账户时,加载boards
+ useEffect(() => {
+ if (selectedAccount) {
+ loadBoards();
+ }
+ }, [selectedAccount]);
+
+ // 加载账户列表
+ const loadAccountList = async () => {
+ try {
+ setLoading(true);
+ const response = await getPinterestAccountListApi();
+ if (response?.code === 0) {
+ setAccounts(response.data.items);
+ if (response.data.items.length > 0) {
+ setSelectedAccount(response.data.items[0]);
+ }
+ }
+ } catch (error) {
+ message.error("加载账户列表失败");
+ } finally {
+ setLoading(false);
+ }
+ };
+
+ // 加载boards
+ const loadBoards = async (page = 0, size = 20) => {
+ if (!selectedAccount) return;
+
+ try {
+ setLoading(true);
+ const response = await getPinterestBoardListApi({ page, size });
+ if (response?.code === 0) {
+ setBoards(response.data.items);
+ setTotal(response.data.total);
+ }
+ } catch (error) {
+ message.error("加载Board列表失败");
+ } finally {
+ setLoading(false);
+ }
+ };
+
+ // 加载pins
+ const loadPins = async (page = 1, size = 10) => {
+ try {
+ setLoading(true);
+ const response = await getPinterestPinListApi({ page: page - 1, size });
+ if (response?.code === 0) {
+ setPins(response.data.items);
+ setTotal(response.data.total);
+ setCurrentPage(page);
+ setPageSize(size);
+ }
+ } catch (error) {
+ message.error("加载Pin列表失败");
+ } finally {
+ setLoading(false);
+ }
+ };
+
+ // 创建Board
+ const handleCreateBoard = async (values: any) => {
+ try {
+ setLoading(true);
+ const response = await createPinterestBoardApi(values);
+ if (response?.code === 0) {
+ message.success("Board创建成功");
+ setBoardModalVisible(false);
+ boardForm.resetFields();
+ loadBoards();
+ }
+ } catch (error) {
+ message.error("创建Board失败");
+ } finally {
+ setLoading(false);
+ }
+ };
+
+ // 删除Board
+ const handleDeleteBoard = async (boardId: string) => {
+ try {
+ setLoading(true);
+ const response = await deletePinterestBoardApi(boardId);
+ if (response?.code === 0) {
+ message.success("Board删除成功");
+ loadBoards();
+ }
+ } catch (error) {
+ message.error("删除Board失败");
+ } finally {
+ setLoading(false);
+ }
+ };
+
+ // 创建Pin
+ const handleCreatePin = async (values: any) => {
+ if (!imageFile) {
+ message.error("请上传图片");
+ return;
+ }
+
+ try {
+ setLoading(true);
+
+ // 构造Pin数据
+ const pinData: any = {
+ board_id: values.board_id,
+ link: values.link,
+ title: values.title,
+ description: values.description,
+ dominant_color: values.dominant_color || "#e60023",
+ alt_text: values.alt_text,
+ media_source: {
+ source_type: "image_url",
+ content_type: imageFile.type,
+ data: imagePreview,
+ url: imagePreview
+ },
+ items: [{
+ title: values.title,
+ description: values.description,
+ link: values.link,
+ media_source: {
+ source_type: "image_url",
+ content_type: imageFile.type,
+ data: imagePreview,
+ url: imagePreview
+ }
+ }]
+ };
+
+ const response = await createPinterestPinApi(pinData);
+ if (response?.code === 0) {
+ message.success("Pin创建成功");
+ setPinModalVisible(false);
+ pinForm.resetFields();
+ setImageFile(null);
+ setImagePreview("");
+ loadPins(currentPage, pageSize);
+ }
+ } catch (error) {
+ message.error("创建Pin失败");
+ } finally {
+ setLoading(false);
+ }
+ };
+
+ // 删除Pin
+ const handleDeletePin = async (pinId: string) => {
+ try {
+ setLoading(true);
+ const response = await deletePinterestPinApi(pinId);
+ if (response?.code === 0) {
+ message.success("Pin删除成功");
+ loadPins(currentPage, pageSize);
+ }
+ } catch (error) {
+ message.error("删除Pin失败");
+ } finally {
+ setLoading(false);
+ }
+ };
+
+ // 图片上传处理
+ const handleImageUpload = (event: React.ChangeEvent<HTMLInputElement>) => {
+ const file = event.target.files?.[0];
+ if (file) {
+ if (file.type.startsWith("image/")) {
+ setImageFile(file);
+ const reader = new FileReader();
+ reader.onload = (e) => {
+ setImagePreview(e.target?.result as string);
+ };
+ reader.readAsDataURL(file);
+ } else {
+ message.error("请选择图片文件");
+ }
+ }
+ };
+
+ // 查看Board详情
+ const handleViewBoard = async (board: any) => {
+ try {
+ setLoading(true);
+ const response = await getPinterestBoardApi(board.id);
+ if (response?.code === 0) {
+ setSelectedBoard(response.data);
+ setBoardDetailModalVisible(true);
+ }
+ } catch (error) {
+ message.error("获取Board详情失败");
+ } finally {
+ setLoading(false);
+ }
+ };
+
+ // 查看Pin详情
+ const handleViewPin = async (pin: any) => {
+ try {
+ setLoading(true);
+ const response = await getPinterestPinApi(pin.id);
+ if (response?.code === 0) {
+ setSelectedPin(response.data);
+ setPinDetailModalVisible(true);
+ }
+ } catch (error) {
+ message.error("获取Pin详情失败");
+ } finally {
+ setLoading(false);
+ }
+ };
+
+ // 过滤boards
+ const filteredBoards = boards.filter(board =>
+ board.name.toLowerCase().includes(searchKeyword.toLowerCase()) ||
+ board.description.toLowerCase().includes(searchKeyword.toLowerCase())
+ );
+
+ // 过滤pins
+ const filteredPins = pins.filter(pin =>
+ pin.title.toLowerCase().includes(searchKeyword.toLowerCase()) ||
+ pin.description.toLowerCase().includes(searchKeyword.toLowerCase())
+ );
+
+ // Tab标签
+ const tabItems = [
+ {
+ key: "boards",
+ label: (
+ <span>
+ <BarsOutlined />
+ 我的Board
+ </span>
+ )
+ },
+ {
+ key: "pins",
+ label: (
+ <span>
+ <PushpinOutlined />
+ 我的Pin
+ </span>
+ )
+ }
+ ];
+
+ return (
+ <div className={styles.container}>
+ <div className={styles.header}>
+ <Title level={2} className={styles.title}>
+ <PictureOutlined /> Pinterest 管理
+ </Title>
+ <div className={styles.actions}>
+ <Select
+ style={{ width: 200 }}
+ placeholder="选择账户"
+ value={selectedAccount?.id}
+ onChange={(value) => {
+ const account = accounts.find(acc => acc.id === value);
+ setSelectedAccount(account || null);
+ }}
+ >
+ {accounts.map(account => (
+ <Select.Option key={account.id} value={account.id}>
+ {account.name}
+ </Select.Option>
+ ))}
+ </Select>
+ <Button
+ icon={<ReloadOutlined />}
+ onClick={() => {
+ if (activeTab === "boards") {
+ loadBoards();
+ } else {
+ loadPins(currentPage, pageSize);
+ }
+ }}
+ className={styles.refreshButton}
+ >
+ 刷新
+ </Button>
+ </div>
+ </div>
+
+ {selectedAccount && (
+ <Card className={styles.statsCard}>
+ <Row gutter={[16, 16]}>
+ <Col span={6}>
+ <Statistic
+ title="关注者"
+ value={selectedAccount.follower_count}
+ prefix={<UserOutlined />}
+ />
+ </Col>
+ <Col span={6}>
+ <Statistic
+ title="Board数量"
+ value={selectedAccount.board_count}
+ prefix={<BarsOutlined />}
+ />
+ </Col>
+ <Col span={6}>
+ <Statistic
+ title="Pin数量"
+ value={selectedAccount.pin_count}
+ prefix={<PushpinOutlined />}
+ />
+ </Col>
+ <Col span={6}>
+ <Statistic
+ title="月观看量"
+ value={selectedAccount.monthly_views}
+ prefix={<BarChartOutlined />}
+ />
+ </Col>
+ </Row>
+ </Card>
+ )}
+
+ <div className={styles.content}>
+ <div className={styles.filterSection}>
+ <Search
+ placeholder="搜索..."
+ value={searchKeyword}
+ onChange={(e) => setSearchKeyword(e.target.value)}
+ className={styles.searchBox}
+ prefix={<SearchOutlined />}
+ />
+ <Button
+ type="primary"
+ icon={<PlusOutlined />}
+ onClick={() => {
+ if (activeTab === "boards") {
+ setBoardModalVisible(true);
+ } else {
+ setPinModalVisible(true);
+ loadBoards(); // 为创建Pin加载boards
+ }
+ }}
+ >
+ {activeTab === "boards" ? "创建Board" : "创建Pin"}
+ </Button>
+ </div>
+
+ <Tabs
+ activeKey={activeTab}
+ onChange={(key) => {
+ setActiveTab(key);
+ if (key === "pins") {
+ loadPins();
+ }
+ }}
+ items={tabItems}
+ className={styles.tabs}
+ />
+
+ <div className={styles.tabContent}>
+ {activeTab === "boards" && (
+ <div className={styles.boardGrid}>
+ {loading ? (
+ <div className={styles.loading}>
+ <Spin size="large" />
+ </div>
+ ) : filteredBoards.length === 0 ? (
+ <Empty
+ description="暂无Board"
+ image={Empty.PRESENTED_IMAGE_SIMPLE}
+ />
+ ) : (
+ filteredBoards.map(board => (
+ <Card
+ key={board.id}
+ className={styles.boardCard}
+ cover={
+ <div className={styles.boardImage}>
+ {board.media?.image_cover_url ? (
+ <img
+ src={board.media.image_cover_url}
+ alt={board.name}
+ style={{ width: "100%", height: "100%", objectFit: "cover" }}
+ />
+ ) : (
+ <BarsOutlined />
+ )}
+ </div>
+ }
+ actions={[
+ <Button
+ key="view"
+ type="link"
+ icon={<EyeOutlined />}
+ onClick={() => handleViewBoard(board)}
+ >
+ 查看
+ </Button>,
+ <Popconfirm
+ key="delete"
+ title="确定删除此Board吗?"
+ onConfirm={() => handleDeleteBoard(board.id)}
+ okText="确定"
+ cancelText="取消"
+ >
+ <Button
+ type="link"
+ icon={<DeleteOutlined />}
+ danger
+ >
+ 删除
+ </Button>
+ </Popconfirm>
+ ]}
+ >
+ <Card.Meta
+ title={board.name}
+ description={
+ <div>
+ <Text type="secondary" ellipsis>
+ {board.description}
+ </Text>
+ <div style={{ marginTop: 8 }}>
+ <Badge count={board.pin_count} showZero>
+ <Text type="secondary">Pins</Text>
+ </Badge>
+ <Badge count={board.follower_count} showZero style={{ marginLeft: 16 }}>
+ <Text type="secondary">关注者</Text>
+ </Badge>
+ </div>
+ </div>
+ }
+ />
+ </Card>
+ ))
+ )}
+ </div>
+ )}
+
+ {activeTab === "pins" && (
+ <>
+ <div className={styles.pinGrid}>
+ {loading ? (
+ <div className={styles.loading}>
+ <Spin size="large" />
+ </div>
+ ) : filteredPins.length === 0 ? (
+ <Empty
+ description="暂无Pin"
+ image={Empty.PRESENTED_IMAGE_SIMPLE}
+ />
+ ) : (
+ filteredPins.map(pin => (
+ <Card
+ key={pin.id}
+ className={styles.pinCard}
+ cover={
+ <div className={styles.pinImage}>
+ {pin.media?.images?.["400x300"]?.url ? (
+ <img
+ src={pin.media.images["400x300"].url}
+ alt={pin.title}
+ style={{ width: "100%", height: "100%", objectFit: "cover" }}
+ />
+ ) : (
+ <PictureOutlined />
+ )}
+ </div>
+ }
+ actions={[
+ <Button
+ key="view"
+ type="link"
+ icon={<EyeOutlined />}
+ onClick={() => handleViewPin(pin)}
+ >
+ 查看
+ </Button>,
+ pin.link && (
+ <Button
+ key="link"
+ type="link"
+ icon={<LinkOutlined />}
+ href={pin.link}
+ target="_blank"
+ >
+ 链接
+ </Button>
+ ),
+ <Popconfirm
+ key="delete"
+ title="确定删除此Pin吗?"
+ onConfirm={() => handleDeletePin(pin.id)}
+ okText="确定"
+ cancelText="取消"
+ >
+ <Button
+ type="link"
+ icon={<DeleteOutlined />}
+ danger
+ >
+ 删除
+ </Button>
+ </Popconfirm>
+ ].filter(Boolean)}
+ >
+ <Card.Meta
+ title={pin.title}
+ description={
+ <Text type="secondary" ellipsis>
+ {pin.description}
+ </Text>
+ }
+ />
+ </Card>
+ ))
+ )}
+ </div>
+
+ {!loading && filteredPins.length > 0 && (
+ <div className={styles.pagination}>
+ <Pagination
+ current={currentPage}
+ total={total}
+ pageSize={pageSize}
+ onChange={(page, size) => loadPins(page, size)}
+ showSizeChanger
+ showQuickJumper
+ showTotal={(total, range) =>
+ `第 ${range[0]}-${range[1]} 条,共 ${total} 条`
+ }
+ />
+ </div>
+ )}
+ </>
+ )}
+ </div>
+ </div>
+
+ {/* 创建Board模态框 */}
+ <Modal
+ title="创建新Board"
+ open={boardModalVisible}
+ onCancel={() => setBoardModalVisible(false)}
+ footer={null}
+ className={styles.modal}
+ >
+ <Form
+ form={boardForm}
+ onFinish={handleCreateBoard}
+ layout="vertical"
+ >
+ <Form.Item
+ label="Board名称"
+ name="name"
+ rules={[{ required: true, message: "请输入Board名称" }]}
+ >
+ <Input placeholder="输入Board名称" />
+ </Form.Item>
+
+ <Form.Item
+ label="描述"
+ name="description"
+ >
+ <TextArea
+ placeholder="输入Board描述"
+ rows={3}
+ />
+ </Form.Item>
+
+ <Form.Item
+ label="隐私设置"
+ name="privacy"
+ initialValue="PUBLIC"
+ >
+ <Select>
+ <Select.Option value="PUBLIC">公开</Select.Option>
+ <Select.Option value="PRIVATE">私有</Select.Option>
+ </Select>
+ </Form.Item>
+
+ <Form.Item>
+ <Button type="primary" htmlType="submit" loading={loading} block>
+ 创建Board
+ </Button>
+ </Form.Item>
+ </Form>
+ </Modal>
+
+ {/* 创建Pin模态框 */}
+ <Modal
+ title="创建新Pin"
+ open={pinModalVisible}
+ onCancel={() => {
+ setPinModalVisible(false);
+ setImageFile(null);
+ setImagePreview("");
+ }}
+ footer={null}
+ className={styles.modal}
+ width={600}
+ >
+ <Form
+ form={pinForm}
+ onFinish={handleCreatePin}
+ layout="vertical"
+ >
+ <Form.Item
+ label="选择Board"
+ name="board_id"
+ rules={[{ required: true, message: "请选择Board" }]}
+ >
+ <Select placeholder="选择要发布到的Board">
+ {boards.map(board => (
+ <Select.Option key={board.id} value={board.id}>
+ {board.name}
+ </Select.Option>
+ ))}
+ </Select>
+ </Form.Item>
+
+ <Form.Item
+ label="上传图片"
+ required
+ >
+ <div className={styles.uploadArea} onClick={() => fileInputRef.current?.click()}>
+ {imagePreview ? (
+ <img
+ src={imagePreview}
+ alt="预览"
+ className={styles.previewImage}
+ />
+ ) : (
+ <div>
+ <UploadOutlined className={styles.uploadIcon} />
+ <div className={styles.uploadText}>点击上传图片</div>
+ <div className={styles.uploadHint}>支持JPG、PNG、GIF格式</div>
+ </div>
+ )}
+ </div>
+ <input
+ ref={fileInputRef}
+ type="file"
+ accept="image/*"
+ onChange={handleImageUpload}
+ style={{ display: "none" }}
+ />
+ </Form.Item>
+
+ <Form.Item
+ label="标题"
+ name="title"
+ rules={[{ required: true, message: "请输入标题" }]}
+ >
+ <Input placeholder="输入Pin标题" />
+ </Form.Item>
+
+ <Form.Item
+ label="描述"
+ name="description"
+ rules={[{ required: true, message: "请输入描述" }]}
+ >
+ <TextArea
+ placeholder="输入Pin描述"
+ rows={3}
+ />
+ </Form.Item>
+
+ <Form.Item
+ label="链接"
+ name="link"
+ >
+ <Input placeholder="输入目标链接(可选)" />
+ </Form.Item>
+
+ <Form.Item
+ label="Alt文本"
+ name="alt_text"
+ >
+ <Input placeholder="输入图片Alt文本(可选)" />
+ </Form.Item>
+
+ <Form.Item
+ label="主色调"
+ name="dominant_color"
+ >
+ <div className={styles.colorPicker}>
+ <input
+ type="color"
+ className={styles.colorInput}
+ defaultValue="#e60023"
+ />
+ <Text type="secondary">选择Pin的主色调</Text>
+ </div>
+ </Form.Item>
+
+ <Form.Item>
+ <Button type="primary" htmlType="submit" loading={loading} block>
+ 创建Pin
+ </Button>
+ </Form.Item>
+ </Form>
+ </Modal>
+
+ {/* Board详情模态框 */}
+ <Modal
+ title="Board详情"
+ open={boardDetailModalVisible}
+ onCancel={() => setBoardDetailModalVisible(false)}
+ footer={null}
+ width={600}
+ >
+ {selectedBoard && (
+ <div>
+ <Title level={4}>{selectedBoard.name}</Title>
+ <Text type="secondary">{selectedBoard.description}</Text>
+ <Divider />
+ <Row gutter={[16, 16]}>
+ <Col span={12}>
+ <Statistic title="Pin数量" value={selectedBoard.pin_count} />
+ </Col>
+ <Col span={12}>
+ <Statistic title="关注者" value={selectedBoard.follower_count} />
+ </Col>
+ </Row>
+ <Divider />
+ <Text type="secondary">
+ 创建时间: {new Date(selectedBoard.created_at).toLocaleDateString()}
+ </Text>
+ </div>
+ )}
+ </Modal>
+
+ {/* Pin详情模态框 */}
+ <Modal
+ title="Pin详情"
+ open={pinDetailModalVisible}
+ onCancel={() => setPinDetailModalVisible(false)}
+ footer={null}
+ width={600}
+ >
+ {selectedPin && (
+ <div>
+ <Title level={4}>{selectedPin.title}</Title>
+ <Text type="secondary">{selectedPin.description}</Text>
+ <Divider />
+ {selectedPin.media?.images?.["600x"]?.url && (
+ <div style={{ textAlign: "center", marginBottom: 16 }}>
+ <img
+ src={selectedPin.media.images["600x"].url}
+ alt={selectedPin.title}
+ style={{ maxWidth: "100%", maxHeight: "400px" }}
+ />
+ </div>
+ )}
+ {selectedPin.link && (
+ <div style={{ marginBottom: 16 }}>
+ <Text strong>链接: </Text>
+ <a href={selectedPin.link} target="_blank" rel="noopener noreferrer">
+ {selectedPin.link}
+ </a>
+ </div>
+ )}
+ <Text type="secondary">
+ 创建时间: {new Date(selectedPin.created_at).toLocaleDateString()}
+ </Text>
+ </div>
+ )}
+ </Modal>
+ </div>
+ );
+}
\ No newline at end of file
diff --git a/src/app/[lng]/pinterest/pinterest.module.scss b/src/app/[lng]/pinterest/pinterest.module.scss
new file mode 100644
index 00000000..2b934e60
--- /dev/null
+++ b/src/app/[lng]/pinterest/pinterest.module.scss
@@ -0,0 +1,437 @@
+.container {
+ max-width: 1200px;
+ margin: 0 auto;
+ padding: 20px;
+ background-color: #f8f9fa;
+ min-height: 100vh;
+}
+
+.header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 30px;
+ padding: 20px 0;
+ border-bottom: 1px solid #e0e0e0;
+}
+
+.title {
+ font-size: 32px;
+ font-weight: bold;
+ color: #e60023;
+ margin: 0;
+}
+
+.actions {
+ display: flex;
+ gap: 15px;
+}
+
+.tabs {
+ margin-bottom: 30px;
+}
+
+.content {
+ background: white;
+ border-radius: 12px;
+ padding: 25px;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
+}
+
+.statsCard {
+ background: linear-gradient(135deg, #e60023 0%, #ff4458 100%);
+ color: white;
+ padding: 20px;
+ border-radius: 12px;
+ margin-bottom: 20px;
+}
+
+.statsGrid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
+ gap: 20px;
+ margin-top: 15px;
+}
+
+.statItem {
+ text-align: center;
+}
+
+.statValue {
+ font-size: 24px;
+ font-weight: bold;
+ margin-bottom: 5px;
+}
+
+.statLabel {
+ font-size: 14px;
+ opacity: 0.9;
+}
+
+.boardGrid {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
+ gap: 20px;
+ margin-top: 20px;
+}
+
+.boardCard {
+ background: white;
+ border-radius: 12px;
+ overflow: hidden;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
+ cursor: pointer;
+}
+
+.boardCard:hover {
+ transform: translateY(-5px);
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
+}
+
+.boardImage {
+ width: 100%;
+ height: 150px;
+ object-fit: cover;
+ background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 48px;
+ color: #bbb;
+}
+
+.boardInfo {
+ padding: 15px;
+}
+
+.boardName {
+ font-size: 16px;
+ font-weight: bold;
+ margin-bottom: 5px;
+ color: #333;
+}
+
+.boardDescription {
+ font-size: 14px;
+ color: #666;
+ margin-bottom: 10px;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+}
+
+.boardMeta {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 12px;
+ color: #999;
+}
+
+.boardActions {
+ display: flex;
+ gap: 10px;
+}
+
+.actionBtn {
+ padding: 4px 8px;
+ border: none;
+ border-radius: 4px;
+ cursor: pointer;
+ font-size: 12px;
+ transition: all 0.2s;
+}
+
+.editBtn {
+ background: #4caf50;
+ color: white;
+}
+
+.deleteBtn {
+ background: #f44336;
+ color: white;
+}
+
+.actionBtn:hover {
+ opacity: 0.8;
+}
+
+.pinGrid {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
+ gap: 20px;
+ margin-top: 20px;
+}
+
+.pinCard {
+ background: white;
+ border-radius: 12px;
+ overflow: hidden;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
+ cursor: pointer;
+}
+
+.pinCard:hover {
+ transform: translateY(-5px);
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
+}
+
+.pinImage {
+ width: 100%;
+ height: 200px;
+ object-fit: cover;
+ background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 48px;
+ color: #bbb;
+}
+
+.pinInfo {
+ padding: 15px;
+}
+
+.pinTitle {
+ font-size: 14px;
+ font-weight: bold;
+ margin-bottom: 5px;
+ color: #333;
+}
+
+.pinDescription {
+ font-size: 12px;
+ color: #666;
+ margin-bottom: 10px;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+}
+
+.pinMeta {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 11px;
+ color: #999;
+}
+
+.pinActions {
+ display: flex;
+ gap: 8px;
+}
+
+.modal {
+ :global(.ant-modal-content) {
+ border-radius: 12px;
+ }
+}
+
+.modalHeader {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ margin-bottom: 20px;
+}
+
+.modalIcon {
+ font-size: 24px;
+ color: #e60023;
+}
+
+.formGroup {
+ margin-bottom: 20px;
+}
+
+.formLabel {
+ display: block;
+ font-weight: 500;
+ margin-bottom: 8px;
+ color: #333;
+}
+
+.formInput {
+ width: 100%;
+ padding: 10px;
+ border: 1px solid #ddd;
+ border-radius: 8px;
+ font-size: 14px;
+ transition: border-color 0.3s;
+}
+
+.formInput:focus {
+ outline: none;
+ border-color: #e60023;
+}
+
+.formTextarea {
+ width: 100%;
+ padding: 10px;
+ border: 1px solid #ddd;
+ border-radius: 8px;
+ font-size: 14px;
+ resize: vertical;
+ min-height: 80px;
+ transition: border-color 0.3s;
+}
+
+.formTextarea:focus {
+ outline: none;
+ border-color: #e60023;
+}
+
+.colorPicker {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+}
+
+.colorInput {
+ width: 50px;
+ height: 35px;
+ border: 1px solid #ddd;
+ border-radius: 6px;
+ cursor: pointer;
+}
+
+.uploadArea {
+ border: 2px dashed #ddd;
+ border-radius: 8px;
+ padding: 40px 20px;
+ text-align: center;
+ cursor: pointer;
+ transition: all 0.3s;
+ background: #fafafa;
+}
+
+.uploadArea:hover {
+ border-color: #e60023;
+ background: #fff5f5;
+}
+
+.uploadIcon {
+ font-size: 48px;
+ color: #ccc;
+ margin-bottom: 15px;
+}
+
+.uploadText {
+ font-size: 16px;
+ color: #666;
+ margin-bottom: 5px;
+}
+
+.uploadHint {
+ font-size: 14px;
+ color: #999;
+}
+
+.previewImage {
+ max-width: 100%;
+ max-height: 300px;
+ border-radius: 8px;
+ margin-top: 10px;
+}
+
+.pagination {
+ display: flex;
+ justify-content: center;
+ margin-top: 30px;
+}
+
+.loading {
+ text-align: center;
+ padding: 50px;
+ color: #666;
+}
+
+.empty {
+ text-align: center;
+ padding: 50px;
+ color: #999;
+}
+
+.emptyIcon {
+ font-size: 64px;
+ margin-bottom: 20px;
+ color: #ddd;
+}
+
+.emptyText {
+ font-size: 16px;
+ margin-bottom: 20px;
+}
+
+.errorMessage {
+ background: #ffebee;
+ color: #c62828;
+ padding: 15px;
+ border-radius: 8px;
+ margin-bottom: 20px;
+ border: 1px solid #ffcdd2;
+}
+
+.successMessage {
+ background: #e8f5e8;
+ color: #2e7d32;
+ padding: 15px;
+ border-radius: 8px;
+ margin-bottom: 20px;
+ border: 1px solid #c8e6c9;
+}
+
+.searchBox {
+ width: 300px;
+ margin-bottom: 20px;
+}
+
+.filterSection {
+ display: flex;
+ gap: 15px;
+ margin-bottom: 20px;
+ align-items: center;
+}
+
+.filterLabel {
+ font-weight: 500;
+ color: #333;
+}
+
+.refreshButton {
+ background: #e60023;
+ color: white;
+ border: none;
+ padding: 8px 16px;
+ border-radius: 6px;
+ cursor: pointer;
+ font-size: 14px;
+ transition: background 0.3s;
+}
+
+.refreshButton:hover {
+ background: #c4001a;
+}
+
+.refreshButton:disabled {
+ background: #ccc;
+ cursor: not-allowed;
+}
+
+.tabContent {
+ animation: fadeIn 0.3s ease-in-out;
+}
+
+@keyframes fadeIn {
+ from {
+ opacity: 0;
+ transform: translateY(10px);
+ }
+ to {
+ opacity: 1;
+ transform: translateY(0);
+ }
+}
\ No newline at end of file