Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
9.26web
bulaienaofutuojiesenzhangd4f315ccbf8d
diff --git a/aitoearn_web/aitoearn-web/@types/resources.d.ts b/aitoearn_web/aitoearn-web/@types/resources.d.tsindex b7c03be0..50e5c369 100644--- a/aitoearn_web/aitoearn-web/@types/resources.d.ts+++ b/aitoearn_web/aitoearn-web/@types/resources.d.ts@@ -17,6 +17,7 @@ interface Resources {"checkLoginStatus": "登录状态检测","checkAllLoginStatus": "一键检测登录状态","nickname": "昵称",+ "fansCount": "粉丝数","platform": "平台","loginStatus": "登录状态","accountStatus": "账号状态",diff --git a/aitoearn_web/aitoearn-web/src/api/hot.ts b/aitoearn_web/aitoearn-web/src/api/hot.tsindex ad59578c..de0dbe4a 100644--- a/aitoearn_web/aitoearn-web/src/api/hot.ts+++ b/aitoearn_web/aitoearn-web/src/api/hot.ts@@ -92,6 +92,8 @@ export interface Stats {}export interface RankingContent {+ mid: string;+ secUid: string;id: string;title: string;cover: string;diff --git a/aitoearn_web/aitoearn-web/src/api/plat/types/publish.types.ts b/aitoearn_web/aitoearn-web/src/api/plat/types/publish.types.tsindex 4b87814c..2bbb4b36 100644--- a/aitoearn_web/aitoearn-web/src/api/plat/types/publish.types.ts+++ b/aitoearn_web/aitoearn-web/src/api/plat/types/publish.types.ts@@ -52,6 +52,7 @@ export interface PublishRecordItem {accountId: string;accountType: PlatType;uid: string;+ updatedAt: string;videoUrl?: string;coverUrl?: string;imgUrlList: string[];diff --git a/aitoearn_web/aitoearn-web/src/api/platAuth.ts b/aitoearn_web/aitoearn-web/src/api/platAuth.tsindex 7a69a632..50b12890 100644--- a/aitoearn_web/aitoearn-web/src/api/platAuth.ts+++ b/aitoearn_web/aitoearn-web/src/api/platAuth.ts@@ -121,6 +121,20 @@ export const getThreadsAuthUrlApi = (mail: string) => {});};+/**+ * 获取linkedin授权链接+ * 逻辑与facebook一致,仅platform传linkedin+ */+export const getLinkedInAuthUrlApi = (mail: string) => {+ return request({+ url: 'plat/meta/auth/url',+ method: 'POST',+ data: {+ platform: 'linkedin',+ },+ });+};+/*** 获取tiktok授权状态diff --git a/aitoearn_web/aitoearn-web/src/api/tools.ts b/aitoearn_web/aitoearn-web/src/api/tools.tsindex 9b41d48b..d2b2cd2a 100644--- a/aitoearn_web/aitoearn-web/src/api/tools.ts+++ b/aitoearn_web/aitoearn-web/src/api/tools.ts@@ -219,9 +219,9 @@ export const toolsApi = {* 文本内容安全*/async textModeration(content: string) {- const res = await http.post<string>("tools/common/text/moderation", {+ const res = await http.post<string>("aliGreen/textGreen", {content,});- return res!.data;+ return res;},};diff --git a/aitoearn_web/aitoearn-web/src/api/vip.ts b/aitoearn_web/aitoearn-web/src/api/vip.tsindex a686645b..ec285452 100644--- a/aitoearn_web/aitoearn-web/src/api/vip.ts+++ b/aitoearn_web/aitoearn-web/src/api/vip.ts@@ -20,7 +20,6 @@ export interface CreatePaymentOrderParams {success_url?: string;mode: string;payment: PaymentType;- flagTrialPeriodDays?: number; // 订阅模式下是否给七天免费试用时长, 0 - 不给, 1-给quantity?: number; // 购买数量,用于积分购买metadata: {userId: string;diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/accountCore.tsxindex e5fa383f..913b43f4 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx@@ -10,6 +10,8 @@ import CalendarTiming from "@/app/[lng]/accounts/components/CalendarTiming";import AddAccountModal from "@/app/[lng]/accounts/components/AddAccountModal";import { PlatType } from "@/app/config/platConfig";import { SocialAccount } from "@/api/types/account.type";+import AllPlatIcon from "@/app/[lng]/accounts/components/CalendarTiming/AllPlatIcon";+import { useTransClient } from "@/app/i18n/client";interface AccountPageCoreProps {searchParams?: {@@ -18,20 +20,24 @@ interface AccountPageCoreProps {};}-export default function AccountPageCore({ searchParams }: AccountPageCoreProps) {- const { accountInit, accountActive, setAccountActive, accountGroupList } = useAccountStore(- useShallow((state) => ({- accountInit: state.accountInit,- setAccountActive: state.setAccountActive,- accountActive: state.accountActive,- accountGroupList: state.accountGroupList,- })),- );+export default function AccountPageCore({+ searchParams,+}: AccountPageCoreProps) {+ const { accountInit, accountActive, setAccountActive, accountGroupList } =+ useAccountStore(+ useShallow((state) => ({+ accountInit: state.accountInit,+ setAccountActive: state.setAccountActive,+ accountActive: state.accountActive,+ accountGroupList: state.accountGroupList,+ })),+ );// 添加账号弹窗状态const [addAccountModalOpen, setAddAccountModalOpen] = useState(false);const [targetPlatform, setTargetPlatform] = useState<PlatType | undefined>();const [targetSpaceId, setTargetSpaceId] = useState<string | undefined>();+ const { t } = useTransClient("account");useEffect(() => {accountInit();@@ -43,15 +49,15 @@ export default function AccountPageCore({ searchParams }: AccountPageCoreProps)// 验证平台类型是否有效const platform = searchParams.platform as PlatType;const validPlatforms = Object.values(PlatType);-+if (searchParams.platform && validPlatforms.includes(platform)) {setTargetPlatform(platform);}-+if (searchParams.spaceId) {setTargetSpaceId(searchParams.spaceId);}-+// 打开添加账号弹窗setAddAccountModalOpen(true);}@@ -65,11 +71,11 @@ export default function AccountPageCore({ searchParams }: AccountPageCoreProps)const handleAddAccountClose = () => {setAddAccountModalOpen(false);// 清除URL参数(可选)- if (typeof window !== 'undefined') {+ if (typeof window !== "undefined") {const url = new URL(window.location.href);- url.searchParams.delete('platform');- url.searchParams.delete('spaceId');- window.history.replaceState({}, '', url.toString());+ url.searchParams.delete("platform");+ url.searchParams.delete("spaceId");+ window.history.replaceState({}, "", url.toString());}};@@ -79,15 +85,36 @@ export default function AccountPageCore({ searchParams }: AccountPageCoreProps)<AccountSidebaractiveAccountId={accountActive?.id || ""}onAccountChange={(account) => {- if (account.id === accountActive?.id) {- setAccountActive(undefined);- } else {- setAccountActive(account);- }+ setAccountActive(account);}}+ sidebarTopExtra={+ <>+ <div+ className={[+ "accountList-item",+ `${!accountActive?.id ? "accountList-item--active" : ""}`,+ ].join(" ")}+ style={{+ border: "1px solid #d9d9d9",+ borderRight: "none",+ borderLeft: "none",+ }}+ onClick={async () => {+ setAccountActive(undefined);+ }}+ >+ <AllPlatIcon size={38} />+ <div className="accountList-item-right">+ <div className="accountList-item-right-name">+ {t("allPlatforms")}+ </div>+ </div>+ </div>+ </>+ }/><CalendarTiming />-+{/* 添加账号弹窗 */}<AddAccountModalopen={addAccountModalOpen}diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.module.scss b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.module.scssindex 37d334b3..2d5c6e53 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.module.scss+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.module.scss@@ -12,9 +12,16 @@}:global {+ .accountSidebar-content {+ height: 100%;+ display: flex;+ flex-direction: column;+ min-height: 0;+ overflow-y: auto;+ }+.ant-collapse {height: 100%;- overflow: auto;}.ant-skeleton-paragraph {@@ -233,6 +240,7 @@margin-top: 10px;li {display: flex;+ align-items: center;justify-content: center;flex-direction: column;white-space: nowrap;diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.tsxindex 243995e6..be1a6289 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.tsx+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.tsx@@ -25,6 +25,7 @@ import {PlusOutlined,UserOutlined,WarningOutlined,+ DeleteOutlined,} from "@ant-design/icons";import { useShallow } from "zustand/react/shallow";import { useAccountStore } from "@/store/account";@@ -43,6 +44,7 @@ import {} from "@/utils/ipLocation";import { createAccountGroupApi, updateAccountApi } from "@/api/account";import AddAccountModal from "../AddAccountModal";+import DeleteUserConfirmModal from "./DeleteUserConfirmModal";export interface IAccountSidebarRef {}@@ -53,6 +55,8 @@ export interface IAccountSidebarProps {onAccountChange: (info: SocialAccount) => void;// 排除的平台类型excludePlatforms?: PlatType[];+ // 侧边栏内容顶部扩展内容+ sidebarTopExtra?: React.ReactNode;}const AccountStatusView = ({ account }: { account: SocialAccount }) => {@@ -76,8 +80,10 @@ const AccountStatusView = ({ account }: { account: SocialAccount }) => {const AccountPopoverInfo = ({accountInfo,+ onDeleteClick,}: {accountInfo: SocialAccount;+ onDeleteClick?: (account: SocialAccount) => void;}) => {const { t } = useTransClient("account");const platInfo = AccountPlatInfoMap.get(accountInfo.type)!;@@ -95,12 +101,16 @@ const AccountPopoverInfo = ({<p>{t("nickname")}:</p><p>{accountInfo.nickname}</p></div>- <div className="accountPopoverInfo-item">+ {/* <div className="accountPopoverInfo-item"><p>{t("platform")}:</p><p><img src={platInfo?.icon} />{platInfo.name}</p>+ </div> */}+ <div className="accountPopoverInfo-item">+ <p>{t("fansCount")}:</p>+ <p>{accountInfo.fansCount ?? 0}</p></div></div></div>@@ -109,32 +119,18 @@ const AccountPopoverInfo = ({<p>{t("loginStatus")}:</p><p><AccountStatusView account={accountInfo} />- {/*<Button*/}- {/* type="link"*/}- {/* style={{ padding: "0 0 0 5px" }}*/}- {/* loading={detLoading}*/}- {/* onClick={async () => {*/}- {/* // TODO 登录状态检测*/}- {/* // setDetLoading(true);*/}- {/* // const res = await acpAccountLoginCheck(*/}- {/* // accountInfo!.type,*/}- {/* // accountInfo!.uid,*/}- {/* // );*/}- {/* // message.success(*/}- {/* // `登录状态检测完成:${res.status === AccountStatus.USABLE ? "在线" : "离线,请重新登录"}`,*/}- {/* // );*/}- {/* // setTimeout(async () => {*/}- {/* // setDetLoading(false);*/}- {/* // if (res.status === AccountStatus.DISABLE) {*/}- {/* // const res = await accountLogin(accountInfo.type);*/}- {/* // if (!res) return;*/}- {/* // message.success("账号更新成功!");*/}- {/* // }*/}- {/* // }, 500);*/}- {/* }}*/}- {/*>*/}- {/* {t("checkLoginStatus")}*/}- {/*</Button>*/}++ <Button+ type="primary"+ danger+ ghost+ size="small"+ icon={<DeleteOutlined />}+ style={{ marginLeft: 18, border: "none" }}+ onClick={() => onDeleteClick?.(accountInfo)}+ >+ 删除账户+ </Button></p></div></div>@@ -148,6 +144,7 @@ const AccountSidebar = memo(activeAccountId,onAccountChange,excludePlatforms = [],+ sidebarTopExtra,}: IAccountSidebarProps,ref: ForwardedRef<IAccountSidebarRef>,) => {@@ -172,6 +169,11 @@ const AccountSidebar = memo(const userManageModalRef = useRef<IUserManageModalRef>(null);const [mcpManagerModalOpen, setMcpManagerModalOpen] = useState(false);const mcpManagerModalRef = useRef<IMCPManagerModalRef>(null);+ const [deleteHitOpen, setDeleteHitOpen] = useState(false);+ const [deleteLoading, setDeleteLoading] = useState(false);+ const [deleteTarget, setDeleteTarget] = useState<SocialAccount | null>(+ null,+ );// IP地理位置信息状态const [ipLocationInfo, setIpLocationInfo] =@@ -376,14 +378,6 @@ const AccountSidebar = memo(/></div></Modal>- {/*TODO 在线状态检测 */}- {/*<PubAccountDetModule*/}- {/* title="账号检测"*/}- {/* tips="所有平台在线"*/}- {/* ref={pubAccountDetModuleRef}*/}- {/* accounts={accountList}*/}- {/* isFooter={false}*/}- {/*/>*/}<div className={styles.accountSidebar}><div className="accountSidebar-top">@@ -420,139 +414,148 @@ const AccountSidebar = memo(<Skeleton avatar paragraph={{ rows: 1 }} active /></>) : (- <Collapse- key={defaultActiveKey}- defaultActiveKey={defaultActiveKey}- items={accountGroupList.map((v) => {- // 为默认分组添加IP和地址信息- const isDefaultGroup = v.isDefault;- const showIpInfo = isDefaultGroup && ipLocationInfo;- return {- key: v.id,- label: (- <>- <div className="accountSidebar-groupLabel">- <span className="accountSidebar-groupName">- {v.name}- </span>- <span className="accountSidebar-userCount">- {v.children?.length}/- {- v.children?.map(- (v) => v.status === AccountStatus.USABLE,- ).length- }- </span>- {/* 根据proxyIp判断显示IP信息 */}- {!v.proxyIp || v.proxyIp === "" ? (- // 本地IP显示- <div className="accountSidebar-ipInfo">- {ipLocationLoading ? (- <span className="accountSidebar-ipLoading">- {t("ipInfo.loading")}- </span>- ) : ipLocationInfo ? (- <Tooltip- title={t("ipInfo.tooltip", {- asn: ipLocationInfo.asn,- org: ipLocationInfo.org,- })}- >- <span className="accountSidebar-ipText">- {formatLocationInfo(ipLocationInfo)}- </span>- </Tooltip>- ) : (- <span className="accountSidebar-ipError">- {t("ipInfo.error")}- </span>- )}- </div>- ) : (- // 数据中的IP显示- v.ip &&- v.location && (+ <div className="accountSidebar-content">+ {sidebarTopExtra}+ <Collapse+ key={defaultActiveKey}+ defaultActiveKey={defaultActiveKey}+ items={accountGroupList.map((v) => {+ // 为默认分组添加IP和地址信息+ const isDefaultGroup = v.isDefault;+ const showIpInfo = isDefaultGroup && ipLocationInfo;+ return {+ key: v.id,+ label: (+ <>+ <div className="accountSidebar-groupLabel">+ <span className="accountSidebar-groupName">+ {v.name}+ </span>+ <span className="accountSidebar-userCount">+ {v.children?.length}/+ {+ v.children?.map(+ (v) => v.status === AccountStatus.USABLE,+ ).length+ }+ </span>+ {/* 根据proxyIp判断显示IP信息 */}+ {!v.proxyIp || v.proxyIp === "" ? (+ // 本地IP显示<div className="accountSidebar-ipInfo">- <Tooltip- title={`IP: ${v.ip}\n位置: ${v.location}`}- >- <span className="accountSidebar-ipText">- {extractCountry(v.location)} | {v.ip}+ {ipLocationLoading ? (+ <span className="accountSidebar-ipLoading">+ {t("ipInfo.loading")}+ </span>+ ) : ipLocationInfo ? (+ <Tooltip+ title={t("ipInfo.tooltip", {+ asn: ipLocationInfo.asn,+ org: ipLocationInfo.org,+ })}+ >+ <span className="accountSidebar-ipText">+ {formatLocationInfo(ipLocationInfo)}+ </span>+ </Tooltip>+ ) : (+ <span className="accountSidebar-ipError">+ {t("ipInfo.error")}</span>- </Tooltip>+ )}</div>- )- )}- </div>- </>- ),- children: (- <ul key={v.id} className="accountList">- {v.children?.map((account) => {- if (excludePlatforms.includes(account.type))- return "";- const platInfo = AccountPlatInfoMap.get(- account.type,- )!;- return (- <li- className={[- "accountList-item",- `${activeAccountId === account.id ? "accountList-item--active" : ""}`,- // 失效状态- account.status === AccountStatus.DISABLE &&- "accountList-item--disable",- ].join(" ")}- key={account.id}- onClick={async () => {- if (account.status === AccountStatus.DISABLE) {- // TODO 账户登录- // const res = await accountLogin(account.type);- // if (!res) return;- // message.success("账号登录成功!");- // return;- }- onAccountChange(account);- }}- >- <Avatar- src={getOssUrl(account.avatar)}- size="large"- />- <div className="accountList-item-right">- <div- className="accountList-item-right-name"- title={account.nickname}- >- <Tooltip title={undefined}>- {account.nickname}+ ) : (+ // 数据中的IP显示+ v.ip &&+ v.location && (+ <div className="accountSidebar-ipInfo">+ <Tooltip+ title={`IP: ${v.ip}\n位置: ${v.location}`}+ >+ <span className="accountSidebar-ipText">+ {extractCountry(v.location)} | {v.ip}+ </span></Tooltip></div>- <div className="accountList-item-right-footer">- <p className="accountList-item-right-plat">- <img src={platInfo?.icon} />- <span>{platInfo?.name}</span>- </p>- <Popover- content={- <AccountPopoverInfo- accountInfo={account}- />- }- placement="right"+ )+ )}+ </div>+ </>+ ),+ children: (+ <ul key={v.id} className="accountList">+ {v.children?.map((account) => {+ if (excludePlatforms.includes(account.type))+ return "";+ const platInfo = AccountPlatInfoMap.get(+ account.type,+ )!;+ return (+ <li+ className={[+ "accountList-item",+ `${activeAccountId === account.id ? "accountList-item--active" : ""}`,+ // 失效状态+ account.status === AccountStatus.DISABLE &&+ "accountList-item--disable",+ ].join(" ")}+ key={account.id}+ onClick={async () => {+ if (+ account.status === AccountStatus.DISABLE+ ) {+ // TODO 账户登录+ // const res = await accountLogin(account.type);+ // if (!res) return;+ // message.success("账号登录成功!");+ // return;+ }+ onAccountChange(account);+ }}+ >+ <Avatar+ src={getOssUrl(account.avatar)}+ size="large"+ />+ <div className="accountList-item-right">+ <div+ className="accountList-item-right-name"+ title={account.nickname}>- ...- </Popover>+ <Tooltip title={undefined}>+ {account.nickname}+ </Tooltip>+ </div>+ <div className="accountList-item-right-footer">+ <p className="accountList-item-right-plat">+ <img src={platInfo?.icon} />+ <span>{platInfo?.name}</span>+ </p>+ <Popover+ content={+ <AccountPopoverInfo+ accountInfo={account}+ onDeleteClick={(acc) => {+ setDeleteTarget(acc);+ setDeleteHitOpen(true);+ }}+ />+ }+ placement="right"+ >+ ...+ </Popover>+ </div></div>- </div>- </li>- );- })}- </ul>- ),- };- })}- />+ </li>+ );+ })}+ </ul>+ ),+ };+ })}+ />+ </div>)}<div className="accountSidebar-footer">@@ -576,6 +579,19 @@ const AccountSidebar = memo({t("createSpace.button")}</Button></div>+ {/* 删除账户确认弹窗(复用组件) */}+ <DeleteUserConfirmModal+ open={deleteHitOpen}+ deleteUsers={deleteTarget ? [deleteTarget] : []}+ onClose={() => {+ setDeleteHitOpen(false);+ }}+ onDeleteSuccess={async () => {+ await getAccountList();+ setDeleteTarget(null);+ message.success("删除成功");+ }}+ /></div></>);diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/DeleteUserConfirmModal.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/DeleteUserConfirmModal.tsxnew file mode 100644index 00000000..229718cc--- /dev/null+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/DeleteUserConfirmModal.tsx@@ -0,0 +1,82 @@+import { ForwardedRef, forwardRef, memo, useState } from "react";+import styles from "@/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.module.scss";+import { Button, Modal } from "antd";+import { deleteAccountsApi } from "@/api/account";+import AvatarPlat from "@/components/AvatarPlat";+import { SocialAccount } from "@/api/types/account.type";++export interface IDeleteUserConfirmModalRef {}++export interface IDeleteUserConfirmModalProps {+ open: boolean;+ onClose: () => void;+ onDeleteSuccess: () => void;+ deleteUsers: SocialAccount[];+}++const DeleteUserConfirmModal = memo(+ forwardRef(+ (+ {+ open,+ onClose,+ deleteUsers,+ onDeleteSuccess,+ }: IDeleteUserConfirmModalProps,+ ref: ForwardedRef<IDeleteUserConfirmModalRef>,+ ) => {+ const [deleteLoading, setDeleteLoading] = useState(false);++ return (+ <Modal+ open={open}+ title="删除提示"+ width={500}+ zIndex={1002}+ rootClassName={styles.userManageDeleteHitModal}+ footer={+ <>+ <Button onClick={() => onClose()}>取消</Button>+ <Button+ type="primary"+ loading={deleteLoading}+ onClick={async () => {+ setDeleteLoading(true);+ const res = await deleteAccountsApi(+ deleteUsers.map((v) => v.id),+ );+ setDeleteLoading(false);+ if (!res) return setDeleteLoading(false);+ onDeleteSuccess();+ onClose();+ }}+ >+ 确认+ </Button>+ </>+ }+ >+ <p>+ 是否删除以下+ <span style={{ color: "var(--errerColor)" }}>+ {deleteUsers.length}+ </span>+ 个账号?+ </p>+ <div className={styles["userManageDeleteHitModal-users"]}>+ {deleteUsers.map((v) => {+ return (+ <li key={v.id}>+ <AvatarPlat account={v} size="large" />+ <span>{v.nickname}</span>+ </li>+ );+ })}+ </div>+ </Modal>+ );+ },+ ),+);++export default DeleteUserConfirmModal;diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/MCPManagerModal.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/MCPManagerModal.tsxindex 205c4e4a..ae093d2b 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/MCPManagerModal.tsx+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/MCPManagerModal.tsx@@ -89,7 +89,7 @@ const MCPManagerModal = memo(try {await apiCreateMCPRef({key: createdKey,- accountId: account.account+ accountId: account.id});} catch (error) {console.error(`创建关联失败: ${account.account}`, error);diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/UserManageModal.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/UserManageModal.tsxindex 57fc324e..904e9a94 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/UserManageModal.tsx+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/UserManageModal.tsx@@ -40,6 +40,7 @@ import { deleteAccountsApi, updateAccountApi } from "@/api/account";import { useTransClient } from "@/app/i18n/client";import AddAccountModal from "../AddAccountModal";import { getIpLocation, IpLocationInfo, formatLocationInfo, extractCountry } from "@/utils/ipLocation";+import DeleteUserConfirmModal from "@/app/[lng]/accounts/components/AccountSidebar/DeleteUserConfirmModal";export interface IUserManageModalRef {setActiveGroup: (groupId: string) => void;@@ -79,13 +80,13 @@ const UserGroupSelect = ({};// 空间信息展示组件-const SpaceInfoCard = ({- activeGroup,- accountGroupList,- allUser-}: {- activeGroup: string;- accountGroupList: any[];+const SpaceInfoCard = ({+ activeGroup,+ accountGroupList,+ allUser+}: {+ activeGroup: string;+ accountGroupList: any[];allUser: string;}) => {const { t } = useTransClient("account");@@ -120,9 +121,9 @@ const SpaceInfoCard = ({if (!currentSpace) return null;return (- <Card- size="small"- style={{+ <Card+ size="small"+ style={{marginBottom: '16px',backgroundColor: 'var(--grayColor1)',border: '1px solid var(--grayColor3)'@@ -130,8 +131,8 @@ const SpaceInfoCard = ({><Space direction="vertical" size="small" style={{ width: '100%' }}>{/* <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>- <span style={{- fontSize: 'var(--fs-xs)',+ <span style={{+ fontSize: 'var(--fs-xs)',color: 'var(--grayColor6)',backgroundColor: 'var(--grayColor2)',padding: '2px 8px',@@ -140,13 +141,13 @@ const SpaceInfoCard = ({{currentSpace.children?.length || 0} 个账号</span></div> */}-+{/* 根据proxyIp判断显示IP和属地信息 */}{(!currentSpace.proxyIp || currentSpace.proxyIp === "") ? (// 本地IP显示- <div style={{- display: 'flex',- alignItems: 'center',+ <div style={{+ display: 'flex',+ alignItems: 'center',gap: '8px',padding: '8px',backgroundColor: 'var(--grayColor2)',@@ -162,7 +163,7 @@ const SpaceInfoCard = ({</span>) : ipLocationInfo ? (<Tooltip title={t("ipInfo.tooltip", { asn: ipLocationInfo.asn, org: ipLocationInfo.org })}>- <span style={{+ <span style={{color: 'var(--grayColor7)',cursor: 'help',fontWeight: '500'@@ -179,9 +180,9 @@ const SpaceInfoCard = ({) : (// 数据中的IP显示currentSpace.ip && currentSpace.location && (- <div style={{- display: 'flex',- alignItems: 'center',+ <div style={{+ display: 'flex',+ alignItems: 'center',gap: '8px',padding: '8px',backgroundColor: 'var(--grayColor2)',@@ -189,7 +190,7 @@ const SpaceInfoCard = ({}}><GlobalOutlined style={{ color: 'var(--colorPrimary5)' }} /><Tooltip title={`IP: ${currentSpace.ip}\n位置: ${currentSpace.location}`}>- <span style={{+ <span style={{color: 'var(--grayColor7)',cursor: 'help',fontWeight: '500'@@ -200,10 +201,10 @@ const SpaceInfoCard = ({</div>))}-+{/* 空间创建时间等信息 */}- <div style={{- fontSize: 'var(--fs-xs)',+ <div style={{+ fontSize: 'var(--fs-xs)',color: 'var(--grayColor6)',display: 'flex',alignItems: 'center',@@ -212,7 +213,7 @@ const SpaceInfoCard = ({<EnvironmentOutlined /><span>空间ID: {currentSpace.id}</span>{currentSpace.isDefault && (- <span style={{+ <span style={{color: 'var(--colorPrimary5)',backgroundColor: 'var(--colorPrimary1)',padding: '1px 6px',@@ -408,7 +409,7 @@ const UserManageModal = memo(};useImperativeHandle(ref, () => imperativeHandle);- const openAddAccountFlow = async () => {+ const openAddAccountFlow = async () => {const currentGroupId = activeGroup;close();if (currentGroupId === allUser.current) {@@ -459,54 +460,16 @@ const UserManageModal = memo(return (<>- <Modal+ <DeleteUserConfirmModal+ deleteUsers={selectedRows}open={deleteHitOpen}- title="删除提示"- width={500}- zIndex={1002}- rootClassName={styles.userManageDeleteHitModal}- footer={- <>- <Button onClick={() => setDeleteHitOpen(false)}>取消</Button>- <Button- type="primary"- loading={deleteLoading}- onClick={async () => {- setDeleteLoading(true);- const res = await deleteAccountsApi(- selectedRows.map((v) => v.id),- );- if (!res) return setDeleteLoading(false);- await getAccountList();- setDeleteHitOpen(false);- setSelectedRows([]);- message.success("删除成功");- setDeleteLoading(false);- }}- >- 确认- </Button>- </>- }- >- <p>- 是否删除以下- <span style={{ color: "var(--errerColor)" }}>- {selectedRows.length}- </span>- 个账号?- </p>- <div className={styles["userManageDeleteHitModal-users"]}>- {selectedRows.map((v) => {- return (- <li key={v.id}>- <AvatarPlat account={v} size="large" />- <span>{v.nickname}</span>- </li>- );- })}- </div>- </Modal>+ onClose={() => setDeleteHitOpen(false)}+ onDeleteSuccess={async () => {+ await getAccountList();+ setSelectedRows([]);+ message.success("删除成功");+ }}+ /><Modalopen={open}@@ -530,12 +493,12 @@ const UserManageModal = memo(<div className="userManage-content">{/* 空间信息卡片 - 显示在右侧上方 */}- <SpaceInfoCard+ <SpaceInfoCardactiveGroup={activeGroup}accountGroupList={accountGroupList}allUser={allUser.current}/>-+<div className="userManage-content-head" style={{ marginBottom: "8px", display: "flex", justifyContent: "flex-end" }}><Button type="primary" onClick={openAddAccountFlow}>{t("addAccount")}</Button></div>diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AddAccountModal/AddAccountModal.module.scss b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AddAccountModal/AddAccountModal.module.scssindex 2446d580..25dbbad6 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AddAccountModal/AddAccountModal.module.scss+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AddAccountModal/AddAccountModal.module.scss@@ -1,3 +1,7 @@+/*+ * 添加账号弹窗样式+ * 平台按钮区域:当空间不足时自动换行,禁止出现横向滚动条+ */.addAccountModal {:global {h1 {@@ -6,16 +10,18 @@}.addAccountModal_plats {display: grid;- grid-template-columns: repeat(6, 1fr);+ /* 自适应列数:根据可用宽度自动换行 */+ grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));gap: 12px;- max-height: 400px;overflow-y: auto;+ overflow-x: hidden;margin-bottom: 20px;&-item {padding: 8px;border-radius: 8px;height: 90px;- white-space: nowrap;+ /* 允许内容换行,避免撑出横向滚动条 */+ white-space: normal;display: flex;flex-direction: column;align-items: center;diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AddAccountModal/index.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AddAccountModal/index.tsxindex 837a44df..1b05210d 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AddAccountModal/index.tsx+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AddAccountModal/index.tsx@@ -14,6 +14,7 @@ import { instagramSkip } from "../../plat/InstagramLogin";import { threadsSkip } from "../../plat/ThreadsLogin";import { wxGzhSkip } from "../../plat/WxGzh";import { pinterestSkip } from "../../plat/PinterestLogin";+import { linkedinSkip } from "../../plat/LinkedinLogin";import { useAccountStore } from "@/store/account";import { useShallow } from "zustand/react/shallow";import { getIpLocation, IpLocationInfo } from "@/utils/ipLocation";@@ -150,7 +151,7 @@ const AddAccountModal = memo(// 判断平台是否在当前属地可用const isPlatformAvailable = (platType: PlatType): boolean => {// TODO: 暂时屏蔽国内平台 @@.@@- // return true;+ return true;if (isCnSpace === null) return true; // 未确定属地时显示所有平台const cnOnlyPlatforms = new Set<PlatType>([@@ -254,6 +255,9 @@ const AddAccountModal = memo(case PlatType.Pinterest:await pinterestSkip(key);break;+ case PlatType.LinkedIn:+ await linkedinSkip(key);+ break;}// 如果指定了目标空间,等待授权完成后移动新账号@@ -371,6 +375,7 @@ const AddAccountModal = memo(<Tooltip title={value.tips?.account} key={key}><Buttontype="text"+ style={{ width: '84px', }}className={`addAccountModal_plats-item ${!isAvailable ? 'disabled' : ''}`}disabled={!isAvailable || (spaceSelectionRequired && !selectedSpaceId)}onClick={() => handlePlatformClick(key as PlatType, value)}diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/AllPlatIcon.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/AllPlatIcon.tsxindex f7bf1feb..abe7f316 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/AllPlatIcon.tsx+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/AllPlatIcon.tsx@@ -4,15 +4,19 @@ import styles from "./calendarTiming.module.scss";export interface IAllPlatIconRef {}export interface IAllPlatIconProps {- width?: number;+ size?: number;+ style?: React.CSSProperties;}const AllPlatIcon = memo(forwardRef(- ({ width = 50 }: IAllPlatIconProps, ref: ForwardedRef<IAllPlatIconRef>) => {+ (+ { size = 50, style = {} }: IAllPlatIconProps,+ ref: ForwardedRef<IAllPlatIconRef>,+ ) => {const widthChild = useMemo(() => {- return width / 5;- }, [width]);+ return size / 5;+ }, [size]);const childStyle = useMemo(() => {return {@@ -24,7 +28,7 @@ const AllPlatIcon = memo(return (<divclassName={styles.allPlatIcon}- style={{ width: width + "px", height: width + "px" }}+ style={{ width: size + "px", height: size + "px", ...style }}><ul><li style={childStyle}></li>diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem.tsxindex 58e712d2..3256a7e7 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem.tsx+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem.tsx@@ -145,7 +145,7 @@ const CalendarTimingItem = memo({records &&recordsLast.map((v) => {return (- <div key={v.id}>+ <div key={v.id + v.title + v.uid + v.updatedAt}><CustomDragLayer publishRecord={v} snapToGrid={false} /><CalendarRecord publishRecord={v} /></div>diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scssindex d86d75a3..3ed66fe4 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss@@ -165,6 +165,7 @@}.allPlatIcon {+ flex-shrink: 0;width: 50px;height: 50px;border: 1px solid var(--grayColor8);diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/index.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/index.tsxindex 8e403442..c7f1ae50 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/index.tsx+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/index.tsx@@ -19,7 +19,13 @@ import {import { CSSTransition } from "react-transition-group";import { DatesSetArg } from "@fullcalendar/core";import { Button, Tabs } from "antd";-import { LeftOutlined, PlusOutlined, RightOutlined, CalendarOutlined, UnorderedListOutlined } from "@ant-design/icons";+import {+ LeftOutlined,+ PlusOutlined,+ RightOutlined,+ CalendarOutlined,+ UnorderedListOutlined,+} from "@ant-design/icons";import { useTransClient } from "@/app/i18n/client";import CalendarTimingItem from "@/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem";import PublishDialog, { IPublishDialogRef } from "@/components/PublishDialog";@@ -48,7 +54,9 @@ const CalendarTiming = memo();const { t } = useTransClient("account");const [currentDate, setCurrentDate] = useState<Date>(new Date());- const [activeMode, setActiveMode] = useState<"calendar" | "list">("calendar");+ const [activeMode, setActiveMode] = useState<"calendar" | "list">(+ "calendar",+ );const handleDatesSet = (arg: DatesSetArg) => {const date = calendarRef.current?.getApi().getDate();if (date) {@@ -99,16 +107,16 @@ const CalendarTiming = memo(// 监听 URL 参数,自动打开发布弹窗useEffect(() => {- const openPublish = searchParams.get('openPublish');- const fromSignIn = searchParams.get('fromSignIn');-- if (openPublish === 'true' && fromSignIn === 'true') {+ const openPublish = searchParams.get("openPublish");+ const fromSignIn = searchParams.get("fromSignIn");++ if (openPublish === "true" && fromSignIn === "true") {setPublishDialogOpen(true);// 清除 URL 参数,避免刷新页面时重复打开const url = new URL(window.location.href);- url.searchParams.delete('openPublish');- url.searchParams.delete('fromSignIn');- window.history.replaceState({}, '', url.toString());+ url.searchParams.delete("openPublish");+ url.searchParams.delete("fromSignIn");+ window.history.replaceState({}, "", url.toString());}}, [searchParams]);@@ -120,10 +128,16 @@ const CalendarTiming = memo(}};- window.addEventListener('openPublishDialog', handleOpenPublishDialog as EventListener);-+ window.addEventListener(+ "openPublishDialog",+ handleOpenPublishDialog as EventListener,+ );+return () => {- window.removeEventListener('openPublishDialog', handleOpenPublishDialog as EventListener);+ window.removeEventListener(+ "openPublishDialog",+ handleOpenPublishDialog as EventListener,+ );};}, []);@@ -319,7 +333,7 @@ const CalendarTiming = memo(</div></CSSTransition>) : (- <ListMode+ <ListModeonClickPub={(date) => {publishDialogRef.current!.setPubTime(date);setPublishDialogOpen(true);diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/LinkedinLogin.ts b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/LinkedinLogin.tsnew file mode 100644index 00000000..4cd110fd--- /dev/null+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/LinkedinLogin.ts@@ -0,0 +1,71 @@+import { PlatType } from "@/app/config/platConfig";+import { getLinkedInAuthUrlApi, checkMetaAuthApi } from "@/api/platAuth";+import { useUserStore } from "@/store/user";++/**+ * LinkedIn 被点击+ * @param platType 平台类型+ */+export async function linkedinSkip(platType: PlatType) {+ if (platType !== PlatType.LinkedIn) return;++ const res: any = await getLinkedInAuthUrlApi('pc');+ if (res?.code == 1) {+ useUserStore.getState().logout();+ return;+ }+ if (res?.code !== 0) return;+ const url = res.data.url;+ window.open(`${url}`);++ await linkedinLogin(res.data.taskId);+}++/**+ * LinkedIn 轮询登录结果+ * @param taskId 任务ID+ */+export function linkedinLogin(taskId: any): Promise<any> {+ return new Promise(async (resolve, reject) => {+ try {+ let pollCount = 0;+ const maxPollCount = 30;++ const checkAuthStatus = async () => {+ try {+ pollCount++;+ const authRess: any = await checkMetaAuthApi(taskId);+ const authRes = authRess;+ if (authRes?.code === 0 && authRes?.data.status == 1) {+ resolve(authRes);+ return true;+ }+ if (pollCount >= maxPollCount) {+ return true;+ }+ } catch (error) {+ return false;+ }+ };++ const interval = setInterval(async () => {+ const isSuccess = await checkAuthStatus();+ if (isSuccess) {+ clearInterval(interval);+ if (pollCount >= maxPollCount) {+ reject(new Error('授权超时,已达到最大轮询次数'));+ }+ }+ }, 2000);++ setTimeout(() => {+ clearInterval(interval);+ reject(new Error('授权超时'));+ }, 5 * 60 * 1000);+ } catch (e) {+ reject(e);+ }+ });+}++diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/appChat/AppChatCore.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/appChat/AppChatCore.tsxnew file mode 100644index 00000000..930da503--- /dev/null+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/appChat/AppChatCore.tsx@@ -0,0 +1,20 @@+"use client";++import * as React from "react";+import { useEffect, useState } from "react";++export const AppChatCore = () => {+ const [iframeUrl, setIframeUrl] = useState("");++ useEffect(() => {+ setIframeUrl(+ `${+ location.origin.includes("localhost")+ ? "https://dev.aitoearn.ai"+ : location.origin+ }/chat`,+ );+ }, []);++ return <iframe src={iframeUrl} style={{ height: "100%", border: "none" }} />;+};diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/appChat/page.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/appChat/page.tsxnew file mode 100644index 00000000..ca3fa1d9--- /dev/null+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/appChat/page.tsx@@ -0,0 +1,17 @@+import { PageParams } from "@/app/globals";+import * as React from "react";+import { getMetadata } from "@/utils/general";+import { AppChatCore } from "@/app/[lng]/appChat/AppChatCore";++export async function generateMetadata({ params }: PageParams) {+ return await getMetadata(+ {+ title: "Chat",+ },+ "en",+ );+}++export default function Page({ params }: PageParams) {+ return <AppChatCore />;+}diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/hotContent/components/HotContent/index.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/hotContent/components/HotContent/index.tsxindex 5f074f2b..64e596fd 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/hotContent/components/HotContent/index.tsx+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/hotContent/components/HotContent/index.tsx@@ -99,23 +99,24 @@ const HotContent = memo(// 跳转到作者主页const goAuthorPage = useCallback((data: RankingContent) => {+ let authorUrl = "";switch (selectedLabelInfo.ranking.platform.type) {case "douyin":- console.log(data);+ authorUrl = `https://www.douyin.com/user/${data.secUid}`;break;case "xiaohongshu":- window.open(- `https://www.xiaohongshu.com/user/profile/${data.author.id}`,- "_blank",- );+ authorUrl = `https://www.xiaohongshu.com/user/profile/${data.author.id}`;break;case "kuaishou":+ authorUrl = `https://kuaishou.cn/profile/${data.secUid}`;break;case "bilibili":+ authorUrl = `https://space.bilibili.com/${data.mid}`;break;case "shipinhao":break;}+ if (authorUrl) window.open(authorUrl, "_blank");},[selectedLabelInfo],);diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/income/page.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/income/page.tsxindex e023edab..a79b5d8b 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/income/page.tsx+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/income/page.tsx@@ -18,8 +18,8 @@ const { Option } = Select;export default function IncomePage() {const router = useRouter();- const { lng } = useParams();- const { userInfo, token } = useUserStore();+ const params = useParams();+ const { userInfo, token, lang } = useUserStore();const { t } = useTransClient('income');// 收入记录相关状态@@ -291,7 +291,10 @@ export default function IncomePage() {<spanclassName={styles.walletLink}role="button"- onClick={() => router.push(`/${lng}/wallet`)}+ onClick={() => {+ const effectiveLng = (params as any)?.lng || lang || "zh-CN";+ router.push(`/${effectiveLng}/wallet`);+ }}>{t('myWallet')}</span>diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/page.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/page.tsxindex 1da61694..a074f129 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/page.tsx+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/page.tsx@@ -3,7 +3,7 @@import { useEffect, useRef, useState } from "react";import styles from "./styles/difyHome.module.scss";import { directTrans, useTransClient } from "../i18n/client";-import { MAIN_APP_DOWNLOAD_URL } from "../config/appDownloadConfig";+import { MAIN_APP_DOWNLOAD_URL, getMainAppDownloadUrl } from "../config/appDownloadConfig";import logo from '@/assets/images/logo.png';@@ -20,7 +20,7 @@ import youtubeIcon from '@/assets/svgs/plat/youtube.png';import TwitterIcon from '@/assets/svgs/plat/twitter.png';import FacebookIcon from '@/assets/svgs/plat/facebook.png';import InstagramIcon from '@/assets/svgs/plat/instagram.png';-import LinkedInIcon from '@/assets/svgs/plat/linkedin.svg';+import LinkedInIcon from '@/assets/svgs/plat/linkedin.png';import PinterestIcon from '@/assets/svgs/plat/pinterest.png';import ThreadsIcon from '@/assets/svgs/plat/threads.png';@@ -201,7 +201,7 @@ function BrandBar() {{ name: 'Bilibili', key: 'Bilibili', hasIcon: true, iconPath: bilibiliIcon },{ name: 'Facebook', key: 'Facebook', hasIcon: true, iconPath: FacebookIcon.src },{ name: 'Instagram', key: 'Instagram', hasIcon: true, iconPath: InstagramIcon.src },- { name: 'LinkedIn', key: 'LinkedIn', hasIcon: true, iconPath: LinkedInIcon },+ { name: 'LinkedIn', key: 'LinkedIn', hasIcon: true, iconPath: LinkedInIcon.src },{ name: 'Pinterest', key: 'Pinterest', hasIcon: true, iconPath: PinterestIcon.src },{ name: 'Threads', key: 'Threads', hasIcon: true, iconPath: ThreadsIcon.src },{ name: 'X (Twitter)', key: 'X (Twitter)', hasIcon: true, iconPath: TwitterIcon.src },@@ -984,7 +984,7 @@ function UpcomingFeaturesSection() {</div></div>- <div className={styles.buildRight}>+ <div className={styles.buildRight} style={{ minHeight: '500px' }}><div className={styles.imageCarousel}><div className={styles.carouselContainer}><div className={`${styles.carouselSlide} ${styles.active}`}>@@ -1025,7 +1025,7 @@ function DownloadSection() {</p><div className={styles.downloadButtons}>- <a href={MAIN_APP_DOWNLOAD_URL} className={styles.downloadBtn} target="_blank" rel="noopener noreferrer">+ <a href={getMainAppDownloadUrl()} className={styles.downloadBtn} target="_blank" rel="noopener noreferrer"><div className={styles.downloadBtnContent}><AndroidOutlined className={styles.downloadIcon} style={{ fontSize: '24px' }} /><div className={styles.downloadBtnText}>@@ -1052,7 +1052,7 @@ function DownloadSection() {<div className={styles.qrCode}>{/* <div className={styles.qrCodeImage}> */}<QRCode- value={MAIN_APP_DOWNLOAD_URL}+ value={getMainAppDownloadUrl()}size={120}/>{/* </div> */}diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/pricing/page.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/pricing/page.tsxindex cde10672..18aa70f9 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/pricing/page.tsx+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/pricing/page.tsx@@ -702,51 +702,51 @@ export default function PricingPage() {{/* FAQ Section */}<div className={pricingStyles.faqSection}>- <h2 className={pricingStyles.faqTitle}>{t('faq.title')}</h2>- <Collapse- className={pricingStyles.faqCollapse}- items={faqItems.map((faq, index) => ({- key: index,- label: faq.question,- children: (- <div>- <p>{faq.answer}</p>- {faq.question === t('faq.creditDeduction.question') && (- <div className={pricingStyles.pricingTableContainer}>- <h4>{t('faq.creditDeduction.pricingTable.title' as any)}</h4>- <div className={pricingStyles.pricingTableWrapper}>- <table className={pricingStyles.pricingTable}>- <thead>- <tr>- <th>{t('faq.creditDeduction.pricingTable.headers.model' as any)}</th>- <th>{t('faq.creditDeduction.pricingTable.headers.type' as any)}</th>- <th>{t('faq.creditDeduction.pricingTable.headers.duration' as any)}</th>- <th>{t('faq.creditDeduction.pricingTable.headers.resolution' as any)}</th>- <th>{t('faq.creditDeduction.pricingTable.headers.credits' as any)}</th>- <th>{t('faq.creditDeduction.pricingTable.headers.price' as any)}</th>- </tr>- </thead>- <tbody>- {getPricingData().map((row: any, rowIndex: number) => (- <tr key={rowIndex}>- <td>{row.model}</td>- <td>{row.type}</td>- <td>{row.duration}</td>- <td>{row.resolution}</td>- <td>{row.credits}</td>- <td>{row.price}</td>+ <h2 className={pricingStyles.faqTitle}>{t('faq.title')}</h2>+ <Collapse+ className={pricingStyles.faqCollapse}+ items={faqItems.map((faq, index) => ({+ key: index,+ label: faq.question,+ children: (+ <div>+ <p>{faq.answer}</p>+ {faq.question === t('faq.creditDeduction.question') && (+ <div className={pricingStyles.pricingTableContainer}>+ <h4>{t('faq.creditDeduction.pricingTable.title' as any)}</h4>+ <div className={pricingStyles.pricingTableWrapper}>+ <table className={pricingStyles.pricingTable}>+ <thead>+ <tr>+ <th>{t('faq.creditDeduction.pricingTable.headers.model' as any)}</th>+ <th>{t('faq.creditDeduction.pricingTable.headers.type' as any)}</th>+ <th>{t('faq.creditDeduction.pricingTable.headers.duration' as any)}</th>+ <th>{t('faq.creditDeduction.pricingTable.headers.resolution' as any)}</th>+ <th>{t('faq.creditDeduction.pricingTable.headers.credits' as any)}</th>+ <th>{t('faq.creditDeduction.pricingTable.headers.price' as any)}</th></tr>- ))}- </tbody>- </table>+ </thead>+ <tbody>+ {getPricingData().map((row: any, rowIndex: number) => (+ <tr key={rowIndex}>+ <td>{row.model}</td>+ <td>{row.type}</td>+ <td>{row.duration}</td>+ <td>{row.resolution}</td>+ <td>{row.credits}</td>+ <td>{row.price}</td>+ </tr>+ ))}+ </tbody>+ </table>+ </div></div>- </div>- )}- </div>- )- }))}- />- </div>+ )}+ </div>+ )+ }))}+ />+ </div></div></div>);diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/profile/page.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/profile/page.tsxindex 21091b62..51b7bac1 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/profile/page.tsx+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/profile/page.tsx@@ -2,8 +2,10 @@import { useEffect, useState } from "react";import { Card, Descriptions, Button, message, Modal, Form, Input, Tabs, Table, Tag, Popconfirm, DatePicker, Select, Space } from "antd";-import { CrownOutlined, TrophyOutlined, GiftOutlined, StarOutlined, RocketOutlined, ThunderboltOutlined, HistoryOutlined, DollarOutlined, ShoppingCartOutlined, UserOutlined, GiftFilled } from "@ant-design/icons";-import { useRouter } from "next/navigation";+import { CrownOutlined, TrophyOutlined, GiftOutlined, StarOutlined, RocketOutlined, ThunderboltOutlined, HistoryOutlined, DollarOutlined, ShoppingCartOutlined, UserOutlined, GiftFilled, EditOutlined, CopyOutlined } from "@ant-design/icons";+import { useRouter, useSearchParams } from "next/navigation";+import { WalletOutlined } from "@ant-design/icons";+import Image from "next/image";import { useUserStore } from "@/store/user";import { getUserInfoApi, updateUserInfoApi, getPointsRecordsApi } from "@/api/apiReq";import { createPaymentOrderApi, PaymentType as VipPaymentType } from "@/api/vip";@@ -12,12 +14,19 @@ import type { Order, OrderListParams, SubscriptionListParams, RefundParams, Unsuimport { OrderStatus, PaymentType } from "@/api/types/payment";import styles from "./profile.module.css";import { useTransClient } from "@/app/i18n/client";+import PointsRechargeModal from "@/components/modals/PointsRechargeModal";+import VipContentModal from "@/components/modals/VipContentModal";+import PointsDetailModal from "@/components/modals/PointsDetailModal";++import plusvip from "@/assets/images/plusvip.png";+import logoHesd from "@/assets/images/logo.png";const { TabPane } = Tabs;const { Option } = Select;export default function ProfilePage() {const router = useRouter();+ const searchParams = useSearchParams();const { userInfo, setUserInfo, clearLoginStatus, token, lang } = useUserStore();const { t } = useTransClient('profile');const [loading, setLoading] = useState(true);@@ -35,6 +44,8 @@ export default function ProfilePage() {setHasShownFreeTrial(true);}}, []);++ // removed URL-driven auto-open; now fully controlled by state// 订单相关状态const [orders, setOrders] = useState<Order[]>([]);@@ -73,6 +84,8 @@ export default function ProfilePage() {const [isDragging, setIsDragging] = useState(false);const [paymentOrderId, setPaymentOrderId] = useState<string | null>(null);const [showPaymentSuccess, setShowPaymentSuccess] = useState(false);+ const [pointsDetailVisible, setPointsDetailVisible] = useState(false);+ const [vipModalVisible, setVipModalVisible] = useState(false);// 积分记录类型定义interface PointsRecord {@@ -135,7 +148,7 @@ export default function ProfilePage() {setUserInfo(response.data);// 检查是否需要显示免费会员提示- const hasVipInfo = response.data.vipInfo && Object.keys(response.data.vipInfo).length > 0;+ const hasVipInfo = response.data.vipInfo;if (!hasVipInfo && !hasShownFreeTrial) {// 延迟显示弹框,确保页面加载完成setTimeout(() => {@@ -330,7 +343,7 @@ export default function ProfilePage() {const handleFreeTrialModalOk = () => {setFreeTrialModalVisible(false);localStorage.setItem('freeTrialShown', 'true');- router.push('/vip');+ setVipModalVisible(true);};const handleFreeTrialModalCancel = () => {@@ -685,173 +698,112 @@ export default function ProfilePage() {},];++// 个人信息内容const renderProfileContent = () => (- <>+ <>+ {/* 顶部头部卡片 */}+ <div className={styles.headerCard}>+ {/* VIP 提示(已是VIP时显示) */}+ {isVip && (+ <div style={{+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ gap: 8,+ color: '#a66ae4',+ fontWeight: 700,+ }}>+ <Image src={plusvip} alt="VIP" className={styles.vipBadgeTop} />+ <span>{t('vipHonorText' as any)}</span>+ </div>+ )}-<div className={styles.vipCard}>- <div className={styles.vipContent}>- <div className={styles.vipHeader}>- <span className={styles.vipIcon}><CrownOutlined /></span>- <h2 className={styles.vipTitle}>{t('plusMember')}</h2>+ <div style={{ display: 'flex', flexDirection: 'row', alignItems: 'flex-start', justifyContent: 'center', gap: 8 }}>+ <div className={styles.avatar}>+ <Image src={logoHesd} alt="Logo" className={styles.logoHesd} />+ </div>+ <div className={styles.nameBlock}>+ <div className={styles.nameRow}>+ <span>{userInfo?.name || '-'}</span>+ <EditOutlined style={{ cursor: 'pointer', color: '#a66ae4' }} onClick={() => setIsModalOpen(true)} /></div>- {isVip ? (<p className={styles.vipDescription}>- {t('vipUserGreeting')}- </p>- ) : (- <p className={styles.vipDescription}>- {t('vipDescription')}- </p>- )}- <div className={styles.benefitsGrid}>- {vipBenefits.map((benefit, index) => (- <div key={index} className={styles.benefitItem}>- <div className={styles.benefitIcon}>{benefit.icon}</div>- <p className={styles.benefitName}>{benefit.name}</p>- </div>- ))}+ <div className={styles.subRow}>+ <span>{userInfo?.mail || '-'}</span></div>- {isVip ? (- <div className={styles.vipInfo}>- </div>- ) : (- <button className={styles.activateButton} onClick={handleGoToVipPage}>- {t('activateNow')}- </button>- )}+ <div className={styles.scoreRowThis}>+ <span className={styles.scoreLabel}>{t('inviteCode' as any)}</span>+ <span className={styles.scoreValue}>{userInfo?.popularizeCode || '-'}</span>+ <CopyOutlined+ style={{ color: '#a66ae4', cursor: 'pointer' }}+ onClick={() => {+ const code = userInfo?.popularizeCode || '';+ if (!code) return;+ navigator.clipboard?.writeText(code).then(() => {+ message.success(t('copySuccess' as any));+ }).catch(() => {+ message.success(t('copySuccess' as any));+ });+ }}+ />+ </div></div></div>--- {/* 积分显示卡片 */}- <div className={styles.pointsCard}>- <div className={styles.pointsContent}>- <div className={styles.pointsHeader}>- <div className={styles.pointsTitleSection}>- <span className={styles.pointsIcon}><GiftFilled /></span>- <span className={styles.pointsTitle}>{t('points.myPoints')}</span>- </div>- <span className={styles.pointsCount}>{userInfo?.score || 0}</span>- </div>- <p className={styles.pointsDescription}>- {t('points.pointsDescription')}- </p>++ <div className={styles.scoreRow}>- <div className={styles.pointsMethods}>- <h4 className={styles.methodsTitle}>{t('pointsPurchase.getPointsMethods' as any)}</h4>- <div className={styles.methodsGrid}>- <div className={styles.methodItem} onClick={handleGoToPublish}>- <div className={styles.methodIcon}>- <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">- <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>- </svg>- </div>- <div className={styles.methodContent}>- <h5>{t('pointsPurchase.publish' as any)}</h5>- <p>{t('pointsPurchase.publishDesc' as any)}</p>- </div>- </div>-- <div className={styles.methodItem} onClick={handleGoToVip}>- <div className={styles.methodIcon}>- <CrownOutlined />- </div>- <div className={styles.methodContent}>- <h5>{t('pointsPurchase.vip' as any)}</h5>- <p>{t('pointsPurchase.vipDesc' as any)}</p>- </div>- </div>-- <div className={styles.methodItem} onClick={handleRechargePoints}>- <div className={styles.methodIcon}>- <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">- <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>- </svg>- </div>- <div className={styles.methodContent}>- <h5>{t('pointsPurchase.buyPoints' as any)}</h5>- <p>{t('pointsPurchase.buyPointsDesc' as any)}</p>- </div>- </div>- </div>- </div>++</div></div>- {/* 余额显示卡片 */}- <div className={styles.incomeCard}>- <div className={styles.incomeContent}>- <div className={styles.incomeHeader}>- <div className={styles.incomeTitleSection}>- <span className={styles.incomeIcon}>- <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">- <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 10.9 13 11.5 13 12h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"/>- </svg>- </span>- <span className={styles.incomeTitle}>我的余额</span>- </div>- <span className={styles.incomeCount}>CNY {userInfo?.income || 0}</span>+++ {/* 深色统计卡片 */}+ <div className={styles.statsCard}>+ <div className={styles.statsHeader}>+ <Image src={plusvip} alt="VIP" className={styles.vipBadge} />+ <span className={styles.statsTitle}>{t('stats.totalEarned' as any)}</span>+ <span className={styles.statsAmount}>{(userInfo as any)?.totalIncome ?? 0}</span>+ <span className={styles.statsCurrency}>{t('stats.currencyYuan' as any)}</span>+ </div>+ <div className={styles.statsGrid}>+ <div className={styles.statsItem} onClick={() => router.push('/income')} >++ <div className={styles.statsLabel}>{t('stats.balance' as any)} <span className={styles.statsValue}> {userInfo?.income || 0} </span> CNY</div></div>- <div style={{ textAlign: 'right', marginTop: '4px', fontSize: '12px', color: '#999' }}>累计收益:CNY {(userInfo as any)?.totalIncome ?? 0}</div>- <p className={styles.incomeDescription}>- 通过完成任务获得的收入余额- </p>-- <div className={styles.incomeActions}>- <button- className={styles.incomeButton}- onClick={() => router.push('/income')}- >- <span className={styles.buttonIcon}>- <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">- <path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"/>- </svg>- </span>- <span>查看详情</span>- </button>+ <div className={styles.statsItem} style={{cursor:'pointer'}} onClick={() => setPointsDetailVisible(true)}>++ <div className={styles.statsLabel}>{t('stats.points' as any)} <span className={styles.statsValue}>{Math.floor((userInfo?.score as number) || 0) } </span> {t('stats.points' as any)}</div></div>+</div></div>- <Card- title={t('personalInfo')}- className={`${styles.card} ${styles.personalInfoCard}`}- extra={- <div className={styles.actions}>- <Button type="primary" onClick={() => setIsModalOpen(true)}>- {t('modifyUsername')}- </Button>- <Button type="primary" danger onClick={handleLogout}>- {t('logout')}- </Button>- </div>- }- >- <Descriptions bordered column={1}>- <Descriptions.Item label={t('userId')}>{userInfo?.id}</Descriptions.Item>- <Descriptions.Item label={t('username')}>{userInfo?.name}</Descriptions.Item>- <Descriptions.Item label={t('email')}>{userInfo?.mail}</Descriptions.Item>- <Descriptions.Item label={t('accountStatus')}>- {userInfo?.status === 1 ? t('normal') : t('disabled')}- </Descriptions.Item>- <Descriptions.Item label='邀请码'>{userInfo?.popularizeCode}</Descriptions.Item>- {isVip && (- <>- <Descriptions.Item label={t('memberType')}>{vipCycleType}</Descriptions.Item>- <Descriptions.Item label={t('memberExpireTime')}>{vipExpireTime}</Descriptions.Item>- </>- )}- </Descriptions>- </Card>- {!isVip && (- <div className={styles.normalUserCallToAction}>- <p>{t('upgradeCallToAction')}</p>- <button className={styles.activateButton} onClick={handleGoToVipPage}>- {t('activatePlusMember')}- </button>+ {/* 账号状态(仅非正常时显示) */}+ {userInfo?.status !== 1 && (+ <div style={{+ marginTop: 18,+ marginBottom: 18,+ color: '#ef4444',+ fontSize: 14+ }}>+ {t('accountStatus')}: {t('disabled')}</div>)}++++ {/* 底部申请注销按钮 */}+ <div style={{ textAlign: 'center', paddingTop: 24, display:'flex', flexDirection:'column', justifyContent:'center', alignItems:"flex-start" }}>+ <div style={{ display:'flex', flexDirection:'column', justifyContent:'space-between', alignItems:"flex-start", marginBottom: 8 }}>+ <div style={{ fontSize: 16, fontWeight: 800, color: '#54687B' }}>{t('deleteAccount.title' as any)}</div>+ <div>{t('deleteAccount.desc' as any)}</div>+ </div>+ <Button danger>{t('deleteAccount.apply' as any)}</Button>+ </div></>);@@ -920,35 +872,6 @@ export default function ProfilePage() {</div>);- // 积分记录内容- const renderPointsContent = () => (- <div className={styles.orderContent}>- <Card>- <Table- columns={pointsColumns}- dataSource={pointsRecords}- loading={pointsLoading}- rowKey="id"- className={styles.pointsTable}- pagination={{- current: pointsPagination.current,- pageSize: pointsPagination.pageSize,- total: pointsPagination.total,- onChange: (page, size) => {- fetchPointsRecords({ page, pageSize: size || 10 });- },- showSizeChanger: true,- showQuickJumper: true,- showTotal: (total) => t('points.totalRecords', { total }),- pageSizeOptions: ['10', '20', '50'],- }}- locale={{- emptyText: pointsLoading ? t('loading') : t('points.noPointsRecords')- }}- />- </Card>- </div>- );if (loading) {return null;@@ -990,17 +913,7 @@ export default function ProfilePage() {>{renderOrderContent()}</TabPane>- <TabPane- tab={- <span>- <GiftFilled />- {t('points.title')}- </span>- }- key="points"- >- {renderPointsContent()}- </TabPane>+</Tabs><Modal@@ -1185,98 +1098,10 @@ export default function ProfilePage() {</div></Modal>- {/* 积分充值弹窗 */}- <Modal- title={t('pointsPurchase.title' as any)}- open={pointsRechargeVisible}- onCancel={handleRechargeCancel}- footer={null}- width={500}- centered- maskClosable={false}- closable={true}- >- <div className={styles.rechargeContent}>- <div className={styles.currentPoints}>- <span className={styles.pointsLabel}>{t('pointsPurchase.currentPoints' as any)}</span>- <span className={styles.pointsValue}>{userInfo?.score || 0}</span>- </div>-- <div className={styles.rechargeSection}>- <h4>{t('pointsPurchase.selectAmount' as any)}</h4>- <p className={styles.rechargeDescription}>{t('pointsPurchase.description' as any)}</p>-- <div className={styles.sliderContainer}>- <div- className={styles.sliderTrack}- onClick={handleSliderClick}- >- <div- className={styles.sliderHandle}- style={{ left: `${(rechargeAmount / 50) * 100}%` }}- onMouseDown={handleSliderMouseDown}- />- </div>- <div className={styles.sliderLabels}>- <span>1K</span>- <span>50K</span>- </div>- </div>-- <div className={styles.amountInput}>- <Input- type="number"- value={rechargeAmount}- onChange={(e) => {- const value = Number(e.target.value);- if (value >= 1 && value <= 50) {- setRechargeAmount(value);- }- }}- min={1}- max={50}- style={{ width: '80px', marginRight: '8px' }}- />- <span>*1000积分</span>- </div>-- <div className={styles.totalPrice}>- <span>{t('pointsPurchase.purchasePoints' as any)}:</span>- <span className={styles.priceValue}>{rechargeAmount * 1000}</span>- </div>-- <div className={styles.totalPrice}>- <span>{t('pointsPurchase.totalPrice' as any)}:</span>- <span className={styles.priceValue}>${(rechargeAmount * 15).toFixed(2)}</span>- </div>- </div>-- <Button- type="primary"- size="large"- block- onClick={() => handleRechargeSubmit({ amount: rechargeAmount })}- className={styles.rechargeButton}- disabled={showPaymentSuccess}- >- {showPaymentSuccess ? t('pointsPurchase.paying' as any) : t('pointsPurchase.buyNow' as any)}- </Button>-- {/* 支付成功提示 */}- {showPaymentSuccess && (- <div className={styles.paymentSuccessTip}>- <p>{t('pointsPurchase.paymentTip' as any)}</p>- <Button- type="primary"- onClick={handlePaymentSuccess}- className={styles.paymentSuccessButton}- >- {t('pointsPurchase.confirmPayment' as any)}- </Button>- </div>- )}- </div>- </Modal>+ {/* 积分充值弹窗(复用组件) */}+ <PointsRechargeModal open={pointsRechargeVisible} onClose={handleRechargeCancel} />+ <PointsDetailModal open={pointsDetailVisible} onClose={() => setPointsDetailVisible(false)} />+ <VipContentModal open={vipModalVisible} onClose={() => setVipModalVisible(false)} /></div>);}\ No newline at end of filediff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/profile/profile.module.css b/aitoearn_web/aitoearn-web/src/app/[lng]/profile/profile.module.cssindex e5c52913..57e36296 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/profile/profile.module.css+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/profile/profile.module.css@@ -36,7 +36,7 @@}.personalInfoCard::before {- background: linear-gradient(135deg, #fce2a9 0%, #ffd700 100%);+ background: linear-gradient(135deg, #a66ae4 0%, #8b5cf6 100%);}.personalInfoCard .ant-card-head {@@ -46,10 +46,10 @@}.personalInfoCard .ant-card-head-title {- color: #fce2a9;+ color: #a66ae4;font-size: 18px;font-weight: 600;- background: linear-gradient(135deg, #fce2a9, #ffd700);+ background: linear-gradient(135deg, #a66ae4, #8b5cf6);-webkit-background-clip: text;-webkit-text-fill-color: transparent;background-clip: text;@@ -61,8 +61,8 @@}.personalInfoCard .ant-descriptions-bordered .ant-descriptions-item-label {- background: rgba(252, 226, 169, 0.1);- color: #fce2a9;+ background: rgba(166, 106, 228, 0.1);+ color: #a66ae4;font-weight: 600;border-color: rgba(255, 255, 255, 0.1);}@@ -82,15 +82,15 @@}.personalInfoCard .ant-btn-primary {- background: linear-gradient(135deg, #6a5acd 0%, #a64dd8 100%);+ background: linear-gradient(135deg, #a66ae4 0%, #8b5cf6 100%);border: none;- box-shadow: 0 2px 8px rgba(106, 90, 205, 0.3);+ box-shadow: 0 2px 8px rgba(166, 106, 228, 0.3);}.personalInfoCard .ant-btn-primary:hover {- background: linear-gradient(135deg, #7b68ee 0%, #b76dd9 100%);+ background: linear-gradient(135deg, #8b5cf6 0%, #a66ae4 100%);transform: translateY(-2px);- box-shadow: 0 4px 12px rgba(106, 90, 205, 0.4);+ box-shadow: 0 4px 12px rgba(166, 106, 228, 0.4);}.personalInfoCard .ant-btn-dangerous {@@ -223,9 +223,9 @@}.activateButton {- background: linear-gradient(135deg, #fce2a9 0%, #ffd700 100%);- border: 2px solid rgba(252, 226, 169, 0.3);- color: #2B2F36;+ background: linear-gradient(135deg, #a66ae4 0%, #8b5cf6 100%);+ border: 2px solid rgba(166, 106, 228, 0.3);+ color: #ffffff;padding: 14px 24px;border-radius: 12px;font-size: 15px;@@ -235,7 +235,7 @@transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);position: relative;overflow: hidden;- box-shadow: 0 4px 16px rgba(252, 226, 169, 0.3);+ box-shadow: 0 4px 16px rgba(166, 106, 228, 0.3);text-transform: uppercase;letter-spacing: 0.5px;}@@ -272,20 +272,20 @@}.activateButton:hover {- background: linear-gradient(135deg, #ffd700 0%, #fce2a9 100%);+ background: linear-gradient(135deg, #8b5cf6 0%, #a66ae4 100%);transform: translateY(-3px) scale(1.02);- box-shadow: 0 8px 25px rgba(252, 226, 169, 0.5);- border-color: rgba(252, 226, 169, 0.6);+ box-shadow: 0 8px 25px rgba(166, 106, 228, 0.5);+ border-color: rgba(166, 106, 228, 0.6);}.activateButton:active {transform: translateY(-1px) scale(0.98);- box-shadow: 0 4px 12px rgba(252, 226, 169, 0.4);+ box-shadow: 0 4px 12px rgba(166, 106, 228, 0.4);}.activateButton:focus {outline: none;- box-shadow: 0 0 0 3px rgba(252, 226, 169, 0.3), 0 4px 16px rgba(252, 226, 169, 0.3);+ box-shadow: 0 0 0 3px rgba(166, 106, 228, 0.3), 0 4px 16px rgba(166, 106, 228, 0.3);}.normalUserCallToAction {@@ -896,15 +896,174 @@/* 余额卡片样式 */.incomeCard {- background: linear-gradient(135deg, #2B2F36 0%, #4E4C4D 100%);+ background: #ffffff;border-radius: 12px;padding: 20px;margin-bottom: 20px;- color: #fff;- box-shadow: 0 4px 16px rgba(43, 47, 54, 0.2);+ color: #2B2F36;+ box-shadow: 0 4px 16px rgba(43, 47, 54, 0.08);position: relative;overflow: hidden;- border: 1px solid rgba(255, 255, 255, 0.1);+ border: 1px solid rgba(252, 226, 169, 0.35);+}++/* 顶部头部信息卡片 */+.headerCard {+ border-radius: 16px;+ padding: 20px 0px;+ display: flex;+ flex-direction: column;+ align-items: flex-start;+ gap: 16px;+}++.avatar {+ width: 68px;+ height: 68px;+ border-radius: 50%;+ overflow: hidden;+ background: #e9d5ff;+ display: flex;+ align-items: center;+ justify-content: center;+ color: #a66ae4;+ font-size: 28px;+ border: 2px solid rgba(166,106,228,0.35);+}++.nameBlock {+ display: flex;+ flex-direction: column;+ justify-content: flex-start;+ align-items: flex-start;+ gap: 4px;+ margin-top: 5px;+}++.nameRow {+ display: flex;+ align-items: center;+ gap: 8px;+ font-size: 18px;+ font-weight: 700;+ color: #111827;+}++.vipBadge {+ width: 30px;+ height: auto;+ margin-bottom: 10px;+}++.vipBadgeTop {+ width: 20px;+ height: auto;+}++.subRow {+ display: flex;+ gap: 12px;+ color: #6b7280;+ font-size: 12px;+ margin-top: 2px;+}++.scoreRow {+ margin-left: auto;+ display: flex;+ flex-direction: column;+ justify-content: center;+ align-items: flex-end;+}++.scoreRowThis {+ display: flex;+ flex-direction: row;+ align-items: baseline;+ gap: 8px;+ margin-top: 2px;+}++.scoreLabel {+ color: #6b7280;+ font-size: 12px;+}++.scoreValue {+ margin-top: 2px;+ font-weight: 600;+ font-size: 18px;+ background: linear-gradient(135deg, #a66ae4, #8b5cf6);+ -webkit-background-clip: text;+ -webkit-text-fill-color: transparent;+ background-clip: text;+}++/* 深色统计卡片 */+.statsCard {+ border-radius: 14px;+ padding: 18px 0;+ color: #e5e7eb;+ border: 1px solid rgba(255,255,255,0.06);+ overflow: hidden;+}++.statsHeader {+ display: flex;+ align-items: center;+ gap: 10px;+}++.statsTitle {+ color: #4B6775;+ font-size: 14px;+}++.statsAmount {+ font-size: 28px;+ font-weight: 800;+ color: #54687B;+ margin-bottom: 10px;+}++.statsCurrency {+ margin-left: 6px;+ color: #4B6775;+}++.statsGrid {+ display: grid;+ grid-template-columns: repeat(3, 1fr);+ text-align: center;+ margin-top: 16px;+ padding-top: 12px;+ padding-bottom: 8px;+}++.logoHesd {+ width: 38px;+ height: 38px;+}++.statsItem {+ padding: 16px 8px 18px 8px;+}++.statsItem:hover{+ cursor: pointer;+}++.statsValue {+ font-size: 22px;+ font-weight: 800;+ color: #a66ae4;+}++.statsLabel {+ margin-top: 4px;+ color: #95887D;+ font-size: 12px;+ text-align: left;}.incomeCard::before {@@ -913,9 +1072,8 @@top: 0;left: 0;right: 0;- bottom: 0;- background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);- animation: shimmer 3s ease-in-out infinite;+ height: 3px;+ background: linear-gradient(135deg, #a66ae4 0%, #8b5cf6 100%);}.incomeContent {@@ -938,11 +1096,11 @@.incomeIcon {font-size: 20px;- color: #fce2a9;- background: rgba(252, 226, 169, 0.1);+ color: #a66ae4;+ background: rgba(166, 106, 228, 0.18);border-radius: 50%;- width: 32px;- height: 32px;+ width: 36px;+ height: 36px;display: flex;align-items: center;justify-content: center;@@ -951,15 +1109,14 @@.incomeTitle {font-size: 18px;font-weight: 600;- color: #fce2a9;+ color: #2B2F36;}.incomeCount {font-size: 28px;- font-weight: bold;- color: #fce2a9;- text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);- background: linear-gradient(135deg, #fce2a9, #ffd700);+ font-weight: 800;+ color: #a66ae4;+ background: linear-gradient(135deg, #a66ae4, #8b5cf6);-webkit-background-clip: text;-webkit-text-fill-color: transparent;background-clip: text;@@ -967,9 +1124,9 @@.incomeDescription {font-size: 13px;- color: rgba(255, 255, 255, 0.8);- margin-bottom: 18px;- line-height: 1.4;+ color: #7c7c7c;+ margin-bottom: 12px;+ line-height: 1.5;}.incomeActions {@@ -978,9 +1135,9 @@}.incomeButton {- background: linear-gradient(135deg, #fce2a9 0%, #ffd700 100%);- border: 2px solid rgba(252, 226, 169, 0.3);- color: #2B2F36;+ background: linear-gradient(135deg, #a66ae4 0%, #8b5cf6 100%);+ border: 2px solid rgba(166, 106, 228, 0.4);+ color: #ffffff;padding: 12px 20px;border-radius: 8px;font-size: 14px;@@ -989,7 +1146,7 @@transition: all 0.3s ease;position: relative;overflow: hidden;- box-shadow: 0 2px 8px rgba(252, 226, 169, 0.3);+ box-shadow: 0 2px 8px rgba(166, 106, 228, 0.35);display: flex;align-items: center;gap: 8px;@@ -1009,7 +1166,7 @@left: -100%;width: 100%;height: 100%;- background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);+ background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);transition: left 0.6s ease;}@@ -1018,10 +1175,10 @@}.incomeButton:hover {- background: linear-gradient(135deg, #ffd700 0%, #fce2a9 100%);+ background: linear-gradient(135deg, #8b5cf6 0%, #a66ae4 100%);transform: translateY(-2px);- box-shadow: 0 4px 12px rgba(252, 226, 169, 0.4);- border-color: rgba(252, 226, 169, 0.6);+ box-shadow: 0 4px 12px rgba(166, 106, 228, 0.5);+ border-color: rgba(166, 106, 228, 0.6);}.incomeButton:hover .buttonIcon {@@ -1030,10 +1187,10 @@.incomeButton:active {transform: translateY(-1px);- box-shadow: 0 2px 6px rgba(252, 226, 169, 0.3);+ box-shadow: 0 2px 6px rgba(166, 106, 228, 0.3);}.incomeButton:focus {outline: none;- box-shadow: 0 0 0 3px rgba(252, 226, 169, 0.3), 0 2px 8px rgba(252, 226, 169, 0.3);+ box-shadow: 0 0 0 3px rgba(166, 106, 228, 0.35), 0 2px 8px rgba(166, 106, 228, 0.35);}\ No newline at end of filediff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/styles/difyHome.module.scss b/aitoearn_web/aitoearn-web/src/app/[lng]/styles/difyHome.module.scssindex 9dcf6d0d..12836073 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/styles/difyHome.module.scss+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/styles/difyHome.module.scss@@ -50,13 +50,17 @@}.header {- padding: 20px 0;+ padding: 15px 0;background: rgba(255, 255, 255, 0.95);backdrop-filter: blur(10px);position: sticky;top: 0;z-index: 100;border-bottom: 1px solid rgba(0, 0, 0, 0.05);++ @media (max-width: 768px) {+ padding: 10px 0 !important;+ }}.headerContainer {@@ -68,6 +72,13 @@justify-content: space-between;}+.headerRight {+ @media (max-width: 768px) {+ display: flex;+ align-items: center;+ }+}+.logo {display: flex;flex-direction: row;@@ -76,6 +87,13 @@font-size: 24px;font-weight: 700;color: #4f46e5;+ @media (max-width: 768px) {+ font-size: 18px;+ img {+ width: 40px;+ object-fit: contain;+ }+ }}.logoText {@@ -503,6 +521,10 @@opacity: 0.3;}}++ @media (max-width: 768px) {+ padding: 40px 0;+ }}// 脉冲动画@@ -544,6 +566,24 @@max-width: 900px;margin: 0 auto;}++ @media (max-width: 768px) {+ grid-template-columns: 1fr; // 单列上下布局+ gap: 40px;+ min-height: auto;+ }+}++// 保证左右区块在移动端占满宽度+@media (max-width: 768px) {+ .buildLeft,+ .buildRight {+ width: 100%;+ min-height: 400px;+ img {+ max-width: 100%;+ }+ }}.buildLeft,@@ -683,6 +723,10 @@padding: 120px 0;overflow: hidden;position: relative;++ @media (max-width: 768px) {+ padding: 40px 0;+ }}.downloadContainer {@@ -721,6 +765,10 @@display: flex;gap: 16px;flex-wrap: wrap;++ @media (max-width: 768px) {+ justify-content: center;+ }}.downloadBtn {@@ -1436,6 +1484,10 @@justify-content: space-between;align-items: center;font-size: 15px;++ @media (max-width: 768px) {+ position: static;+ }}.copyright {@@ -1506,6 +1558,9 @@background-clip: text;-webkit-background-clip: text;transition: color 0.1s ease;+ @media (max-width: 748px) {+ margin-left: 20px !important;+ }}@media (max-width: 1024px) {@@ -1515,8 +1570,8 @@.buildContent,.connectContent {- grid-template-columns: 1fr;- gap: 40px;+ //grid-template-columns: 1fr;+ //gap: 40px;}.productionFeatures {@@ -1731,15 +1786,29 @@.carouselSlide {position: absolute;top: 0;- left: 220px;+ right: 0;width: 100%;height: 100%;opacity: 0;transition: opacity 0.5s ease-in-out;-+ display: flex;+ justify-content: right;+ align-items: flex-start;+&.active {opacity: 1;}++ @media (max-width: 768px) {+ display: flex;+ justify-content: center;+ img {+ height: 100%;+ }+ video {+ height: 100%;+ }+ }}.carouselImage {@@ -1899,7 +1968,7 @@}}-// 即将上线功能模块样式+// 即将上线功能��块样式.comingSoonPlaceholder {display: flex;flex-direction: column;diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/tasks/taskPageCore.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/tasks/taskPageCore.tsxindex 0905377d..088c90fe 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/tasks/taskPageCore.tsx+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/tasks/taskPageCore.tsx@@ -624,7 +624,7 @@ export default function TaskPageCore() {const publishData = {flowId: publishAccount.uid, // 使用账号的uid作为flowIdaccountType: publishAccount.type,- accountId: publishAccount.account,+ accountId: publishAccount.id,title: task.title,desc: task.description,type: task.type as any, // 转换为PubType@@ -752,7 +752,7 @@ export default function TaskPageCore() {const publishData = {flowId: publishAccount.uid, // 使用账号的uid作为flowIdaccountType: publishAccount.type,- accountId: publishAccount.account,+ accountId: publishAccount.id,title: acceptedTaskDetail.task?.title,desc: acceptedTaskDetail.task?.description,type: acceptedTaskDetail.task?.type as any, // 转换为PubTypediff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/vip/page.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/vip/page.tsxindex c8058660..bd4b9371 100644--- a/aitoearn_web/aitoearn-web/src/app/[lng]/vip/page.tsx+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/vip/page.tsx@@ -82,7 +82,6 @@ export default function VipPage() {success_url: lang === 'zh-CN' ? "/zh-CN/profile" : "/en/profile",mode: paymentMethod,payment: paymentType,- flagTrialPeriodDays,metadata: {userId: userInfo.id}diff --git a/aitoearn_web/aitoearn-web/src/app/config/appDownloadConfig.ts b/aitoearn_web/aitoearn-web/src/app/config/appDownloadConfig.tsindex 516a4047..b68bcbea 100644--- a/aitoearn_web/aitoearn-web/src/app/config/appDownloadConfig.ts+++ b/aitoearn_web/aitoearn-web/src/app/config/appDownloadConfig.ts@@ -12,8 +12,19 @@ export interface AppDownloadConfig {tips: string[];}-// 主应用下载配置-export const MAIN_APP_DOWNLOAD_URL = "https://yikart.oss-cn-beijing.aliyuncs.com/aitoearn-1.0.9.1.apk";+// 主应用下载配置(默认英文)+export const MAIN_APP_DOWNLOAD_URL = "https://docs.aitoearn.ai/en/downloads";++// 根据语言获取主应用下载地址+// zh-* 使用中文地址,其余使用英文地址+import { useUserStore } from "@/store/user";+export const getMainAppDownloadUrl = (lng?: string): string => {+ const lang = (lng || useUserStore.getState().lang || "zh-CN").toLowerCase();+ const isZh = lang.startsWith("zh");+ return isZh+ ? "https://docs.aitoearn.ai/zh/downloads"+ : "https://docs.aitoearn.ai/en/downloads";+};export const APP_DOWNLOAD_CONFIGS: Record<string, AppDownloadConfig> = {xhs: {diff --git a/aitoearn_web/aitoearn-web/src/app/config/platConfig.ts b/aitoearn_web/aitoearn-web/src/app/config/platConfig.tsindex e770fefa..607816b2 100644--- a/aitoearn_web/aitoearn-web/src/app/config/platConfig.ts+++ b/aitoearn_web/aitoearn-web/src/app/config/platConfig.ts@@ -12,6 +12,7 @@ import wxSphSvg from "@/assets/svgs/plat/wx-sph.svg";import gongzhonghaoSvg from "@/assets/svgs/plat/gongzhonghao.png";import pinterestSvg from "@/assets/svgs/plat/pinterest.png";import xhsSvg from "@/assets/svgs/plat/xhs.svg";+import linkedinSvg from "@/assets/svgs/plat/linkedin.png";import { directTrans } from "@/app/i18n/client";// 平台类型@@ -29,6 +30,7 @@ export enum PlatType {Instagram = "instagram", // InstagramThreads = "threads", // ThreadsPinterest = "pinterest", // Pinterest+ LinkedIn = "linkedin", // LinkedIn}export interface IAccountPlatInfo {@@ -272,6 +274,22 @@ export const AccountPlatInfoMap = new Map<PlatType, IAccountPlatInfo>([themeColor: "#CC2025",},],+ [+ PlatType.LinkedIn,+ {+ name: "LinkedIn",+ icon: linkedinSvg.src,+ url: "https://www.linkedin.com/",+ pubTypes: new Set([PubType.VIDEO, PubType.ImageText]),+ commonPubParamsConfig: {+ titleMax: 80,+ topicMax: 100,+ desMax: 500,+ imagesMax: 20,+ },+ themeColor: "blue",+ },+ ],]);export const AccountPlatInfoArr = Array.from(AccountPlatInfoMap);diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/account.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/account.jsonindex 68b4963c..b6a71e32 100644--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/account.json+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/account.json@@ -16,6 +16,7 @@"checkLoginStatus": "Check Login Status","checkAllLoginStatus": "Check All Login Status","nickname": "Nickname",+ "fansCount": "Fans Count","platform": "Platform","loginStatus": "Login Status","accountStatus": "Account Status",@@ -75,8 +76,8 @@"nameRequired": "Please enter channel name"},"locationRestriction": {- "cnSpace": "Current space is in China region, only domestic platforms are shown",- "nonCnSpace": "Current space is in non-China region, domestic platforms are temporarily unavailable"+ "cnSpace": "Current space is in China region, only chinese platforms are shown",+ "nonCnSpace": "Current space is in non-China region,chinese platforms are temporarily unavailable"},"userManageSidebar": {"allAccounts": "All Accounts",@@ -103,7 +104,7 @@"rednote": "Rednote","kwai": "Kwai","bilibili": "Bilibili",- "wxgzh": "WeChat Official Account",+ "wxgzh": "WeChat Official","douyin": "Douyin","wxsph": "WeChat Channels"}\ No newline at end of filediff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/notification.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/notification.jsonindex 52b9b93a..9d338740 100644--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/notification.json+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/notification.json@@ -68,7 +68,7 @@"douyin": "Douyin","xhs": "Xiaohongshu","wxSph": "WeChat Video",- "wxGzh": "WeChat Official Account",+ "wxGzh": "WeChat Official","facebook": "Facebook","instagram": "Instagram","threads": "Threads",diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/profile.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/profile.jsonindex 1c949b50..e25bd51c 100644--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/profile.json+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/profile.json@@ -147,5 +147,20 @@"completelyFree": "🎁 Completely free, no payment required","claimNow": "Claim Now","later": "Later"+ },+ "vipHonorText": "VIP Member",+ "inviteCode": "Invite Code",+ "copySuccess": "Copied",+ "stats": {+ "totalEarned": "Total Earned",+ "balance": "Balance",+ "points": "Points",+ "coupons": "Coupons",+ "currencyYuan": "CNY"+ },+ "deleteAccount": {+ "title": "Delete your account",+ "desc": "When you delete your account, you lose access to Aitoearn services and we permanently delete your personal data.",+ "apply": "Delete Account"}}\ No newline at end of filediff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/publish.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/publish.jsonindex 1b8089a2..68dd5480 100644--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/publish.json+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/publish.json@@ -103,7 +103,11 @@"actions": {"selectMaterial": "Select Material","selectDraft": "Select Draft",- "cropCover": "Crop Cover"+ "cropCover": "Crop Cover",+ "contentModeration": "Content Moderation",+ "checkingContent": "Checking...",+ "contentSafe": "Content Safe",+ "contentUnsafe": "Content Unsafe"},"tiktok": {"creatorInfo": "Creator Info",diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/route.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/route.jsonindex bf2b813c..fac2983c 100644--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/route.json+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/route.json@@ -6,7 +6,7 @@"hotContentNew": "Hot Content New","aiTools": "AI Tools","tasks": "Tasks",- "interactive": "Interactive",+ "interactive": "Engage","engagement": "Engagement","dataStatistics": "Data Statistics","navigation": "Navigation",diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/task.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/task.jsonindex afe647da..6b18c557 100644--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/task.json+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/task.json@@ -36,7 +36,7 @@"douyin": "Douyin","xhs": "Xiaohongshu","wxSph": "WeChat Video",- "wxGzh": "WeChat Official Account",+ "wxGzh": "WeChat Official","facebook": "Facebook","instagram": "Instagram","threads": "Threads",diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/vip.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/vip.jsonindex ad6d5682..da0ca95a 100644--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/vip.json+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/vip.json@@ -36,5 +36,113 @@"onceMonth": "One-time Monthly","month": "Monthly","year": "Yearly"+ },+ "modal": {+ "title": "7-Day Free Trial",+ "highlight": "Get 100 Points",+ "choosePlan": "Choose your plan or",+ "buyPoints": "Buy Points",+ "pointsDetail": "Points Detail",+ "tabs": {+ "yearly": "Yearly",+ "monthly": "Monthly",+ "once": "One-Month"+ },+ "savings": {+ "yearly": "Save 50%",+ "monthly": "Save 25%"+ },+ "free": {+ "title": "Free",+ "price": "¥0",+ "period": "/month",+ "forever": "Forever",+ "currentPlan": "Current Plan",+ "points": "60 pts/month",+ "features": {+ "dailyPoints": "Daily points",+ "maxPoints": "Max 60 pts",+ "videos": "60 videos/month",+ "images": "120 images/month",+ "storage": "500M storage"+ }+ },+ "plans": {+ "yearly": {+ "title": "Yearly",+ "bestValue": "Best Value",+ "price": "$144",+ "period": "/year",+ "originalPrice": "$300/year",+ "button": "$144/year Save 50%",+ "points": "8,400 pts",+ "description": "16,800 images & 8,400 videos",+ "features": {+ "dailyPoints": "Daily points",+ "contentReview": "Content review",+ "multiModel": "Multi-model support",+ "textToVideo": "Text to video",+ "aiGeneration": "AI generation",+ "noWatermark": "No watermark, faster",+ "storage": "5G storage"+ }+ },+ "monthly": {+ "title": "Monthly",+ "price": "$228",+ "period": "/year",+ "originalPrice": "$25/month",+ "button": "$19/month Save 25%",+ "points": "8,400 pts",+ "description": "16,800 images & 8,400 videos"+ },+ "once": {+ "title": "One-time",+ "price": "$25",+ "period": "/month",+ "button": "$25/month",+ "points": "700 pts",+ "description": "1,400 images & 700 videos",+ "storage": "3G storage"+ }+ },+ "trial": "7-day free trial",+ "cancelAnytime": "Cancel anytime",+ "cancelMonthly": "Cancel anytime"+ },+ "points": {+ "title": "Points Detail",+ "current": "Current Points",+ "remaining": "Remaining",+ "subscribed": "Subscribed",+ "recharged": "Recharged",+ "gifted": "Gifted",+ "validity": "Validity",+ "tabs": {+ "all": "All",+ "spend": "Spent",+ "earn": "Earned"+ },+ "noData": "No data",+ "disclaimer": "Last 30 days only, data may be delayed",+ "recordChange": "Points Change",+ "recordTypes": {+ "recharge": "Recharge",+ "consume": "Consume",+ "gift": "Gift",+ "refund": "Refund",+ "expire": "Expire",+ "adjust": "Adjust"+ }+ },+ "recharge": {+ "title": "Buy Points",+ "current": "Current Points",+ "price": "1000 points for $15",+ "amount": "Buy Points",+ "total": "Total",+ "buyNow": "Buy Now",+ "range": "1K-50K",+ "unit": "points"}}\ No newline at end of filediff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/account.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/account.jsonindex e1d226fd..f589f809 100644--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/account.json+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/account.json@@ -16,6 +16,7 @@"checkLoginStatus": "登录状态检测","checkAllLoginStatus": "一键检测登录状态","nickname": "昵称",+ "fansCount": "粉丝数","platform": "平台","loginStatus": "登录状态","accountStatus": "账号状态",diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/profile.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/profile.jsonindex 2ec5d2cf..19ccd12f 100644--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/profile.json+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/profile.json@@ -147,5 +147,20 @@"completelyFree": "🎁 完全免费,无需支付任何费用","claimNow": "立即领取","later": "稍后再说"+ },+ "vipHonorText": "您是尊贵的VIP用户",+ "inviteCode": "邀请码",+ "copySuccess": "已复制",+ "stats": {+ "totalEarned": "累计赚钱",+ "balance": "当前余额",+ "points": "可用积分",+ "coupons": "优惠券",+ "currencyYuan": "元"+ },+ "deleteAccount": {+ "title": "删除你的账户",+ "desc": "删除账户后,你将无法继续使用 Aitoearn 服务,我们也会永久删除你的个人数据。",+ "apply": "申请注销"}}\ No newline at end of filediff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/publish.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/publish.jsonindex 3e26e158..fb08eb5a 100644--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/publish.json+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/publish.json@@ -103,7 +103,11 @@"actions": {"selectMaterial": "选择素材","selectDraft": "选择草稿",- "cropCover": "裁剪封面"+ "cropCover": "裁剪封面",+ "contentModeration": "内容安全检测",+ "checkingContent": "检测中...",+ "contentSafe": "内容安全",+ "contentUnsafe": "内容不安全"},"tiktok": {"creatorInfo": "创作者信息",diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/vip.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/vip.jsonindex 5e9cebcc..fc57b239 100644--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/vip.json+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/vip.json@@ -36,5 +36,113 @@"onceMonth": "一次性月度","month": "月度订阅","year": "年度订阅"+ },+ "modal": {+ "title": "免费试用7天会员",+ "highlight": "立得100积分",+ "choosePlan": "选择合适你的套餐,或直接",+ "buyPoints": "购买积分",+ "pointsDetail": "积分详情",+ "tabs": {+ "yearly": "连续包年",+ "monthly": "连续包月",+ "once": "单月购买"+ },+ "savings": {+ "yearly": "省50%",+ "monthly": "省25%"+ },+ "free": {+ "title": "免费",+ "price": "¥0",+ "period": "每月",+ "forever": "永久",+ "currentPlan": "当前计划",+ "points": "60积分每月",+ "features": {+ "dailyPoints": "发布赠送积分",+ "maxPoints": "最高60 积分",+ "videos": "每月最高可生成60个视频",+ "images": "每月最高可生成120张图片",+ "storage": "存储空间500M"+ }+ },+ "plans": {+ "yearly": {+ "title": "年度会员",+ "bestValue": "最划算",+ "price": "$144",+ "period": "每年",+ "originalPrice": "$300/年",+ "button": "$144/年 省50%",+ "points": "8,400积分",+ "description": "最多生成16,800张图和8,400个视频",+ "features": {+ "dailyPoints": "每天赠送积分",+ "contentReview": "内容安全审核",+ "multiModel": "多模型一站式支持",+ "textToVideo": "文字转视频,图文转视频",+ "aiGeneration": "AI动画生成,AI图像生成",+ "noWatermark": "无水印输出,更快的生成速度",+ "storage": "存储空间5G"+ }+ },+ "monthly": {+ "title": "月度会员",+ "price": "$228",+ "period": "每年",+ "originalPrice": "$25/月",+ "button": "$19/月 省25%",+ "points": "8,400积分",+ "description": "最多生成16,800张图和8,400个视频"+ },+ "once": {+ "title": "一次性月度会员",+ "price": "$25",+ "period": "每月",+ "button": "$25/月",+ "points": "700积分",+ "description": "最多生成1400张图和700个视频",+ "storage": "存储空间3G"+ }+ },+ "trial": "7天免费试用",+ "cancelAnytime": "包年可随时取消",+ "cancelMonthly": "包月可随时取消"+ },+ "points": {+ "title": "积分详情",+ "current": "当前积分",+ "remaining": "剩余积分",+ "subscribed": "订阅积分",+ "recharged": "充值积分",+ "gifted": "赠送积分",+ "validity": "积分有效期",+ "tabs": {+ "all": "全部",+ "spend": "消耗",+ "earn": "获得"+ },+ "noData": "没有内容了",+ "disclaimer": "仅展示近1个月明细,数据更新可能有延时 积分规则",+ "recordChange": "积分变动",+ "recordTypes": {+ "recharge": "充值",+ "consume": "消耗",+ "gift": "赠送",+ "refund": "退款",+ "expire": "过期",+ "adjust": "调整"+ }+ },+ "recharge": {+ "title": "购买积分",+ "current": "当前积分",+ "price": "每1000积分售价15美元",+ "amount": "购买积分",+ "total": "总价",+ "buyNow": "立即购买",+ "range": "1K-50K",+ "unit": "积分"}}\ No newline at end of filediff --git a/aitoearn_web/aitoearn-web/src/app/layout/LyaoutHeader.tsx b/aitoearn_web/aitoearn-web/src/app/layout/LyaoutHeader.tsxindex 336f7b02..354d059f 100644--- a/aitoearn_web/aitoearn-web/src/app/layout/LyaoutHeader.tsx+++ b/aitoearn_web/aitoearn-web/src/app/layout/LyaoutHeader.tsx@@ -7,19 +7,22 @@ import Link from "next/link";import Image from "next/image";import LayoutNav from "@/app/layout/layoutNav";import { NoSSR } from "@kwooshung/react-no-ssr";-import { Button, Dropdown, MenuProps, Badge } from "antd";+import { Button, Dropdown, MenuProps, Badge, Tooltip } from "antd";import logo from "@/assets/images/logo.png";-import defaultAvatar from "./images/defaultAvatar.jpg";import {BellOutlined,CaretDownOutlined,GlobalOutlined,+ CrownOutlined,+ InfoCircleOutlined,} from "@ant-design/icons";import { useRouter } from "next/navigation";import { useTransClient } from "@/app/i18n/client";import NotificationPanel from "@/components/notification/NotificationPanel";import { useNotification } from "@/hooks/useNotification";-import SignInCalendar from "@/components/SignInCalendar";+import SignInCalendar from "@/components/SignInCalendar";+import VipContentModal from "@/components/modals/VipContentModal";+import PointsDetailModal from "@/components/modals/PointsDetailModal";export interface ILyaoutHeaderRef {}@@ -125,10 +128,11 @@ function UserInfo() {<div className={styles["layoutHeader-userinfo"]}><ImageclassName={styles["layoutHeader-userinfo-avatar"]}- src={userInfo?.avatar || defaultAvatar}+ src={userInfo?.avatar || logo}alt={t("profile")}width={35}height={35}+ style={{ borderRadius: '50%', backgroundColor: '#e9d5ff', padding: '3px' }}/><div className={styles["layoutHeader-userinfo-name"]}>{userInfo.name || t("unknownUser")}@@ -147,6 +151,8 @@ const LyaoutHeader = memo(const router = useRouter();const { t } = useTransClient("common");const [notificationVisible, setNotificationVisible] = useState(false);+ const [vipModalVisible, setVipModalVisible] = useState(false);+ const [pointsModalVisible, setPointsModalVisible] = useState(false);const { unreadCount } = useNotification();const toggleLanguage = () => {@@ -186,6 +192,35 @@ const LyaoutHeader = memo({userStore.token && (<SignInCalendar className={styles.signInCalendarButton} />)}+ {/* 未开通 VIP 时显示图标,点击打开 VIP 弹窗 */}+ {userStore.token && (+ <Tooltip title={t("vip" as any) || "VIP"}>+ <Button+ type="text"+ icon={<CrownOutlined />}+ onClick={() => setVipModalVisible(true)}+ style={{ position: 'relative' }}+ >+ {!userStore.userInfo?.vipInfo && <span style={{+ position: 'absolute',+ top: '-2px',+ right: '-11px',+ background: '#ff4d4f',+ color: 'white',+ fontSize: '8px',+ fontWeight: 'bold',+ padding: '1px 4px',+ borderRadius: '8px',+ lineHeight: '10px',+ minWidth: '16px',+ textAlign: 'center'+ }}>+ HOT+ </span>}+ </Button>+ </Tooltip>+ )}+ {/* 通知 */}{userStore.token && (<Badge count={unreadCount} size="small"><Button@@ -217,6 +252,10 @@ const LyaoutHeader = memo(visible={notificationVisible}onClose={() => setNotificationVisible(false)}/>+ {/* VIP 弹窗 */}+ <VipContentModal open={vipModalVisible} onClose={() => setVipModalVisible(false)} />+ {/* 积分详情弹窗 */}+ <PointsDetailModal open={pointsModalVisible} onClose={() => setPointsModalVisible(false)} /></>);}),diff --git a/aitoearn_web/aitoearn-web/src/app/layout/Providers.tsx b/aitoearn_web/aitoearn-web/src/app/layout/Providers.tsxindex b57b556e..0509a6a5 100644--- a/aitoearn_web/aitoearn-web/src/app/layout/Providers.tsx+++ b/aitoearn_web/aitoearn-web/src/app/layout/Providers.tsx@@ -3,7 +3,7 @@import { GoogleOAuthProvider } from "@react-oauth/google";import { ConfigProvider, App, notification } from "antd";import { AntdRegistry } from "@ant-design/nextjs-registry";-import { Suspense, useEffect, useMemo } from "react";+import { Suspense, useEffect } from "react";import type { Locale } from "antd/es/locale";import zh_CN from "antd/es/locale/zh_CN";import en_US from "antd/es/locale/en_US";@@ -36,20 +36,23 @@ export function Providers({top: 74,});+ useEffect(() => {+ if (useUserStore.getState().token) {+ useUserStore.getState().getUserInfo();+ useAccountStore.getState().accountInit();+ }+ }, []);+useEffect(() => {useCommontStore.getState().setNotification(api);}, [api]);- if (useUserStore.getState().token) {- useAccountStore.getState().accountInit();- }-useEffect(() => {useUserStore.getState().setLang(lng);}, [lng]);return (- <GoogleOAuthProvider clientId="1094109734611-flskoscgp609mecqk9ablvc6i3205vqk.apps.googleusercontent.com">+ <GoogleOAuthProvider clientId="1094109734611-flskoscgp609mecqk9ablvc6i3205vqk.apps.googleusercontent.com"><ConfigProviderlocale={getAntdLang(lng)}theme={{diff --git a/aitoearn_web/aitoearn-web/src/app/layout/routerData.ts b/aitoearn_web/aitoearn-web/src/app/layout/routerData.tsindex b8aefafa..7e84d8f1 100644--- a/aitoearn_web/aitoearn-web/src/app/layout/routerData.ts+++ b/aitoearn_web/aitoearn-web/src/app/layout/routerData.ts@@ -1,6 +1,7 @@import { StaticImageData } from "next/image";import { MenuItemType } from "antd/es/menu/interface";import { directTrans } from "@/app/i18n/client";+import { useUserStore } from "@/store/user";export interface IRouterDataItem {// 导航标题@@ -45,7 +46,7 @@ export const routerData: IRouterDataItem[] = [},{name: "互动数据",- translationKey: "Engage",+ translationKey: "interactive",path: "/interactive",},{@@ -53,6 +54,11 @@ export const routerData: IRouterDataItem[] = [translationKey: "dataStatistics",path: "/dataStatistics",},+ {+ name: "Chat",+ translationKey: "Chat",+ path: "/appChat",+ },];const recursion = (@@ -70,8 +76,17 @@ const recursion = (export const peRouterData = recursion(routerData);+/**+ * 首页头部导航数据(根据语言动态生成)+ * - 英文语言跳转英文下载页:https://docs.aitoearn.ai/en/downloads+ * - 中文语言跳转中文下载页:https://docs.aitoearn.ai/zh/downloads+ */export const homeHeaderRouterData = {get value() {+ const lang = useUserStore.getState().lang;+ const downloadHref = lang === "en"+ ? "https://docs.aitoearn.ai/en/downloads"+ : "https://docs.aitoearn.ai/zh/downloads";return [{href: "/",@@ -94,7 +109,7 @@ export const homeHeaderRouterData = {title: directTrans("home", "header.nav.blog"),},{- href: "https://docs.aitoearn.ai/zh/downloads",+ href: downloadHref,title: directTrans("home", "header.nav.download"),},{diff --git a/aitoearn_web/aitoearn-web/src/assets/images/plusvip.png b/aitoearn_web/aitoearn-web/src/assets/images/plusvip.pngnew file mode 100644index 00000000..9e3333c6Binary files /dev/null and b/aitoearn_web/aitoearn-web/src/assets/images/plusvip.png differdiff --git a/aitoearn_web/aitoearn-web/src/assets/svgs/plat/linkedin.png b/aitoearn_web/aitoearn-web/src/assets/svgs/plat/linkedin.pngnew file mode 100644index 00000000..6855d8b4Binary files /dev/null and b/aitoearn_web/aitoearn-web/src/assets/svgs/plat/linkedin.png differdiff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/index.tsx b/aitoearn_web/aitoearn-web/src/components/PublishDialog/index.tsxindex 9bf8ae57..3699ee60 100644--- a/aitoearn_web/aitoearn-web/src/components/PublishDialog/index.tsx+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/index.tsx@@ -40,6 +40,7 @@ import { useTransClient } from "@/app/i18n/client";import { apiGetMaterialGroupList, apiGetMaterialList } from "@/api/material";import { getMediaGroupList, getMediaList } from "@/api/media";import { getOssUrl } from "@/utils/oss";+import { toolsApi } from "@/api/tools";export interface IPublishDialogRef {// 设置发布时间@@ -109,8 +110,84 @@ const PublishDialog = memo();const { errParamsMap } = usePubParamsVerify(pubListChoosed);const [createLoading, setCreateLoading] = useState(false);+ // 内容安全检测状态+ const [moderationLoading, setModerationLoading] = useState(false);+ const [moderationResult, setModerationResult] = useState<boolean | null>(null);+ const [moderationDesc, setModerationDesc] = useState<string>("");const { t } = useTransClient("publish");+ // 内容安全检测函数+ const handleContentModeration = useCallback(async () => {+ // 获取当前描述内容+ let contentToCheck = "";+ if (step === 0 && pubListChoosed.length >= 2) {+ contentToCheck = commonPubParams.des || "";+ } else if (step === 1 && expandedPubItem) {+ contentToCheck = expandedPubItem.params.des || "";+ } else if (pubListChoosed.length === 1) {+ contentToCheck = pubListChoosed[0].params.des || "";+ }++ if (!contentToCheck.trim()) {+ message.warning("请先输入内容");+ return;+ }++ try {+ setModerationLoading(true);+ setModerationResult(null);+ setModerationDesc("");+ const result = await toolsApi.textModeration(contentToCheck);+ console.log("result",result);++ if (result?.code === 0) {+ const data: any = result?.data || {} as any;+ const descriptions: string = (data && (data.descriptions as string)) || "";+ const labels: string = (data && (data.labels as string)) || "";+ const reason: string = (data && (data.reason as string)) || "";+ const isSafe = !descriptions && !labels && !reason;+ setModerationResult(isSafe);+ setModerationDesc(isSafe ? "" : (descriptions || reason || "内容不安全"));+ if (isSafe) {+ message.success("内容安全");+ } else {+ message.error("内容不安全");+ }+ }+ } catch (error) {+ console.error("内容安全检测失败:", error);+ message.error("内容安全检测失败,请稍后重试");+ } finally {+ setModerationLoading(false);+ }+ }, [step, pubListChoosed, commonPubParams, expandedPubItem, t]);++ // 检查是否有描述内容+ const hasDescription = useMemo(() => {+ if (step === 0 && pubListChoosed.length >= 2) {+ return !!(commonPubParams.des && commonPubParams.des.trim());+ } else if (step === 1 && expandedPubItem) {+ return !!(expandedPubItem.params.des && expandedPubItem.params.des.trim());+ } else if (pubListChoosed.length === 1) {+ return !!(pubListChoosed[0].params.des && pubListChoosed[0].params.des.trim());+ }+ return false;+ }, [step, pubListChoosed, commonPubParams, expandedPubItem]);++ // 监听内容变化,重置内容安全检测状态+ useEffect(() => {+ setModerationResult(null);+ setModerationDesc("");+ }, [commonPubParams.des, expandedPubItem?.params.des, pubListChoosed.map(item => item.params.des).join(',')]);++ // 当内容被清空时,也重置检测状态+ useEffect(() => {+ if (!hasDescription) {+ setModerationResult(null);+ setModerationDesc("");+ }+ }, [hasDescription]);+// 草稿选择弹窗/数据const [draftModalOpen, setDraftModalOpen] = useState(false);const [groupLoading, setGroupLoading] = useState(false);@@ -259,6 +336,25 @@ const PublishDialog = memo(}}, [accounts, open]);+ // 离线账号(status === 0)不可参与发布:如被默认选中则自动移除+ useEffect(() => {+ const filtered = pubListChoosed.filter((item) => item.account.status !== 0);+ if (filtered.length !== pubListChoosed.length) {+ setPubListChoosed(filtered);+ }+ }, [pubListChoosed, setPubListChoosed]);++ // 过滤PC端不支持的平台账户:如被默认选中则自动移除+ useEffect(() => {+ const filtered = pubListChoosed.filter((item) => {+ const plat = AccountPlatInfoMap.get(item.account.type);+ return !(plat && plat.pcNoThis === true);+ });+ if (filtered.length !== pubListChoosed.length) {+ setPubListChoosed(filtered);+ }+ }, [pubListChoosed, setPubListChoosed]);+// 关闭弹框并确认关闭const closeDialog = useCallback(() => {confirm({@@ -394,7 +490,7 @@ const PublishDialog = memo(: PubType.ImageText,title: item.params.title || "",desc: item.params.des,- accountId: item.account.account,+ accountId: item.account.id,accountType: item.account.type,videoUrl: item.params.video?.ossUrl,coverUrl:@@ -481,13 +577,19 @@ const PublishDialog = memo(</div></div><div className="publishDialog-con-acconts">- {pubList.map((pubItem) => {+ {pubList+ .filter((pubItem) => {+ const plat = AccountPlatInfoMap.get(pubItem.account.type);+ return !(plat && plat.pcNoThis === true);+ })+ .map((pubItem) => {const platConfig = AccountPlatInfoMap.get(pubItem.account.type,)!;const isChoosed = pubListChoosed.find((v) => v.account.id === pubItem.account.id,);+ const isOffline = pubItem.account.status === 0;return (<div@@ -505,6 +607,10 @@ const PublishDialog = memo(key={pubItem.account.id}onClick={(e) => {e.stopPropagation();+ if (isOffline) {+ message.warning("该账号已离线,无法发布");+ return;+ }const newPubListChoosed = [...pubListChoosed];// 查找当前账户是否已被选择const index = newPubListChoosed.findIndex(@@ -545,12 +651,34 @@ const PublishDialog = memo(setPubListChoosed(newPubListChoosed);}}>- <AvatarPlat- className={`publishDialog-con-acconts-item-avatar ${!isChoosed ? 'disabled' : ''}`}- account={pubItem.account}- size="large"- disabled={!isChoosed}- />+ {/* 账号头像:离线显示遮罩并禁用 */}+ <div style={{ position: "relative" }}>+ <AvatarPlat+ className={`publishDialog-con-acconts-item-avatar ${!isChoosed || isOffline ? 'disabled' : ''}`}+ account={pubItem.account}+ size="large"+ disabled={isOffline || !isChoosed}+ />+ {isOffline && (+ <div+ style={{+ position: "absolute",+ inset: 0,+ background: "rgba(0,0,0,0.45)",+ borderRadius: "50%",+ display: "flex",+ alignItems: "center",+ justifyContent: "center",+ color: "#fff",+ fontSize: 12,+ fontWeight: 600,+ pointerEvents: "none",+ }}+ >+ 已离线+ </div>+ )}+ </div></div>);})}@@ -607,7 +735,7 @@ const PublishDialog = memo(><PublishDialogDataPicker />- <div className="publishDialog-footer-btns">+ <div className="publishDialog-footer-btns" style={{ display: 'flex', flexDirection: 'row', gap: 12 }}>{step === 0 && pubListChoosed.length >= 2 ? (<Buttonsize="large"@@ -621,31 +749,66 @@ const PublishDialog = memo(</Button>) : (<>- <Button size="large" onClick={closeDialog}>- {t("buttons.cancelPublish")}- </Button>- <Button- size="large"- type="primary"- loading={createLoading}- onClick={() => {- for (const [key, errVideoItem] of errParamsMap) {- if (errVideoItem) {- const pubItem = pubListChoosed.find(- (v) => v.account.id === key,- )!;- if (step === 1) {- setExpandedPubItem(pubItem);+ <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>+ {moderationResult !== null && (+ <div style={{ display: 'flex', flexDirection: 'column' }}>+ <span style={{+ fontSize: 14,+ color: moderationResult ? '#52c41a' : '#ff4d4f',+ fontWeight: 500,+ }}>+ {moderationResult ? "内容安全" : "内容不安全"}+ </span>+ {!moderationResult && !!moderationDesc && (+ <span style={{ fontSize: 12, color: '#ff4d4f', maxWidth: 360, whiteSpace: 'pre-wrap' }}>{moderationDesc}</span>+ )}+ </div>+ )}++ {hasDescription && (+ <Button+ size="large"+ loading={moderationLoading}+ onClick={handleContentModeration}+ type={moderationResult === true ? "primary" : moderationResult === false ? "default" : "default"}+ style={{+ backgroundColor: moderationResult === true ? '#52c41a' : moderationResult === false ? '#ff4d4f' : undefined,+ borderColor: moderationResult === true ? '#52c41a' : moderationResult === false ? '#ff4d4f' : undefined,+ color: moderationResult === true || moderationResult === false ? '#fff' : undefined+ }}+ >+ {moderationLoading ? "检测中..." : "内容安全检测"}+ </Button>+ )}++ </div>+ <div style={{ display: 'flex', gap: 12 }}>+ <Button size="large" onClick={closeDialog}>+ {t("buttons.cancelPublish")}+ </Button>+ <Button+ size="large"+ type="primary"+ loading={createLoading}+ onClick={() => {+ for (const [key, errVideoItem] of errParamsMap) {+ if (errVideoItem) {+ const pubItem = pubListChoosed.find(+ (v) => v.account.id === key,+ )!;+ if (step === 1) {+ setExpandedPubItem(pubItem);+ }+ message.warning(errVideoItem.parErrMsg);+ return;}- message.warning(errVideoItem.parErrMsg);- return;}- }- pubClick();- }}- >- {t("buttons.schedulePublish")}- </Button>+ pubClick();+ }}+ >+ {t("buttons.schedulePublish")}+ </Button>+ </div></>)}</div>diff --git a/aitoearn_web/aitoearn-web/src/components/SignInCalendar/index.tsx b/aitoearn_web/aitoearn-web/src/components/SignInCalendar/index.tsxindex 976b2748..375def80 100644--- a/aitoearn_web/aitoearn-web/src/components/SignInCalendar/index.tsx+++ b/aitoearn_web/aitoearn-web/src/components/SignInCalendar/index.tsx@@ -7,7 +7,7 @@ import { useTransClient } from '@/app/i18n/client';import { signInApi, SignInType, SignInResponse, PublishDayInfoResponse, PublishInfoResponse } from '@/api/signIn';import { useUserStore } from '@/store/user';import { useRouter } from 'next/navigation';-import styles from './SignInCalendar.module.scss';+import styles from './SignInCalendar.module.scss';interface SignInCalendarProps {className?: string;diff --git a/aitoearn_web/aitoearn-web/src/components/common/DownloadAppModal.tsx b/aitoearn_web/aitoearn-web/src/components/common/DownloadAppModal.tsxindex 4c99cf64..dc0ffb28 100644--- a/aitoearn_web/aitoearn-web/src/components/common/DownloadAppModal.tsx+++ b/aitoearn_web/aitoearn-web/src/components/common/DownloadAppModal.tsx@@ -2,7 +2,7 @@ import React, { useState } from 'react';import { Modal, Button, Space, Typography, message } from 'antd';import { DownloadOutlined, QrcodeOutlined, CopyOutlined, CheckOutlined } from '@ant-design/icons';import { useTransClient } from '@/app/i18n/client';-import { MAIN_APP_DOWNLOAD_URL } from '@/app/config/appDownloadConfig';+import { MAIN_APP_DOWNLOAD_URL, getMainAppDownloadUrl } from '@/app/config/appDownloadConfig';import logo from '@/assets/images/logo.png';import { QRCode } from 'react-qrcode-logo';@@ -35,12 +35,12 @@ const DownloadAppModal: React.FC<DownloadAppModalProps> = ({const [copySuccess, setCopySuccess] = useState(false);const handleDownload = () => {- const linkToOpen = downloadUrl || MAIN_APP_DOWNLOAD_URL;+ const linkToOpen = downloadUrl || getMainAppDownloadUrl();window.open(linkToOpen, '_blank');};const handleCopyLink = async () => {- const linkToCopy = downloadUrl || MAIN_APP_DOWNLOAD_URL;+ const linkToCopy = downloadUrl || getMainAppDownloadUrl();try {await navigator.clipboard.writeText(linkToCopy);setCopySuccess(true);@@ -116,7 +116,7 @@ const DownloadAppModal: React.FC<DownloadAppModalProps> = ({/>) : (<QRCode- value={downloadUrl || MAIN_APP_DOWNLOAD_URL}+ value={downloadUrl || getMainAppDownloadUrl()}size={120}logoImage={logo.src}logoWidth={30}@@ -155,7 +155,7 @@ const DownloadAppModal: React.FC<DownloadAppModalProps> = ({textAlign: 'left'}}>- {downloadUrl || MAIN_APP_DOWNLOAD_URL}+ {downloadUrl || getMainAppDownloadUrl()}</Text><Buttonsize="small"diff --git a/aitoearn_web/aitoearn-web/src/components/modals/PointsDetailModal.tsx b/aitoearn_web/aitoearn-web/src/components/modals/PointsDetailModal.tsxnew file mode 100644index 00000000..68cf1659--- /dev/null+++ b/aitoearn_web/aitoearn-web/src/components/modals/PointsDetailModal.tsx@@ -0,0 +1,176 @@+"use client";++import { memo, useEffect, useState } from "react";+import { Modal, Tabs, Spin, Popover } from "antd";+import { InfoCircleOutlined } from "@ant-design/icons";+import { useTransClient } from "@/app/i18n/client";+import styles from "./outsideCloseModal.module.css";+import { getPointsRecordsApi } from "@/api/apiReq";+import { useUserStore } from "@/store/user";++interface PointsDetailModalProps {+ open: boolean;+ onClose: () => void;+}++type PointsRecord = {+ _id: string;+ amount: number; // 正数获得 负数消耗+ type?: string;+ description?: string;+ createdAt: string | Date;+};++const PointsDetailModal = memo(({ open, onClose }: PointsDetailModalProps) => {+ const [loading, setLoading] = useState(false);+ const [records, setRecords] = useState<PointsRecord[]>([]);+ const [activeKey, setActiveKey] = useState<string>('all');+ const { userInfo } = useUserStore();+ const { t } = useTransClient('vip');++ // 辅助函数处理翻译+ const translate = (key: string) => t(key as any);++ const fetchRecords = async () => {+ setLoading(true);+ try {+ const res: any = await getPointsRecordsApi({ page: 1, pageSize: 50 });+ const list = res?.data?.list || [];+ setRecords(list);+ } finally {+ setLoading(false);+ }+ };++ useEffect(() => {+ if (open) fetchRecords();+ }, [open]);++ const filtered = records.filter((r) => {+ if (activeKey === 'all') return true;+ if (activeKey === 'spend') return r.amount < 0;+ if (activeKey === 'earn') return r.amount > 0;+ return true;+ });++ // 剩余积分以用户信息中的 score 为准+ const remain = Math.floor((userInfo?.score as number) || 0);+ const subscribed = 0;+ const recharged = records.filter(r => r.amount > 0 && (r as any).source === 'recharge').reduce((s, r) => s + r.amount, 0);+ const gifted = records.filter(r => r.amount > 0 && (r as any).source === 'gift').reduce((s, r) => s + r.amount, 0);++ const endOfToday = (() => {+ const d = new Date();+ d.setHours(23, 59, 0, 0);+ return d.toLocaleString();+ })();++ return (+ <Modal+ title={null}+ open={open}+ onCancel={onClose}+ footer={null}+ width={980}+ className={styles.outsideCloseModal}+ destroyOnClose+ centered+ >+ <div style={{ background: '#fff', borderRadius: 12 }}>+ {/* 头部汇总 */}+ <div style={{ padding: '16px 20px 0 20px' }}>+ <h3 style={{ margin: 0, fontSize: 18, fontWeight: 700, color: '#0f172a' }}>{translate('points.title')}</h3>+ <div style={{ display: 'flex', alignItems: 'center', gap: 12, marginTop: 16, color: '#111827', flexWrap: 'wrap' }}>+ <div style={{ display: 'flex', alignItems: 'flex-start', gap: 8, flex: 1, justifyContent: 'center', flexDirection:'column' }}>+ <div style={{ fontSize: 12, color: '#6b7280' }}>{translate('points.remaining')}</div>+ <div style={{ fontWeight: 700 }}>{remain}</div>+ </div>+ <div style={{ color: '#6b7280' }}>=</div>+ <div style={{ display: 'flex', alignItems: 'center', gap: 8, flex: 1, justifyContent: 'center' , flexDirection:'column'}}>+ <div style={{ fontSize: 12, color: '#6b7280' }}>{translate('points.subscribed')}</div>+ <div style={{ fontWeight: 700 }}>{subscribed}</div>+ </div>+ <div style={{ color: '#6b7280' }}>+</div>+ <div style={{ display: 'flex', alignItems: 'center', gap: 8, flex: 1, justifyContent: 'center' , flexDirection:'column'}}>+ <div style={{ fontSize: 12, color: '#6b7280' }}>{translate('points.recharged')}</div>+ <div style={{ fontWeight: 700 }}>{recharged}</div>+ </div>+ <div style={{ color: '#6b7280' }}>+</div>+ <div style={{ display: 'flex', alignItems: 'flex-end', gap: 6, flex: 1 , justifyContent: 'flex-end', flexDirection:'column'}}>+ <div style={{ fontSize: 12, color: '#6b7280' }}>{translate('points.gifted')}</div>+ <div style={{ fontWeight: 700 }}>{gifted } + <Popover+ trigger="hover"+ placement="bottomRight"+ content={+ <div style={{ padding: 8 }}>+ <div style={{ border: '1px solid #eef2f7', borderRadius: 10, padding: 12, minWidth: 260 }}>+ <div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 8 }}>+ <span style={{ color: '#6b7280' }}>{translate('points.remaining')}</span>+ <span style={{ fontWeight: 700 }}>{remain}</span>+ </div>+ <div style={{ display: 'flex', justifyContent: 'space-between' }}>+ <span style={{ color: '#6b7280' }}>{translate('points.validity')}</span>+ <span style={{ fontWeight: 700 }}>{endOfToday}</span>+ </div>+ </div>+ </div>+ }+ >+ <InfoCircleOutlined style={{ color: '#9ca3af' }} />+ </Popover>+ </div>++ </div>+ </div>+ </div>++ {/* Tabs */}+ <div style={{ padding: '12px 16px 0 16px' }}>+ <Tabs+ items={[+ { key: 'all', label: translate('points.tabs.all') },+ { key: 'spend', label: translate('points.tabs.spend') },+ { key: 'earn', label: translate('points.tabs.earn') },+ ]}+ activeKey={activeKey}+ onChange={setActiveKey}+ />+ </div>++ {/* 列表 */}+ <div style={{ padding: '0 20px 16px 20px', minHeight: 360, maxHeight: '60vh', overflowY: 'auto' }}>+ <Spin spinning={loading}>+ {filtered.length === 0 ? (+ <div style={{ textAlign: 'center', padding: '60px 0', color: '#9ca3af' }}>{translate('points.noData')}</div>+ ) : (+ <div style={{ display: 'grid', gap: 12 }}>+ {filtered.map((r) => (+ <div key={r._id} style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px 14px', border: '1px solid #eef2f7', borderRadius: 10 }}>+ <div>+ <div style={{ fontWeight: 600, color: '#111827' }}>+ {translate('points.recordChange')} - {r.type ? translate(`points.recordTypes.${r.type}`) : translate('points.recordChange')}+ </div>+ <div style={{ fontSize: 12, color: '#6b7280', marginTop: 4 }}>{new Date(r.createdAt).toLocaleString()}</div>+ </div>+ <div style={{ fontWeight: 700, color: r.amount >= 0 ? '#10b981' : '#ef4444' }}>+ {r.amount >= 0 ? `+${r.amount}` : r.amount}+ </div>+ </div>+ ))}+ </div>+ )}+ </Spin>+ </div>++ <div style={{ padding: '8px 20px 16px 20px', color: '#9ca3af', fontSize: 12 }}>+ {translate('points.disclaimer')}+ </div>+ </div>+ </Modal>+ );+});++export default PointsDetailModal;++diff --git a/aitoearn_web/aitoearn-web/src/components/modals/PointsRechargeModal.tsx b/aitoearn_web/aitoearn-web/src/components/modals/PointsRechargeModal.tsxnew file mode 100644index 00000000..cdbddef1--- /dev/null+++ b/aitoearn_web/aitoearn-web/src/components/modals/PointsRechargeModal.tsx@@ -0,0 +1,172 @@+"use client";++import { memo, useEffect, useMemo, useRef, useState } from "react";+import { Modal, Button, InputNumber, Typography, Space, message } from "antd";+import { useTransClient } from "@/app/i18n/client";+import styles from "./outsideCloseModal.module.css";+import { createPaymentOrderApi, PaymentType } from "@/api/vip";+import { useUserStore } from "@/store/user";++interface PointsRechargeModalProps {+ open: boolean;+ onClose: () => void;+}++const PointsRechargeModal = memo(({ open, onClose }: PointsRechargeModalProps) => {+ const [rechargeAmount, setRechargeAmount] = useState<number>(8);+ const [buyLoading, setBuyLoading] = useState(false);+ const userStore = useUserStore();+ const { t } = useTransClient('vip');+ const modalWidth = useMemo(() => 520, []);+ const sliderTrackRef = useRef<HTMLDivElement | null>(null);+ const [dragging, setDragging] = useState(false);++ // 辅助函数处理翻译+ const translate = (key: string) => t(key as any);++ const amountToPercent = (amount: number) => ((amount - 1) / 49) * 100; // 1..50+ const percentToAmount = (percent: number) => {+ const clamped = Math.max(0, Math.min(100, percent));+ const val = 1 + Math.round((clamped / 100) * 49);+ return val;+ };++ const handleSliderClick = (e: React.MouseEvent<HTMLDivElement>) => {+ const rect = (e.currentTarget as HTMLDivElement).getBoundingClientRect();+ const percent = ((e.clientX - rect.left) / rect.width) * 100;+ setRechargeAmount(percentToAmount(percent));+ };++ const onMouseDownHandle = (e: React.MouseEvent<HTMLDivElement>) => {+ e.stopPropagation();+ setDragging(true);+ };++ useEffect(() => {+ const onMove = (e: MouseEvent) => {+ if (!dragging || !sliderTrackRef.current) return;+ const rect = sliderTrackRef.current.getBoundingClientRect();+ const percent = ((e.clientX - rect.left) / rect.width) * 100;+ setRechargeAmount(percentToAmount(percent));+ };+ const onUp = () => setDragging(false);+ if (dragging) {+ document.addEventListener('mousemove', onMove);+ document.addEventListener('mouseup', onUp);+ }+ return () => {+ document.removeEventListener('mousemove', onMove);+ document.removeEventListener('mouseup', onUp);+ };+ }, [dragging]);++ return (+ <Modal+ title={<span style={{fontWeight:700}}>{translate('recharge.title')}</span>}+ open={open}+ onCancel={onClose}+ footer={null}+ width={modalWidth}+ centered+ className={styles.outsideCloseModal}+ destroyOnClose+ >+ <Space direction="vertical" size={16} style={{width:'100%'}}>+ <div style={{display:'flex', justifyContent:'space-between', alignItems:'center', marginTop:18}}>+ <span style={{color:'#6b7280'}}>{translate('recharge.current')}</span>+ <span style={{fontWeight:700}}>{Math.floor(userStore.userInfo?.score || 0)}</span>+ </div>+ <div>+ <Typography.Text type="secondary">{translate('recharge.price')}</Typography.Text>+ {/* Slider */}+ <div style={{ marginTop: 12 }}>+ <div+ ref={sliderTrackRef}+ onClick={handleSliderClick}+ style={{+ position: 'relative',+ height: 8,+ background: '#e5e7eb',+ borderRadius: 6,+ cursor: 'pointer'+ }}+ >+ <div+ style={{+ position: 'absolute',+ left: 0,+ top: 0,+ height: '100%',+ width: `${amountToPercent(rechargeAmount)}%`,+ background: '#a66ae4',+ borderRadius: 6+ }}+ />+ <div+ onMouseDown={onMouseDownHandle}+ style={{+ position: 'absolute',+ top: '50%',+ left: `calc(${amountToPercent(rechargeAmount)}% - 10px)`,+ width: 20,+ height: 20,+ background: '#ffffff',+ border: '2px solid #a66ae4',+ borderRadius: '50%',+ transform: 'translateY(-50%)',+ boxShadow: '0 1px 4px rgba(0,0,0,0.15)',+ cursor: 'grab'+ }}+ />+ </div>+ <div style={{ display:'flex', justifyContent:'space-between', fontSize:12, color:'#6b7280', marginTop:6 }}>+ <span>{translate('recharge.range').split('-')[0]}</span>+ <span>{translate('recharge.range').split('-')[1]}</span>+ </div>+ </div>+ <div style={{marginTop:28, display:'flex', alignItems:'center', gap:12}}>+ <InputNumber min={1} max={50} value={rechargeAmount} onChange={(v) => setRechargeAmount(Number(v) || 1)} />+ <span>* 1000 {translate('recharge.unit')}</span>+ </div>+ </div>+ <div style={{display:'flex', justifyContent:'space-between'}}>+ <span>{translate('recharge.amount')}</span>+ <span style={{fontWeight:700}}>{rechargeAmount * 1000}</span>+ </div>+ <div style={{display:'flex', justifyContent:'space-between'}}>+ <span>{translate('recharge.total')}</span>+ <span style={{fontWeight:700}}>${(rechargeAmount * 15).toFixed(2)}</span>+ </div>+ <Button type="primary" block loading={buyLoading} onClick={async () => {+ try {+ setBuyLoading(true);+ if (!userStore.userInfo?.id) {+ message.error(translate('pleaseLoginFirst'));+ return;+ }+ const res: any = await createPaymentOrderApi({+ mode: 'payment',+ payment: PaymentType.POINTS,+ metadata: { userId: userStore.userInfo.id },+ quantity: rechargeAmount,+ success_url: userStore.lang === 'zh-CN' ? '/zh-CN/profile' : '/en/profile'+ });+ if (res?.code === 0 && res.data?.url) {+ window.open(res.data.url, '_blank');+ } else {+ message.error(res?.message || res?.msg || translate('createPaymentOrderFailed'));+ }+ } catch (e) {+ message.error(translate('createPaymentOrderError'));+ } finally {+ setBuyLoading(false);+ }+ }}>{translate('recharge.buyNow')}</Button>+ </Space>+ </Modal>+ );+});++export default PointsRechargeModal;++diff --git a/aitoearn_web/aitoearn-web/src/components/modals/VipContentModal.tsx b/aitoearn_web/aitoearn-web/src/components/modals/VipContentModal.tsxnew file mode 100644index 00000000..dc2ec8b6--- /dev/null+++ b/aitoearn_web/aitoearn-web/src/components/modals/VipContentModal.tsx@@ -0,0 +1,378 @@+"use client";++import { memo, useMemo, useState, useEffect } from "react";+import { Modal, Button, Tag, message } from "antd";+import { useRouter } from "next/navigation";+import { createPaymentOrderApi, PaymentType } from "@/api/vip";+import { useTransClient } from "@/app/i18n/client";+import styles from "./outsideCloseModal.module.css";+import vipStyles from "./vipContentModal.module.css";+import PointsDetailModal from "@/components/modals/PointsDetailModal";+import { useUserStore } from "@/store/user";+import PointsRechargeModal from "@/components/modals/PointsRechargeModal";++interface VipContentModalProps {+ open: boolean;+ onClose: () => void;+}++const VipContentModal = memo(({ open, onClose }: VipContentModalProps) => {+ const [pointsModalVisible, setPointsModalVisible] = useState(false);+ const userStore = useUserStore();+ const router = useRouter();+ const { t } = useTransClient('vip');+ const modalWidth = useMemo(() => "66%" as const, []);+ const [rechargeVisible, setRechargeVisible] = useState(false);+ const [activeTab, setActiveTab] = useState<'year' | 'month' | 'once'>('year');+ const [loading, setLoading] = useState(false);+ const [canUseTrial, setCanUseTrial] = useState(false);++ // 辅助函数处理翻译+ const translate = (key: string) => t(key as any);++ const handleTabClick = (tab: 'year' | 'month' | 'once') => {+ setActiveTab(tab);+ };++ // 检查用户是否可以享受免费试用+ useEffect(() => {+ console.log('userStore.userInfo', userStore);+ if (userStore.userInfo) {+ // 如果用户没有vipInfo,说明从未开过会员,可以享受免费试用+ const hasVipInfo = userStore.userInfo.vipInfo;+ console.log('hasVipInfo', hasVipInfo);+ setCanUseTrial(!hasVipInfo);+ }+ }, [userStore.userInfo]);++ // 开通会员逻辑+ const handleActivate = async (planType: 'year' | 'month' | 'once') => {+ console.log('canUseTrial', canUseTrial);+ try {+ setLoading(true);++ // 检查用户是否已登录+ if (!userStore.userInfo?.id) {+ message.error(t('pleaseLoginFirst'));+ router.push('/login');+ return;+ }++ // 根据选择的计划映射到支付类型+ let paymentType;+ let paymentMethod;+ let flagTrialPeriodDays = 0; // 默认不给免费试用++ switch (planType) {+ case 'once':+ paymentType = PaymentType.ONCE_MONTH;+ paymentMethod = 'payment';+ break;+ case 'month':+ paymentType = PaymentType.MONTH;+ paymentMethod = 'subscription';+ // 如果是订阅模式且用户从未开过会员,给免费试用+ flagTrialPeriodDays = canUseTrial ? 1 : 0;+ break;+ case 'year':+ paymentType = PaymentType.YEAR;+ paymentMethod = 'subscription';+ // 如果是订阅模式且用户从未开过会员,给免费试用+ flagTrialPeriodDays = canUseTrial ? 1 : 0;+ break;+ default:+ paymentType = PaymentType.MONTH;+ paymentMethod = 'subscription';+ flagTrialPeriodDays = canUseTrial ? 1 : 0;+ }++ // 创建支付订单+ const response: any = await createPaymentOrderApi({+ success_url: userStore.lang === 'zh-CN' ? "/zh-CN/profile" : "/en/profile",+ mode: paymentMethod,+ payment: paymentType,+ metadata: {+ userId: userStore.userInfo.id+ }+ });++ if (response?.code === 0) {+ message.success(t('paymentOrderCreated'));+ // 直接跳转到支付页面+ if (response.data?.url) {+ window.open(response.data.url, '_blank');+ } else {+ message.error(t('paymentLinkNotFound'));+ }+ } else {+ message.error(response?.message || response?.msg || t('createPaymentOrderFailed'));+ }+ } catch (error) {+ console.error('Create payment order failed:', error);+ message.error(t('createPaymentOrderError'));+ } finally {+ setLoading(false);+ }+ };+ return (+ <Modal+ title={null}+ open={open}+ onCancel={onClose}+ footer={null}+ width={modalWidth}+ className={styles.outsideCloseModal}+ destroyOnClose+ centered+ >+ <div className={vipStyles.wrapper}>+ {/* 顶部区域 */}+ <div className={vipStyles.header}+ style={{ background: 'transparent' }}>+ <div className={vipStyles.titleBlock}>+ <h2 className={vipStyles.title}>+ {translate('modal.title')} <span className={vipStyles.highlight}>{translate('modal.highlight')}</span>+ </h2>+ <div className={vipStyles.links}>+ <span>{translate('modal.choosePlan')}</span>+ <span className={vipStyles.linkButton}+ onClick={() => setRechargeVisible(true)}+ >{translate('modal.buyPoints')}</span>+ </div>+ </div>+ <div className={vipStyles.headerRight}>+ <Button className={vipStyles.pointsBtn} onClick={() => setPointsModalVisible(true)}>{translate('modal.pointsDetail')}</Button>+ </div>+ </div>++ {/* 顶部选项卡 */}+ <div className={vipStyles.switchRow}>+ <div onClick={() => handleTabClick('year')} className={`${vipStyles.switchBtn} ${activeTab === 'year' ? vipStyles.active : ''}`}>+ {translate('modal.tabs.yearly')} <Tag style={{ marginLeft: 6, border: '1px solid rgba(184,221,255,.08)' }}>{translate('modal.savings.yearly')}</Tag>+ </div>+ <div onClick={() => handleTabClick('month')} className={`${vipStyles.switchBtn} ${activeTab === 'month' ? vipStyles.active : ''}`}>+ {translate('modal.tabs.monthly')} <Tag style={{ marginLeft: 6, border: '1px solid rgba(184,221,255,.08)' }}>{translate('modal.savings.monthly')}</Tag>+ </div>+ <div onClick={() => handleTabClick('once')} className={`${vipStyles.switchBtn} ${activeTab === 'once' ? vipStyles.active : ''}`}>+ {translate('modal.tabs.once')}+ </div>+ </div>++ {/* 价格区域 */}+ <div className={vipStyles.grid}>+++ {activeTab === 'year' && (+ <>++ {/* 左侧免费卡片 */}+ <div className={vipStyles.freeCard}>+ <div className={vipStyles.freeTitle}>{translate('modal.free.title')}</div>+ <div className={vipStyles.freePrice}><span>{translate('modal.free.price')}</span><span className={vipStyles.unit}>{translate('modal.free.period')}</span></div>+ <div className={vipStyles.freeForever}>{translate('modal.free.forever')}</div>+ <Button disabled className={vipStyles.freeBtn}>{translate('modal.free.currentPlan')}</Button>+ <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> {translate('modal.free.points')}</div>+ <ul className={vipStyles.featureList}>+ <li>{translate('modal.free.features.dailyPoints')}</li>+ <li>{translate('modal.free.features.maxPoints')}</li>+ <li>{translate('modal.free.features.videos')}</li>+ <li>{translate('modal.free.features.images')}</li>+ <li>{translate('modal.free.features.storage')}</li>+ </ul>+ </div>++ {/* 高级会员 */}+ <div className={`${vipStyles.planCard} ${vipStyles.premium}`} >+ <div className={vipStyles.planHead}>{translate('modal.plans.yearly.title')} <Tag color="#5b7cff">{translate('modal.plans.yearly.bestValue')}</Tag></div>+ <div className={vipStyles.planPriceLine}><span className={vipStyles.currency}>$</span><span className={vipStyles.bigNum}>{translate('modal.plans.yearly.price')}</span><span className={vipStyles.unit}>{translate('modal.plans.yearly.period')}</span></div>+ <div className={vipStyles.planDesc}>+ {canUseTrial ? translate('modal.trial') : ''} · <span style={{textDecoration: 'line-through'}}>{translate('modal.plans.yearly.originalPrice')}</span> · {translate('modal.cancelAnytime')}</div>+ <Button+ className={vipStyles.primaryBtn}+ onClick={() => handleActivate('year')}+ loading={loading}+ >+ {translate('modal.plans.yearly.button')}+ </Button>+ <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> {translate('modal.plans.yearly.points')}</div>+ <div className={vipStyles.subDesc}>{translate('modal.plans.yearly.description')}</div>+ <ul className={vipStyles.featureList}>+ <li>{translate('modal.plans.yearly.features.dailyPoints')}</li>+ <li>{translate('modal.plans.yearly.features.contentReview')}</li>+ <li>{translate('modal.plans.yearly.features.multiModel')}</li>+ <li>{translate('modal.plans.yearly.features.textToVideo')}</li>+ <li>{translate('modal.plans.yearly.features.aiGeneration')}</li>+ <li>{translate('modal.plans.yearly.features.noWatermark')}</li>+ <li>{translate('modal.plans.yearly.features.storage')}</li>+ </ul>+ </div>+ </>+ )}+++ {activeTab === 'month' && (+ <>+ {/* 左侧免费卡片 */}+ <div className={vipStyles.freeCard}>+ <div className={vipStyles.freeTitle}>{translate('modal.free.title')}</div>+ <div className={vipStyles.freePrice}><span>{translate('modal.free.price')}</span><span className={vipStyles.unit}>{translate('modal.free.period')}</span></div>+ <div className={vipStyles.freeForever}>{translate('modal.free.forever')}</div>+ <Button disabled className={vipStyles.freeBtn}>{translate('modal.free.currentPlan')}</Button>+ <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> {translate('modal.free.points')}</div>+ <ul className={vipStyles.featureList}>+ <li>{translate('modal.free.features.dailyPoints')}</li>+ <li>{translate('modal.free.features.maxPoints')}</li>+ <li>{translate('modal.free.features.videos')}</li>+ <li>{translate('modal.free.features.images')}</li>+ <li>{translate('modal.free.features.storage')}</li>+ </ul>+ </div>++ {/* 月度会员 */}+ <div className={`${vipStyles.planCard} ${vipStyles.premium}`} >+ <div className={vipStyles.planHead}>{translate('modal.plans.monthly.title')} </div>+ <div className={vipStyles.planPriceLine}><span className={vipStyles.currency}>$</span><span className={vipStyles.bigNum}>{translate('modal.plans.monthly.price')}</span><span className={vipStyles.unit}>{translate('modal.plans.monthly.period')}</span></div>+ <div className={vipStyles.planDesc}>+ {canUseTrial ? translate('modal.trial') : ''} · <span style={{textDecoration: 'line-through'}}>{translate('modal.plans.monthly.originalPrice')}</span> · {translate('modal.cancelMonthly')}</div>+ <Button+ className={vipStyles.primaryBtn}+ onClick={() => handleActivate('month')}+ loading={loading}+ >+ {translate('modal.plans.monthly.button')}+ </Button>+ <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> {translate('modal.plans.monthly.points')}</div>+ <div className={vipStyles.subDesc}>{translate('modal.plans.monthly.description')}</div>+ <ul className={vipStyles.featureList}>+ <li>{translate('modal.plans.yearly.features.dailyPoints')}</li>+ <li>{translate('modal.plans.yearly.features.contentReview')}</li>+ <li>{translate('modal.plans.yearly.features.multiModel')}</li>+ <li>{translate('modal.plans.yearly.features.textToVideo')}</li>+ <li>{translate('modal.plans.yearly.features.aiGeneration')}</li>+ <li>{translate('modal.plans.yearly.features.noWatermark')}</li>+ <li>{translate('modal.plans.yearly.features.storage')}</li>+ </ul>+ </div>+ </>+ )}++ {activeTab === 'once' && (+ <>+ {/* 左侧免费卡片 */}+ <div className={vipStyles.freeCard}>+ <div className={vipStyles.freeTitle}>{translate('modal.free.title')}</div>+ <div className={vipStyles.freePrice}><span>{translate('modal.free.price')}</span><span className={vipStyles.unit}>{translate('modal.free.period')}</span></div>+ <div className={vipStyles.freeForever}>{translate('modal.free.forever')}</div>+ <Button disabled className={vipStyles.freeBtn}>{translate('modal.free.currentPlan')}</Button>+ <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> {translate('modal.free.points')}</div>+ <ul className={vipStyles.featureList}>+ <li>{translate('modal.free.features.dailyPoints')}</li>+ <li>{translate('modal.free.features.maxPoints')}</li>+ <li>{translate('modal.free.features.videos')}</li>+ <li>{translate('modal.free.features.images')}</li>+ <li>{translate('modal.free.features.storage')}</li>+ </ul>+ </div>++ {/* 一次性月度会员 */}+ <div className={`${vipStyles.planCard} ${vipStyles.premium}`} >+ <div className={vipStyles.planHead}>{translate('modal.plans.once.title')} </div>+ <div className={vipStyles.planPriceLine}><span className={vipStyles.currency}>$</span><span className={vipStyles.bigNum}>{translate('modal.plans.once.price')}</span><span className={vipStyles.unit}>{translate('modal.plans.once.period')}</span></div>+ <Button+ className={vipStyles.primaryBtn}+ onClick={() => handleActivate('once')}+ loading={loading}+ >+ {translate('modal.plans.once.button')}+ </Button>+ <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> {translate('modal.plans.once.points')}</div>+ <div className={vipStyles.subDesc}>{translate('modal.plans.once.description')}</div>+ <ul className={vipStyles.featureList}>+ <li>{translate('modal.plans.yearly.features.dailyPoints')}</li>+ <li>{translate('modal.plans.yearly.features.contentReview')}</li>+ <li>{translate('modal.plans.yearly.features.multiModel')}</li>+ <li>{translate('modal.plans.yearly.features.textToVideo')}</li>+ <li>{translate('modal.plans.yearly.features.aiGeneration')}</li>+ <li>{translate('modal.plans.yearly.features.noWatermark')}</li>+ <li>{translate('modal.plans.once.storage')}</li>+ </ul>+ </div>+ </>+ )}++ {/* <div className={vipStyles.freeCard}>+ <div className={vipStyles.freeTitle}>免费</div>+ <div className={vipStyles.freePrice}><span>¥</span>0<span className={vipStyles.unit}>每月</span></div>+ <div className={vipStyles.freeForever}>永久</div>+ <Button disabled className={vipStyles.freeBtn}>当前计划</Button>+ <div className={vipStyles.freeItem}>发布赠送积分</div>+ </div>++ <div className={vipStyles.planCard}>+ <div className={vipStyles.planHead}>一次性月度会员</div>+ <div className={vipStyles.planPriceLine}><span className={vipStyles.currency}>¥</span><span className={vipStyles.bigNum}>1</span><span className={vipStyles.unit}>天</span></div>+ <div className={vipStyles.planDesc}>1元试用7天,首年5折¥329 · 次年¥659自动续费</div>+ <Button className={vipStyles.primaryBtn}>¥1 试用7天</Button>+ <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> 1,080积分每月</div>+ <div className={vipStyles.subDesc}>最多生成4320张图和216个视频</div>+ <ul className={vipStyles.featureList}>+ <li>每天赠送积分</li>+ <li>生成类视频无限次加速</li>+ <li>生成作品去除品牌水印</li>+ <li>视频内置罩</li>+ <li>内容安全审核</li>+ <li>视频更流畅(可补帧到最高60FPS)</li>+ </ul>+ </div>++ <div className={vipStyles.planCard}>+ <div className={vipStyles.planHead}>✚ 月度会员</div>+ <div className={vipStyles.planPriceLine}><span className={vipStyles.currency}>¥</span><span className={vipStyles.bigNum}>949</span><span className={vipStyles.unit}>每年</span></div>+ <div className={vipStyles.planDesc}>首年5折¥949 · 次年续费金额¥1,899 · 包年可随时取消</div>+ <Button className={vipStyles.primaryBtn}>¥949 首年5折</Button>+ <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> 4,000积分每月</div>+ <div className={vipStyles.subDesc}>最多生成16000张图和800个视频</div>+ <ul className={vipStyles.featureList}>+ <li>每天赠送积分</li>+ <li>生成类视频无限次加速</li>+ <li>生成作品去除品牌水印</li>+ <li>视频内置罩</li>+ <li>内容安全审核</li>+ <li>视频更流畅(可补帧到最高60FPS)</li>+ </ul>+ </div>++ <div className={`${vipStyles.planCard} ${vipStyles.premium}`} >+ <div className={vipStyles.planHead}>✚ 年度会员 <Tag color="#5b7cff">最划算</Tag></div>+ <div className={vipStyles.planPriceLine}><span className={vipStyles.currency}>¥</span><span className={vipStyles.bigNum}>2,599</span><span className={vipStyles.unit}>每年</span></div>+ <div className={vipStyles.planDesc}>首年5折¥2,599 · 次年续费金额¥5,199 · 包年可随时取消</div>+ <Button className={vipStyles.primaryBtn}>¥2,599 首年5折</Button>+ <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> 15,000积分每月</div>+ <div className={vipStyles.subDesc}>最多生成60000张图和3000个视频</div>+ <ul className={vipStyles.featureList}>+ <li>每天赠送积分</li>+ <li>生成类视频无限次加速(最快)</li>+ <li>生成作品去除品牌水印</li>+ <li>视频内置罩</li>+ <li>内容安全审核</li>+ <li>视频更流畅(可补帧到最高60FPS)</li>+ </ul>+ </div> */}+++++ </div>+ </div>++ {/* 积分详情弹窗(复用组件) */}+ <PointsDetailModal open={pointsModalVisible} onClose={() => setPointsModalVisible(false)} />++ <PointsRechargeModal open={rechargeVisible} onClose={() => setRechargeVisible(false)} />+ </Modal>+ );+});++export default VipContentModal;++diff --git a/aitoearn_web/aitoearn-web/src/components/modals/outsideCloseModal.module.css b/aitoearn_web/aitoearn-web/src/components/modals/outsideCloseModal.module.cssnew file mode 100644index 00000000..a9455087--- /dev/null+++ b/aitoearn_web/aitoearn-web/src/components/modals/outsideCloseModal.module.css@@ -0,0 +1,23 @@+.outsideCloseModal :global(.ant-modal-close) {+ position: absolute;+ top: -12px;+ right: -12px;+ background: #fff;+ border-radius: 50%;+ box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);+ width: 28px;+ height: 28px;+ display: flex;+ align-items: center;+ justify-content: center;+}++.outsideCloseModal :global(.ant-modal-close-x) {+ line-height: 1;+}++.outsideCloseModal :global(.ant-modal-content) {+ border-radius: 14px;+}++diff --git a/aitoearn_web/aitoearn-web/src/components/modals/vipContentModal.module.css b/aitoearn_web/aitoearn-web/src/components/modals/vipContentModal.module.cssnew file mode 100644index 00000000..5be2da5e--- /dev/null+++ b/aitoearn_web/aitoearn-web/src/components/modals/vipContentModal.module.css@@ -0,0 +1,142 @@+.wrapper {+ background: #ffffff;+}++.header {+ display: flex;+ align-items: center;+ justify-content: center;+ padding: 20px 24px 12px 24px;+ border-bottom: 1px solid #f0f0f0;+ position: relative;+}++.titleBlock {+ display: flex;+ flex-direction: column;+ gap: 8px;+}++.title {+ margin: 0;+ font-size: 28px;+ font-weight: 800;+ color: #0f172a;+}++.highlight {+ background: linear-gradient(90deg, #1fb4ff 0%, #5b7cff 40%, #6d4cff 100%);+ -webkit-background-clip: text;+ background-clip: text;+ color: transparent;+}++.subtitle {+ font-size: 13px;+ color: #6b7280;+}++.links {+ display: flex;+ gap: 12px;+ font-size: 13px;+ justify-content: center;+}++.linkButton {+ color: #2563eb;+ cursor: pointer;+}++.headerRight {+ position: absolute;+ right: 28px;+}++.pointsBtn {+ height: 32px;+ border-radius: 16px;+}++.content {+ padding: 16px 24px 24px 24px;+}++/* New exact-layout styles */+.switchRow {+ display: flex;+ justify-content: center;+ gap: 12px;+ padding: 12px 24px 20px 24px;+}++.switchBtn {+ background: #ffffff;+ color: #374151;+ border-radius: 10px;+ padding: 8px 16px;+ cursor: pointer;+ border: 1px solid #e5e7eb;+ box-shadow: 0 1px 2px rgba(0,0,0,0.04);+}++.outsideCloseModal{+ max-width: 1000px;+}++.active {+ background: #a66ae4;+ border-color: #a66ae4;+ color: #ffffff;+}++.grid {+ margin-top: 18px;+ display: grid;+ grid-template-columns: repeat(2, 1fr);+ gap: 24px;+ padding: 0 24px 24px 24px;+}++.freeCard {+ background: #ffffff;+ color: #111827;+ border-radius: 12px;+ padding: 24px;+ border: 1px solid #eef2f7;+ box-shadow: 0 1px 2px rgba(0,0,0,0.04);+}+.freeTitle { font-weight: 700; margin-bottom: 12px; color:#111827; }+.freePrice { font-size: 36px; font-weight: 800; margin: 12px 0; color:#111827; }+.freePrice span { font-size: 18px; }+.unit { margin-left: 6px; font-size: 14px; color: #6b7280; }+.freeForever { color: #6b7280; margin-bottom: 16px; }+.freeBtn { width: 100%; margin-bottom: 16px; }+.freeItem { font-size: 12px; color: #6b7280; }++.planCard {+ background: #ffffff;+ color: #111827;+ border-radius: 12px;+ padding: 24px;+ position: relative;+ border: 1px solid #eef2f7;+ box-shadow: 0 1px 2px rgba(0,0,0,0.04);+}++.premium { box-shadow: 0 0 0 1px rgba(166,106,228,0.4), 0 0 30px rgba(166,106,228,0.25) inset; min-height: 530px; }++.planHead { font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; color:#111827; }+.planPriceLine { display: flex; align-items: baseline; gap: 4px; margin: 6px 0 10px; }+.currency { font-size: 18px; }+.bigNum { font-size: 44px; font-weight: 800; color: #111827; }+.planDesc { font-size: 12px; color: #6b7280; margin-bottom: 12px; line-height: 1.6; }+.primaryBtn { width: 100%; background: #a66ae4; border-color: #a66ae4; color: #ffffff; font-weight: 700; margin-bottom: 16px; }+.primaryBtn:hover { background: #9556d1; border-color: #9556d1; }++.benefitBox { background: #f8f4ff; border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; gap: 8px; color: #7c3aed; margin-bottom: 8px; }+.dot { width: 8px; height: 8px; background: #a66ae4; border-radius: 50%; display: inline-block; }+.subDesc { font-size: 12px; color: #6b7280; margin-bottom: 12px; }+.featureList { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: #374151; font-size: 13px; }++diff --git a/aitoearn_web/aitoearn-web/src/components/notification/NotificationPanel.tsx b/aitoearn_web/aitoearn-web/src/components/notification/NotificationPanel.tsxindex e656f797..b730dec4 100644--- a/aitoearn_web/aitoearn-web/src/components/notification/NotificationPanel.tsx+++ b/aitoearn_web/aitoearn-web/src/components/notification/NotificationPanel.tsx@@ -270,7 +270,7 @@ const NotificationPanel: React.FC<NotificationPanelProps> = ({ visible, onCloseconst publishData = {flowId: publishAccount.uid, // 使用账号的uid作为flowIdaccountType: publishAccount.type,- accountId: publishAccount.account,+ accountId: publishAccount.id,title: selectedTask.title,desc: selectedTask.description,type: selectedTask.type as any, // 转换为PubTypediff --git a/aitoearn_web/aitoearn-web/src/hooks/useNotification.ts b/aitoearn_web/aitoearn-web/src/hooks/useNotification.tsindex b09badb2..2a09d708 100644--- a/aitoearn_web/aitoearn-web/src/hooks/useNotification.ts+++ b/aitoearn_web/aitoearn-web/src/hooks/useNotification.ts@@ -27,7 +27,6 @@ export const useNotification = () => {}}, [token]);- // @@.@@useEffect(() => {// 初始获取diff --git a/aitoearn_web/aitoearn-web/src/middleware.ts b/aitoearn_web/aitoearn-web/src/middleware.tsindex 50b3dbb5..de613d90 100644--- a/aitoearn_web/aitoearn-web/src/middleware.ts+++ b/aitoearn_web/aitoearn-web/src/middleware.ts@@ -25,6 +25,8 @@ export function middleware(req: NextRequest) {"/sitemap-2.xml","/sitemap-3.xml","/sitemap-4.xml",+ "/sitemap",+ "/chat",].find((v) => req.nextUrl.pathname.includes(v!))) {return NextResponse.next();diff --git a/aitoearn_web/aitoearn-web/src/store/account.ts b/aitoearn_web/aitoearn-web/src/store/account.tsindex 562aadc1..3f1365a9 100644--- a/aitoearn_web/aitoearn-web/src/store/account.ts+++ b/aitoearn_web/aitoearn-web/src/store/account.ts@@ -4,6 +4,7 @@ import lodash from "lodash";import { AccountGroupItem, SocialAccount } from "@/api/types/account.type";import { getAccountGroupApi, getAccountListApi } from "@/api/account";import { directTrans } from "@/app/i18n/client";+import { useUserStore } from "@/store/user";export interface AccountGroup extends AccountGroupItem {children: SocialAccount[];@@ -77,7 +78,10 @@ export const useAccountStore = create(const timeoutPromise = new Promise<any>((resolve) => {setTimeout(() => resolve({ code: -1, data: [] }), timeoutMs);});- const result = await Promise.race([getAccountListApi(), timeoutPromise]);+ const result = await Promise.race([+ getAccountListApi(),+ timeoutPromise,+ ]);if (result?.code !== 0) return;diff --git a/aitoearn_web/aitoearn-web/src/store/user.ts b/aitoearn_web/aitoearn-web/src/store/user.tsindex fd60240e..4048e2be 100644--- a/aitoearn_web/aitoearn-web/src/store/user.ts+++ b/aitoearn_web/aitoearn-web/src/store/user.ts@@ -1,4 +1,5 @@import { createPersistStore } from "@/utils/createPersistStore";+import { getUserInfoApi } from "@/api/apiReq";export interface UserInfo {createTime: string;@@ -61,6 +62,16 @@ export const useUserStore = createPersistStore(set({ userInfo });},+ // 获取用户信息+ async getUserInfo() {+ const res = await getUserInfoApi();+ if (res) {+ set({+ userInfo: res.data,+ });+ }+ },+// 清除登录状态clearLoginStatus: () => {set({ token: undefined, userInfo: undefined });diff --git a/aitoearn_web/aitoearn-web/src/utils/request.ts b/aitoearn_web/aitoearn-web/src/utils/request.tsindex f88d3a80..52eabe23 100644--- a/aitoearn_web/aitoearn-web/src/utils/request.ts+++ b/aitoearn_web/aitoearn-web/src/utils/request.ts@@ -44,8 +44,12 @@ export async function request<T>(params: RequestParams) {const lang = useUserStore.getState().lang || "zh-CN";const isZh = (lang || "").toLowerCase().startsWith("zh");const i18nText = {- networkBusy: isZh ? "网络繁忙,请稍后重试!" : "Network busy, please try again later!",- networkError: isZh ? "网络异常,请稍后重试!" : "Network error, please try again later!",+ networkBusy: isZh+ ? "网络繁忙,请稍后重试!"+ : "Network busy, please try again later!",+ networkError: isZh+ ? "网络异常,请稍后重试!"+ : "Network error, please try again later!",contact: isZh ? "如需帮助请联系客服:" : "Need help? Contact support:",};