Skip to content

Let's use AI to Earn!

1

DESKTOP-ZTS2NQJNAe383bf65f5c9
diff --git a/src/router/index.tsx b/src/router/index.tsx
index c9b26c89..8fba335f 100644
--- a/src/router/index.tsx
+++ b/src/router/index.tsx
@@ -129,12 +129,6 @@ export const router: CustomRouteObject[] = [
path: '/task',
element: <Task />,
meta: { name: '任务市场', icon: UserOutlined },
- children: [
- { path: 'car', element: <CarTask /> },
- { path: 'pop', element: <PopTask /> },
- { path: 'video', element: <VideoTask /> },
- { path: 'mine', element: <MineTask /> },
- ],
},
{
path: '/finance',
diff --git a/src/views/task/carTask.tsx b/src/views/task/carTask.tsx
index cb60c3cd..71b64471 100644
--- a/src/views/task/carTask.tsx
+++ b/src/views/task/carTask.tsx
@@ -5,94 +5,159 @@
* @LastEditors: nevin
* @Description: 任务
*/
-import { Button, Card, Col, Row } from 'antd';
+import { Button, Tag, Tooltip, Spin } from 'antd';
import { useState, useEffect, useRef } from 'react';
import { Task, TaskProduct, TaskType } from '@@/types/task';
import { taskApi } from '@/api/task';
import { TaskInfoRef } from './components/popInfo';
import TaskInfo from './components/carInfo';
+import { InfoCircleOutlined } from '@ant-design/icons';
+import styles from './task.module.scss';
+
const FILE_BASE_URL = import.meta.env.VITE_APP_FILE_HOST;
export default function Page() {
const [taskList, setTaskList] = useState<Task<TaskProduct>[]>([]);
const [pageInfo, setPageInfo] = useState({
- pageSize: 10,
+ pageSize: 9,
pageNo: 1,
totalCount: 0,
});
+ const [loading, setLoading] = useState(false);
+ const [hasMore, setHasMore] = useState(true);
const Ref_TaskInfo = useRef<TaskInfoRef>(null);
- async function getTaskList() {
- const res = await taskApi.getTaskList<TaskProduct>({
- ...pageInfo,
- type: TaskType.PRODUCT,
- });
- setTaskList(res.items);
+ async function getTaskList(isLoadMore = false) {
+ setLoading(true);
+ try {
+ const res = await taskApi.getTaskList<TaskProduct>({
+ ...pageInfo,
+ type: TaskType.PRODUCT,
+ });
+
+ if (isLoadMore) {
+ setTaskList(prev => [...prev, ...res.items]);
+ } else {
+ setTaskList(res.items);
+ }
+
+ setPageInfo(prev => ({
+ ...prev,
+ totalCount: res.totalCount,
+ }));
+
+ // 检查是否还有更多数据
+ setHasMore(pageInfo.pageNo * pageInfo.pageSize < res.totalCount);
+ } catch (error) {
+ console.error('获取任务列表失败', error);
+ } finally {
+ setLoading(false);
+ }
}
useEffect(() => {
getTaskList();
}, []);
+ // 加载更多数据
+ const loadMore = () => {
+ setPageInfo(prev => ({
+ ...prev,
+ pageNo: prev.pageNo + 1,
+ }));
+ getTaskList(true);
+ };
+
+ // 计算佣金比例
+ const calculateCommissionRate = (price: number, reward: number) => {
+ if (!price || price === 0) return 0;
+ return Math.round((reward / price) * 100);
+ };
+
+ // 计算节省金额
+ const calculateSavings = (price: number, reward: number) => {
+ return reward.toFixed(2);
+ };
+
return (
- <div className="p-4">
+ <div className={styles.taskListContainer}>
<TaskInfo ref={Ref_TaskInfo} />
- <div className="flex flex-wrap gap-4">
- {taskList.map((v) => {
- return (
- <Card
- key={v.id}
- className="box-border w-full p-4 sm:w-1/2 md:w-1/3"
- >
- <Row>
- <Col span={12}>
- <div>
+
+ <div className={styles.productGridContainer}>
+ <div className={styles.productGrid}>
+ {taskList.map((task) => {
+ const price = task.dataInfo?.price || 0;
+ const reward = task.reward || 0;
+ const commissionRate = calculateCommissionRate(price, reward);
+ const savings = calculateSavings(price, reward);
+
+ return (
+ <div key={task.id} className={styles.productCard}>
+ <h3 className={styles.productTitle}>{task.dataInfo?.title || task.title}</h3>
+
+ <div className={styles.productContent}>
+ <div className={styles.imageContainer}>
<img
- src={`${FILE_BASE_URL}${v.imageUrl}`}
- alt=""
- className="w-full h-full"
+ src={`${FILE_BASE_URL}${task.imageUrl}`}
+ alt={task.title}
+ className={styles.productImage}
/>
</div>
- </Col>
- <Col span={12}>
- <h3>{v.title}</h3>
- <Row>
- <Col span={12}>
- {!v.dataInfo ? (
- <div>暂无数据</div>
- ) : (
- <>
- <p> {v.dataInfo.title}</p>
- <p> {v.dataInfo.price}元</p>
- <p>数量: {v.dataInfo.sales}</p>
- </>
- )}
- </Col>
- <Col span={12}>
- <p>招募人数: {v.maxRecruits}</p>
- </Col>
- </Row>
- </Col>
- </Row>
- <Row>
- <Row>
- <Col span={12}>
- 是否已经接受: {v.isAccepted ? '是' : '否'}
- </Col>
- <Col span={12}>
- <Button
- type="primary"
- onClick={() => Ref_TaskInfo.current?.init(v)}
- >
- 查看
- </Button>
- </Col>
- </Row>
- </Row>
- </Card>
- );
- })}
+
+ <div className={styles.productInfo}>
+ <div className={styles.priceRow}>
+ <span className={styles.price}>¥{task.dataInfo?.price || '暂无价格'}</span>
+ <div className={styles.discountTag}>
+ <Tag color="#ff4d4f">高佣{commissionRate}%</Tag>
+ <Tag color="#ff4d4f">赚¥{savings}</Tag>
+ </div>
+ </div>
+
+ <div className={styles.infoRow}>
+ <div className={styles.infoItem}>
+ <span className={styles.infoLabel}>带货等级:</span>
+ <span className={styles.infoValue}>LV03及以上</span>
+ </div>
+ <div className={styles.infoItem}>
+ <span className={styles.infoLabel}>招募人数:</span>
+ <span className={styles.infoValue}>{task.maxRecruits}</span>
+ </div>
+ <div className={styles.infoItem}>
+ <span className={styles.infoLabel}>已售:</span>
+ <span className={styles.infoValue}>{task.dataInfo?.sales || 0}</span>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div className={styles.taskFooter}>
+ <div className={styles.taskTips}>
+ 新号首次报名,奖励1-100元,立即到账
+ <Tooltip title="新用户首次完成任务可获得随机奖励">
+ <InfoCircleOutlined className={styles.infoIcon} />
+ </Tooltip>
+ </div>
+ <Button
+ type="primary"
+ className={styles.applyButton}
+ onClick={() => Ref_TaskInfo.current?.init(task)}
+ >
+ 报名
+ </Button>
+ </div>
+ </div>
+ );
+ })}
+ </div>
+
+ {loading && <div className={styles.loadingContainer}><Spin /></div>}
+
+ {!loading && hasMore && (
+ <div className={styles.loadMoreContainer}>
+ <Button onClick={loadMore}>查看更多项目...</Button>
+ </div>
+ )}
</div>
</div>
);
diff --git a/src/views/task/components/carInfo.module.scss b/src/views/task/components/carInfo.module.scss
new file mode 100644
index 00000000..f2b2092c
--- /dev/null
+++ b/src/views/task/components/carInfo.module.scss
@@ -0,0 +1,133 @@
+.taskDetailModal {
+ :global {
+ .ant-modal-content {
+ padding: 0;
+ overflow: hidden;
+ border-radius: 8px;
+ }
+
+ .ant-modal-body {
+ padding: 0;
+ }
+ }
+}
+
+.taskDetailContainer {
+ display: flex;
+ flex-direction: column;
+}
+
+.taskTitle {
+ font-size: 18px;
+ font-weight: 500;
+ color: #333;
+ padding: 16px 24px;
+ margin: 0;
+ border-bottom: 1px solid #f0f0f0;
+}
+
+.taskContent {
+ display: flex;
+ padding: 24px;
+}
+
+.taskImageContainer {
+ width: 300px;
+ flex-shrink: 0;
+ margin-right: 24px;
+ position: relative;
+}
+
+.taskImage {
+ width: 100%;
+ border-radius: 8px;
+ overflow: hidden;
+}
+
+.taskImageTags {
+ position: absolute;
+ left: 0;
+ bottom: 0;
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+ padding: 12px;
+}
+
+.imageTag {
+ background-color: rgba(255, 255, 255, 0.8);
+ color: #333;
+ border: none;
+ padding: 4px 12px;
+ border-radius: 4px;
+}
+
+.taskInfoContainer {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ gap: 16px;
+ background-color: #f9f9f9;
+ padding: 20px;
+ border-radius: 8px;
+}
+
+.infoItem {
+ display: flex;
+ align-items: center;
+}
+
+.infoLabel {
+ width: 100px;
+ color: #666;
+ font-size: 14px;
+}
+
+.infoValue {
+ color: #333;
+ font-size: 14px;
+}
+
+.infoPrice {
+ color: #ff4d4f;
+ font-size: 16px;
+ font-weight: 500;
+}
+
+.infoReward {
+ color: #ff4d4f;
+ font-size: 16px;
+ font-weight: 500;
+}
+
+.taskFooter {
+ display: flex;
+ justify-content: center;
+ gap: 16px;
+ padding: 16px 24px 24px;
+ border-top: 1px solid #f0f0f0;
+ margin-top: 16px;
+}
+
+.applyButton {
+ background-color: #52c41a;
+ border-color: #52c41a;
+ padding: 0 32px;
+ height: 40px;
+
+ &:hover {
+ background-color: #73d13d;
+ border-color: #73d13d;
+ }
+}
+
+.cancelButton {
+ padding: 0 32px;
+ height: 40px;
+}
+
+.noDataContainer {
+ padding: 40px;
+ text-align: center;
+ color: #999;
+}
\ No newline at end of file
diff --git a/src/views/task/components/carInfo.tsx b/src/views/task/components/carInfo.tsx
index 8d39f517..1922cdac 100644
--- a/src/views/task/components/carInfo.tsx
+++ b/src/views/task/components/carInfo.tsx
@@ -5,26 +5,28 @@
* @LastEditors: nevin
* @Description: 挂车
*/
-import { Button, Modal } from 'antd';
+import { Button, Modal, Tag } from 'antd';
import {
Task,
- TaskPromotion,
+ TaskProduct,
TaskStatusName,
TaskTypeName,
} from '@@/types/task';
import { forwardRef, useImperativeHandle, useState } from 'react';
import { taskApi } from '@/api/task';
+import styles from './carInfo.module.scss';
+
const FILE_BASE_URL = import.meta.env.VITE_APP_FILE_HOST;
export interface TaskInfoRef {
- init: (pubRecord: Task<TaskPromotion>) => Promise<void>;
+ init: (pubRecord: Task<TaskProduct>) => Promise<void>;
}
const Com = forwardRef<TaskInfoRef>((props: any, ref) => {
const [isModalOpen, setIsModalOpen] = useState(false);
- const [taskInfo, setTaskInfo] = useState<Task<TaskPromotion> | null>();
+ const [taskInfo, setTaskInfo] = useState<Task<TaskProduct> | null>();
- async function init(inTaskInfo: Task<TaskPromotion>) {
+ async function init(inTaskInfo: Task<TaskProduct>) {
setTaskInfo(inTaskInfo);
setIsModalOpen(true);
}
@@ -48,41 +50,92 @@ const Com = forwardRef<TaskInfoRef>((props: any, ref) => {
setIsModalOpen(false);
};
+ // 计算佣金比例
+ const calculateCommissionRate = (price: number, reward: number) => {
+ if (!price || price === 0) return 0;
+ return Math.round((reward / price) * 100);
+ };
+
return (
<>
<Modal
- title="商品任务"
+ title={null}
open={isModalOpen}
onCancel={handleCancel}
- footer={[
- <Button key="back" onClick={handleCancel}>
- 取消
- </Button>,
- <Button key="submit" type="primary" onClick={taskApply}>
- 报名
- </Button>,
- ]}
+ footer={null}
+ width={800}
+ className={styles.taskDetailModal}
>
- <div>
- {taskInfo ? (
- <div>
- <p>任务标题:{taskInfo.title}</p>
- <p>任务描述:{taskInfo.description}</p>
- <p>任务类型:{TaskTypeName.get(taskInfo.type)}</p>
-
- <img
- src={`${FILE_BASE_URL}${taskInfo.imageUrl}`}
- alt=""
- className="w-full h-full"
- />
-
- <p>任务奖励金额:{taskInfo.reward}</p>
- <p>任务状态:{TaskStatusName.get(taskInfo.status)}</p>
+ {taskInfo ? (
+ <div className={styles.taskDetailContainer}>
+ <h2 className={styles.taskTitle}>{taskInfo.title}</h2>
+
+ <div className={styles.taskContent}>
+ <div className={styles.taskImageContainer}>
+ <img
+ src={`${FILE_BASE_URL}${taskInfo.imageUrl}`}
+ alt={taskInfo.title}
+ className={styles.taskImage}
+ />
+ <div className={styles.taskImageTags}>
+ <Tag className={styles.imageTag}>精铜材质</Tag>
+ <Tag className={styles.imageTag}>重力耐合</Tag>
+ <Tag className={styles.imageTag}>防虫防臭</Tag>
+ </div>
+ </div>
+
+ <div className={styles.taskInfoContainer}>
+ <div className={styles.infoItem}>
+ <span className={styles.infoLabel}>带货等级:</span>
+ <span className={styles.infoValue}>LV03及以上</span>
+ </div>
+
+ <div className={styles.infoItem}>
+ <span className={styles.infoLabel}>报名人数:</span>
+ <span className={styles.infoValue}>{taskInfo.maxRecruits || 10000}</span>
+ </div>
+
+ <div className={styles.infoItem}>
+ <span className={styles.infoLabel}>挂购物车:</span>
+ <span className={styles.infoValue}>是</span>
+ </div>
+
+ <div className={styles.infoItem}>
+ <span className={styles.infoLabel}>合作要求:</span>
+ <span className={styles.infoValue}>发布需挂车,可使用已有素材或自由素材创作发布</span>
+ </div>
+
+ <div className={styles.infoItem}>
+ <span className={styles.infoLabel}>商品售价:</span>
+ <span className={styles.infoPrice}>¥{taskInfo.dataInfo?.price || 0}</span>
+ </div>
+
+ <div className={styles.infoItem}>
+ <span className={styles.infoLabel}>分佣比例:</span>
+ <span className={styles.infoValue}>
+ {calculateCommissionRate(taskInfo.dataInfo?.price || 0, taskInfo.reward || 0)}%
+ </span>
+ </div>
+
+ <div className={styles.infoItem}>
+ <span className={styles.infoLabel}>每单预估收益:</span>
+ <span className={styles.infoReward}>¥{taskInfo.reward?.toFixed(2) || 0}</span>
+ </div>
+ </div>
+ </div>
+
+ <div className={styles.taskFooter}>
+ <Button key="back" onClick={handleCancel} className={styles.cancelButton}>
+ 取消
+ </Button>
+ <Button key="submit" type="primary" onClick={taskApply} className={styles.applyButton}>
+ 报名
+ </Button>
</div>
- ) : (
- <div>暂无任务信息</div>
- )}
- </div>
+ </div>
+ ) : (
+ <div className={styles.noDataContainer}>暂无任务信息</div>
+ )}
</Modal>
</>
);
diff --git a/src/views/task/index.tsx b/src/views/task/index.tsx
index b7eabf97..f4081cf4 100644
--- a/src/views/task/index.tsx
+++ b/src/views/task/index.tsx
@@ -5,30 +5,101 @@
* @LastEditors: nevin
* @Description: 任务页面
*/
-import { VideoCameraOutlined } from '@ant-design/icons';
-import { Segmented } from 'antd';
-import { Outlet, useNavigate } from 'react-router-dom';
+import { useState } from 'react';
+import {
+ ShoppingCartOutlined,
+ ShareAltOutlined,
+ VideoCameraOutlined,
+ HistoryOutlined,
+ WalletOutlined
+} from '@ant-design/icons';
import styles from './task.module.scss';
-export default function Page() {
- const navigate = useNavigate();
+// 导入现有的任务组件
+import CarTask from './carTask';
+import PopTask from './popTask';
+import VideoTask from './videoTask';
+import MineTask from './mineTask';
+
+// 任务类型定义
+interface Task {
+ id: string;
+ title: string;
+ price: number;
+ originalPrice?: number;
+ discount?: number;
+ image: string;
+ likes: number;
+ views: number;
+ level: string;
+}
+
+export default function Task() {
+ // 当前选中的任务类型
+ const [activeTab, setActiveTab] = useState('car');
+
+ // 渲染对应的任务内容
+ const renderTaskContent = () => {
+ switch (activeTab) {
+ case 'car':
+ return <CarTask />;
+ case 'pop':
+ return <PopTask />;
+ case 'video':
+ return <VideoTask />;
+ case 'mine':
+ return <MineTask />;
+ default:
+ return <CarTask />;
+ }
+ };
return (
- <div className={styles.publish}>
- <Segmented
- vertical
- size="large"
- options={[
- { label: '挂车任务', value: 'car', icon: <VideoCameraOutlined /> },
- { label: '推广任务', value: 'pop', icon: <VideoCameraOutlined /> },
- { label: '视频任务', value: 'video', icon: <VideoCameraOutlined /> },
- { label: '已参与任务', value: 'mine', icon: <VideoCameraOutlined /> },
- ]}
- onChange={(value) => {
- navigate(value);
- }}
- />
- <Outlet />
+ <div className={styles.taskPageContainer}>
+ {/* 顶部导航栏 */}
+ <div className={styles.taskHeader}>
+ <div className={styles.taskHeaderLeft}>
+ <div
+ className={`${styles.taskButton} ${activeTab === 'car' ? styles.activeTaskButton : ''}`}
+ onClick={() => setActiveTab('car')}
+ >
+ <ShoppingCartOutlined />
+ <span>挂车市场任务</span>
+ </div>
+ <div
+ className={`${styles.taskButton} ${activeTab === 'pop' ? styles.activeTaskButton : ''}`}
+ onClick={() => setActiveTab('pop')}
+ >
+ <ShareAltOutlined />
+ <span>推广任务</span>
+ </div>
+ <div
+ className={`${styles.taskButton} ${activeTab === 'video' ? styles.activeTaskButton : ''}`}
+ onClick={() => setActiveTab('video')}
+ >
+ <VideoCameraOutlined />
+ <span>视频任务</span>
+ </div>
+ <div
+ className={`${styles.taskButton} ${activeTab === 'mine' ? styles.activeTaskButton : ''}`}
+ onClick={() => setActiveTab('mine')}
+ >
+ <HistoryOutlined />
+ <span>已参与过任务</span>
+ </div>
+ </div>
+ <div className={styles.taskHeaderRight}>
+ <div className={styles.withdrawText}>
+ <WalletOutlined />
+ <span>提现</span>
+ </div>
+ </div>
+ </div>
+
+ {/* 任务内容 */}
+ <div className={styles.taskContent}>
+ {renderTaskContent()}
+ </div>
</div>
);
}
diff --git a/src/views/task/mineTask.tsx b/src/views/task/mineTask.tsx
index 56e16235..c687c09b 100644
--- a/src/views/task/mineTask.tsx
+++ b/src/views/task/mineTask.tsx
@@ -51,7 +51,7 @@ export default function Page() {
}
return (
- <div className="p-4">
+ <div>
<MineTaskInfo ref={Ref_MineTaskInfo} />
<Withdraw ref={Ref_Withdraw} />
<div className="flex flex-wrap gap-4">
diff --git a/src/views/task/popTask.tsx b/src/views/task/popTask.tsx
index 28e31be2..ef0f75e2 100644
--- a/src/views/task/popTask.tsx
+++ b/src/views/task/popTask.tsx
@@ -36,7 +36,7 @@ export default function Page() {
}, []);
return (
- <div className="p-4">
+ <div >
<TaskInfo ref={Ref_TaskInfo} />
<div className="flex flex-wrap gap-4">
{taskList.map((v) => {
diff --git a/src/views/task/task.module.scss b/src/views/task/task.module.scss
index 2abb36ea..5294de85 100644
--- a/src/views/task/task.module.scss
+++ b/src/views/task/task.module.scss
@@ -13,4 +13,414 @@
}
}
}
+}
+
+.taskContainer {
+ padding: 16px;
+ background-color: #f5f5f5;
+ min-height: 100vh;
+}
+
+.tabsContainer {
+ background-color: #fff;
+ padding: 0 16px;
+ margin-bottom: 16px;
+ border-radius: 8px;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.taskList {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
+ gap: 16px;
+}
+
+.taskCard {
+ border-radius: 8px;
+ overflow: hidden;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+ transition: transform 0.2s;
+
+ &:hover {
+ transform: translateY(-3px);
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+ }
+}
+
+.taskContent {
+ display: flex;
+ flex: 1;
+ margin-bottom: 12px;
+}
+
+.imageContainer {
+ width: 100px;
+ height: 100px;
+ flex-shrink: 0;
+ margin-right: 12px;
+ overflow: hidden;
+ border-radius: 4px;
+}
+
+.productImage {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+}
+
+.productInfo {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+}
+
+.productTitle {
+ text-align: left;
+ font-size: 14px;
+ line-height: 1.4;
+ margin-bottom: 12px;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ font-weight: normal;
+ color: #333;
+}
+
+.priceInfo {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 4px;
+}
+
+.price {
+ font-size: 16px;
+ font-weight: bold;
+ color: #ff4d4f;
+}
+
+.likes {
+ font-size: 12px;
+ color: #999;
+}
+
+.discountTag {
+ margin: 0;
+ display: flex;
+ gap: 4px;
+ flex-direction: row;
+ justify-content: flex-start;
+}
+
+.viewsInfo {
+ display: flex;
+ justify-content: space-between;
+ font-size: 12px;
+ color: #999;
+}
+
+.level {
+ color: #666;
+}
+
+.taskFooter {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-top: 12px;
+ border-top: 1px solid #f0f0f0;
+ margin-top: auto;
+}
+
+.taskTips {
+ font-size: 12px;
+ color: #999;
+ display: flex;
+ align-items: center;
+}
+
+.infoIcon {
+ margin-left: 4px;
+ color: #999;
+ cursor: pointer;
+
+ &:hover {
+ color: #1890ff;
+ }
+}
+
+.applyButton {
+ background-color: #52c41a;
+ border-color: #52c41a;
+
+ &:hover {
+ background-color: #73d13d;
+ border-color: #73d13d;
+ }
+}
+
+.taskPageContainer {
+ padding: 16px;
+ background-color: #f5f5f5;
+ min-height: 100vh;
+ display: flex;
+ flex-direction: column;
+}
+
+.taskHeader {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 16px;
+ padding: 12px 16px;
+ background-color: #fff;
+ border-radius: 8px;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.taskHeaderLeft {
+ display: flex;
+ gap: 12px;
+}
+
+.taskButton {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ padding: 8px 16px;
+ background-color: #f5f5f5;
+ border-radius: 4px;
+ cursor: pointer;
+ transition: all 0.3s;
+ color: #666;
+
+ &:hover {
+ background-color: #e6f7ff;
+ color: #1890ff;
+ }
+
+ span {
+ font-size: 14px;
+ }
+}
+
+.activeTaskButton {
+ background-color: #e6f7ff;
+ color: #1890ff;
+ font-weight: 500;
+}
+
+.taskHeaderRight {
+ display: flex;
+ gap: 12px;
+}
+
+.withdrawText {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ color: #1890ff;
+ cursor: pointer;
+ font-size: 14px;
+
+ &:hover {
+ color: #40a9ff;
+ }
+}
+
+.taskContent {
+ background-color: #fff;
+ border-radius: 8px;
+ padding: 16px;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+}
+
+.taskListContainer {
+ display: flex;
+ flex-direction: column;
+ flex: 1;
+ padding: 16px 0;
+}
+
+.productGridContainer {
+ display: flex;
+ flex-direction: column;
+ flex: 1;
+}
+
+.productGrid {
+ display: grid;
+ grid-template-columns: repeat(3, 1fr);
+ gap: 24px;
+ margin-top: 16px;
+
+ @media (max-width: 1200px) {
+ grid-template-columns: repeat(2, 1fr);
+ }
+
+ @media (max-width: 768px) {
+ grid-template-columns: 1fr;
+ }
+}
+
+.productCard {
+ background-color: #fff;
+ border-radius: 8px;
+ overflow: hidden;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+ padding: 16px;
+ display: flex;
+ flex-direction: column;
+ transition: transform 0.2s;
+
+ &:hover {
+ transform: translateY(-3px);
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+ }
+}
+
+.productContent {
+ display: flex;
+ margin-bottom: 12px;
+ flex: 1;
+}
+
+.imageContainer {
+ width: 100px;
+ height: 100px;
+ flex-shrink: 0;
+ margin-right: 12px;
+ overflow: hidden;
+ border-radius: 4px;
+}
+
+.productImage {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+}
+
+.productInfo {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+}
+
+.priceRow {
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+}
+
+.price {
+ font-size: 16px;
+ font-weight: bold;
+ color: #ff4d4f;
+}
+
+.discountTag {
+ margin: 0;
+ display: flex;
+ gap: 4px;
+ flex-direction: row;
+ justify-content: flex-start;
+}
+
+.infoRow {
+ display: flex;
+ flex-direction: column;
+ gap: 4px;
+ margin-top: auto;
+}
+
+.infoItem {
+ display: flex;
+ font-size: 12px;
+ color: #666;
+}
+
+.infoLabel {
+ color: #999;
+ margin-right: 4px;
+}
+
+.infoValue {
+ color: #666;
+}
+
+.sales {
+ font-size: 12px;
+ color: #999;
+}
+
+.viewsInfo {
+ display: flex;
+ justify-content: space-between;
+ font-size: 12px;
+ color: #999;
+ margin-top: auto;
+}
+
+.level {
+ color: #666;
+}
+
+.taskFooter {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-top: 12px;
+ border-top: 1px solid #f0f0f0;
+ margin-top: auto;
+}
+
+.taskTips {
+ font-size: 12px;
+ color: #999;
+ display: flex;
+ align-items: center;
+}
+
+.infoIcon {
+ margin-left: 4px;
+ color: #999;
+ cursor: pointer;
+
+ &:hover {
+ color: #1890ff;
+ }
+}
+
+.applyButton {
+ background-color: #52c41a;
+ border-color: #52c41a;
+
+ &:hover {
+ background-color: #73d13d;
+ border-color: #73d13d;
+ }
+}
+
+.loadMoreContainer {
+ display: flex;
+ justify-content: center;
+ margin-top: 32px;
+ margin-bottom: 16px;
+
+ button {
+ padding: 0 32px;
+ }
+}
+
+.loadingContainer {
+ display: flex;
+ justify-content: center;
+ margin-top: 32px;
+ margin-bottom: 16px;
}
\ No newline at end of file
diff --git a/src/views/task/videoTask.tsx b/src/views/task/videoTask.tsx
index e010e320..82a90098 100644
--- a/src/views/task/videoTask.tsx
+++ b/src/views/task/videoTask.tsx
@@ -36,7 +36,7 @@ export default function Page() {
}, []);
return (
- <div className="p-4">
+ <div >
<TaskInfo ref={Ref_TaskInfo} />
<div className="flex flex-wrap gap-4">
{taskList.map((v) => {