Skip to content

Let's use AI to Earn!

平台1

DESKTOP-ZTS2NQJNA12a2fec8153a
diff --git a/src/views/task/videoTask.module.scss b/src/views/task/videoTask.module.scss
index 5558424a..8cc71cc9 100644
--- a/src/views/task/videoTask.module.scss
+++ b/src/views/task/videoTask.module.scss
@@ -239,4 +239,34 @@
button {
padding: 0 32px;
}
+}
+
+.platformContainer {
+ font-size: 13px;
+ color: #666;
+ text-align: left;
+ margin-top: 8px;
+ display: flex;
+ align-items: center;
+}
+
+.platformLabel {
+ margin-right: 8px;
+ color: #666;
+}
+
+.platformTags {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 4px;
+
+ :global {
+ .ant-tag {
+ margin-right: 0;
+ font-size: 12px;
+ padding: 0 6px;
+ line-height: 20px;
+ height: 22px;
+ }
+ }
}
\ No newline at end of file
diff --git a/src/views/task/videoTask.tsx b/src/views/task/videoTask.tsx
index 09eaa26a..23a8898d 100644
--- a/src/views/task/videoTask.tsx
+++ b/src/views/task/videoTask.tsx
@@ -23,6 +23,14 @@ import dayjs from 'dayjs';
const FILE_BASE_URL = import.meta.env.VITE_APP_FILE_HOST;
+// 平台类型映射
+const PLATFORM_MAP = {
+ KWAI: { name: '快手', color: '#00bbf0' },
+ wxSph: { name: '视频号', color: '#07c160' },
+ xhs: { name: '小红书', color: '#fe2c55' },
+ douyin: { name: '抖音', color: '#000000' }
+};
+
export default function Page() {
const [taskList, setTaskList] = useState<Task<TaskVideo>[]>([]);
const [pageInfo, setPageInfo] = useState({
@@ -94,9 +102,27 @@ export default function Page() {
});
};
+ // 渲染平台标签
+ const renderPlatformTags = (accountTypes?: string[]) => {
+ if (!accountTypes || accountTypes.length === 0) {
+ return <Tag color="#f50">全平台</Tag>;
+ }
+
+ return (
+ <div className={styles.platformTags}>
+ {accountTypes.map(type => (
+ <Tag key={type} color={PLATFORM_MAP[type]?.color || '#f50'}>
+ {PLATFORM_MAP[type]?.name || type}
+ </Tag>
+ ))}
+ </div>
+ );
+ };
+
return (
<div className={styles.videoTaskContainer}>
<TaskInfo ref={Ref_TaskInfo} />
+
<div className={styles.taskList}>
{taskList.map((task) => (
<Card
@@ -158,6 +184,11 @@ export default function Page() {
<span className={styles.requirementLabel}>任务要求:</span>
<span className={styles.requirementValue}>{task.requirement || '不许删文'}</span>
</div>
+
+ <div className={styles.platformContainer}>
+ <span className={styles.platformLabel}>可用平台:</span>
+ {renderPlatformTags(task.accountTypes)}
+ </div>
</div>
<div className={styles.taskAction}>