Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
feat: 用户查看任务
牛文政92fce55e4186
diff --git a/commont/types/task.ts b/commont/types/task.tsindex e6488d96..c44c4eff 100644--- a/commont/types/task.ts+++ b/commont/types/task.ts@@ -47,6 +47,7 @@ export interface TaskProduct extends TaskData {export type TaskDataInfo = TaskProduct | TaskPromotion | TaskVideo;export interface Task<T extends TaskProduct | TaskPromotion | TaskVideo>extends TimeTemp {+ _id: string;id: string;title: string;description: string;@@ -62,6 +63,5 @@ export interface Task<T extends TaskProduct | TaskPromotion | TaskVideo>reward: number; // 任务奖励金额status: TaskStatus; // 'active' | 'completed' | 'cancelled'platforms: string[]; // 支持的平台ID列表- platformRequirements?: Record<string, any>; // 平台特定要求,如视频时长、标签等- metadata: Record<string, any>; // 额外的任务相关信息+ isAccepted?: boolean; // 是否已经接受任务}diff --git a/src/views/task/carTask.tsx b/src/views/task/carTask.tsxindex c0ada6df..985fc7ef 100644--- a/src/views/task/carTask.tsx+++ b/src/views/task/carTask.tsx@@ -77,7 +77,9 @@ export default function Page() {</Row><Row><Row>- <Col span={12}>-----</Col>+ <Col span={12}>+ 是否已经接受: {v.isAccepted ? '是' : '否'}+ </Col><Col span={12}><Buttontype="primary"diff --git a/src/views/task/components/carInfo.tsx b/src/views/task/components/carInfo.tsxindex 413e2892..8d39f517 100644--- a/src/views/task/components/carInfo.tsx+++ b/src/views/task/components/carInfo.tsx@@ -39,7 +39,7 @@ const Com = forwardRef<TaskInfoRef>((props: any, ref) => {async function taskApply() {if (!taskInfo) return;- const res = await taskApi.taskApply(taskInfo?.id);+ const res = await taskApi.taskApply(taskInfo?._id);setTaskInfo(res);setIsModalOpen(false);}