Skip to content

Let's use AI to Earn!

feat: 用户查看任务

牛文政92fce55e4186
diff --git a/commont/types/task.ts b/commont/types/task.ts
index 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.tsx
index 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}>
<Button
type="primary"
diff --git a/src/views/task/components/carInfo.tsx b/src/views/task/components/carInfo.tsx
index 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);
}