Sfoglia il codice sorgente

Revert "videoSelectModal 新增「历史已选」tab,展示当前账号已发布视频,该 tab 下 category 选择禁用。"

This reverts commit db3f8c74b8b52b0aa435c0387cb83d1f6cf5baf1.
刘立冬 1 settimana fa
parent
commit
86dc64fce2

+ 4 - 7
src/views/publishContent/weCom/components/videoSelectModal/index.tsx

@@ -16,7 +16,7 @@ import {
 	Popover,
 	Descriptions,
 } from 'antd';
-import { CheckCircleFilled, CaretRightFilled, HeartOutlined, HistoryOutlined, FireOutlined, BookOutlined } from '@ant-design/icons';
+import { CheckCircleFilled, CaretRightFilled, HeartOutlined, HistoryOutlined, FireOutlined } from '@ant-design/icons';
 import { VideoListResponse } from '@src/views/publishContent/weGZH/components/types';
 import http from '@src/http';
 import { getVideoContentListApi } from '@src/http/api';
@@ -36,15 +36,13 @@ const SOURCE_TABS: { key: string; label: string; disabled?: boolean }[] = [
 	{ key: 'prior', label: '粉丝喜欢' },
 	{ key: 'posterior', label: '已发优质相似' },
 	{ key: 'hot', label: '票圈热门' },
-	{ key: 'selected', label: '历史已选' },
 ];
-const SOURCE_LABEL: Record<string, string> = { prior: '粉丝喜欢', posterior: '已发优质相似', hot: '票圈热门', selected: '历史已选' };
-const SOURCE_COLOR: Record<string, string> = { prior: 'green', posterior: 'blue', hot: 'orange', selected: 'purple' };
+const SOURCE_LABEL: Record<string, string> = { prior: '粉丝喜欢', posterior: '已发优质相似', hot: '票圈热门' };
+const SOURCE_COLOR: Record<string, string> = { prior: 'green', posterior: 'blue', hot: 'orange' };
 const SOURCE_ICON: Record<string, React.ReactNode> = {
 	prior: <HeartOutlined />,
 	posterior: <HistoryOutlined />,
 	hot: <FireOutlined />,
-	selected: <BookOutlined />,
 };
 
 const DEMAND_LABEL_STYLE = { width: 120, padding: '2px 8px', whiteSpace: 'nowrap' as const, backgroundColor: '#e6f4ff' };
@@ -459,9 +457,8 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ visible, onClose, o
 						<Select
 							placeholder="选择品类"
 							style={{ width: 120 }}
-							value={source === 'selected' ? undefined : category}
+							value={category}
 							allowClear
-							disabled={source === 'selected'}
 							onChange={setCategory}
 							options={videoCategoryOptions.map(option => ({ label: option, value: option }))}
 						/>

+ 1 - 1
src/views/publishContent/weCom/type.ts

@@ -44,7 +44,7 @@ export interface WeVideoItem {
 	uvRatio?: number;
 	totalRov?: number;
 	// 数据来源标识(后端返回)
-	source?: 'prior' | 'posterior' | 'hot' | 'selected';
+	source?: 'prior' | 'posterior' | 'hot';
 	// 需求维度详情字段(仅 prior/posterior 来源会填充,hot 来源大多为空)
 	crowdSegment?: string;
 	demandId?: string;

+ 1 - 1
src/views/publishContent/weGZH/components/types.ts

@@ -18,7 +18,7 @@ export interface VideoItem {
 	uvRatio?: number,
 	totalRov?: number,
 	// 数据来源标识(后端返回)
-	source?: 'prior' | 'posterior' | 'hot' | 'selected';
+	source?: 'prior' | 'posterior' | 'hot';
 	// 需求维度详情字段(仅 prior/posterior 来源会填充,hot 来源大多为空)
 	crowdSegment?: string;
 	demandId?: string;

+ 4 - 7
src/views/publishContent/weGZH/components/videoSelectModal/index.tsx

@@ -16,7 +16,7 @@ import {
 	Popover,
 	Descriptions,
 } from 'antd';
-import { CheckCircleFilled, CaretRightFilled, HeartOutlined, HistoryOutlined, FireOutlined, BookOutlined } from '@ant-design/icons';
+import { CheckCircleFilled, CaretRightFilled, HeartOutlined, HistoryOutlined, FireOutlined } from '@ant-design/icons';
 import { VideoItem, VideoListResponse } from '../types';
 import http from '@src/http';
 import { getVideoContentListApi } from '@src/http/api';
@@ -37,15 +37,13 @@ const SOURCE_TABS: { key: string; label: string; disabled?: boolean }[] = [
 	{ key: 'prior', label: '粉丝喜欢' },
 	{ key: 'posterior', label: '已发优质相似' },
 	{ key: 'hot', label: '票圈热门' },
-	{ key: 'selected', label: '历史已选' },
 ];
-const SOURCE_LABEL: Record<string, string> = { prior: '粉丝喜欢', posterior: '已发优质相似', hot: '票圈热门', selected: '历史已选' };
-const SOURCE_COLOR: Record<string, string> = { prior: 'green', posterior: 'blue', hot: 'orange', selected: 'purple' };
+const SOURCE_LABEL: Record<string, string> = { prior: '粉丝喜欢', posterior: '已发优质相似', hot: '票圈热门' };
+const SOURCE_COLOR: Record<string, string> = { prior: 'green', posterior: 'blue', hot: 'orange' };
 const SOURCE_ICON: Record<string, React.ReactNode> = {
 	prior: <HeartOutlined />,
 	posterior: <HistoryOutlined />,
 	hot: <FireOutlined />,
-	selected: <BookOutlined />,
 };
 
 const DEMAND_LABEL_STYLE = { width: 120, padding: '2px 8px', whiteSpace: 'nowrap' as const, backgroundColor: '#e6f4ff' };
@@ -452,9 +450,8 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ planType, visible,
 						<Select
 							placeholder="选择品类"
 							style={{ width: 120 }}
-							value={source === 'selected' ? undefined : category}
+							value={category}
 							allowClear
-							disabled={source === 'selected'}
 							onChange={setCategory}
 							options={videoCategoryOptions.map(option => ({ label: option, value: option }))}
 						/>