소스 검색

增加视频推荐指数的排序

jihuaqiang 1 일 전
부모
커밋
d022a3f04c

+ 3 - 1
src/views/publishContent/weCom/components/videoSelectModal/index.tsx

@@ -38,12 +38,13 @@ export enum VideoSortType {
 	平台推荐 = 0,
 	行业裂变率 = 1,
 	本渠道传播率 = 2,
+	推荐指数 = 3,
 }
 
 const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ visible, onClose, onOk, planType, initialSelectedIds = [] }) => {
 	const { videoCategoryOptions } = useVideoCategoryOptions();
 	const [category, setCategory] = useState<string>();
-	const [sort, setSort] = useState<VideoSortType>(VideoSortType.平台推荐);
+	const [sort, setSort] = useState<VideoSortType>(VideoSortType.推荐指数);
 	const [searchTerm, setSearchTerm] = useState<string>('');
 	const [currentPage, setCurrentPage] = useState(1);
 	const [pageSize, setPageSize] = useState(10);
@@ -268,6 +269,7 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ visible, onClose, o
 								</div>
 								<div className="p-3 flex justify-between items-center">
 									<div className="flex flex-col gap-1">
+										<Text type="secondary" className="text-xs">推荐指数: {video.recommendScore?.toFixed(2) || '无'}</Text>
 										<Text type="secondary" className="text-xs">平台传播得分: {video.score?.toFixed(2) || '无'}</Text>
 										<Text type="secondary" className="text-xs">行业裂变率: {video.industryFissionRate?.toFixed(2) || '无'}</Text>
 										<Text type="secondary" className="text-xs">本渠道传播率: {video.channelFissionRate?.toFixed(2) || '无'}</Text>

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

@@ -37,6 +37,7 @@ export interface WeVideoItem {
 	scene?: 0 | 1;
 	industryFissionRate?: number;
 	channelFissionRate?: number;
+	recommendScore?: number;
 }
 
 export interface AddWeComPlanParam {

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

@@ -12,6 +12,7 @@ export interface VideoItem {
 	industryFissionRate: number,
 	channelFissionRate: number,
 	videoLibraryType?: number;
+	recommendScore: number,
 } 
 
 export interface VideoListResponse {

+ 2 - 1
src/views/publishContent/weGZH/components/videoSelectModal/index.tsx

@@ -36,7 +36,7 @@ interface VideoSelectModalProps {
 const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ planType, visible, onClose, onOk, initialSelectedIds = [], selectedVideos = [], defaultVideoLibraryType }) => {
 	const { videoCategoryOptions } = useVideoCategoryOptions();
 	const [category, setCategory] = useState<string>();
-	const [sort, setSort] = useState<VideoSortType>(VideoSortType.平台推荐);
+	const [sort, setSort] = useState<VideoSortType>(VideoSortType.推荐指数);
 	const [searchTerm, setSearchTerm] = useState<string>('');
 	const [currentPage, setCurrentPage] = useState(1);
 	const [pageSize, setPageSize] = useState(10);
@@ -264,6 +264,7 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ planType, visible,
 								</div>
 								<div className="p-3 flex justify-between items-center">
 									<div className="flex flex-col gap-1">
+										<Text type="secondary" className="text-xs">推荐指数: {video.recommendScore?.toFixed(2) || '无'}</Text>
 										<Text type="secondary" className="text-xs">平台传播得分: {video.score?.toFixed(2) || '无'}</Text>
 										<Text type="secondary" className="text-xs">行业裂变率: {video.industryFissionRate?.toFixed(2) || '无'}</Text>
 										<Text type="secondary" className="text-xs">本渠道传播率: {video.channelFissionRate?.toFixed(2) || '无'}</Text>