Sfoglia il codice sorgente

videoSelectModal 需求/匹配 hover 由「非 production 全开」改为「测试环境全开 + 生产仅 type=2 内部账号开启」:weCom/weGZH 两份 Modal 各把 IS_NON_PROD 改成 SHOW_DEMAND_HOVER,接入 getUserInfo().type 与 ContentPlatformAccountTypeEnum 对齐(2=INTERNAL),避免合作方/代理在线上看到 demand 调试字段(score/rov/scene_sum_rov/experimentId 等);同时清掉 weCom 顶部遗留的调试 console.log。

刘立冬 2 giorni fa
parent
commit
b10dc250a9

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

@@ -23,10 +23,10 @@ import { useVideoCategoryOptions } from '@src/views/publishContent/weGZH/hooks/u
 import { WeComPlanType, WeVideoItem, VideoSearchPlanType } from '@src/views/publishContent/weCom/type'
 import useLogger from '@src/hooks/useLogger';
 import { debounce } from '@src/utils/helper';
+import { getUserInfo } from '@src/http/sso';
 
 const { Text, Paragraph } = Typography;
-const IS_NON_PROD = import.meta.env.MODE !== 'production';
-console.log('[VideoSelectModal] MODE=', import.meta.env.MODE, 'IS_NON_PROD=', IS_NON_PROD);
+const SHOW_DEMAND_HOVER = import.meta.env.MODE !== 'production' || getUserInfo()?.type === 2;
 
 type LoadMode = 'replace' | 'append' | 'jump';
 
@@ -519,7 +519,7 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ visible, onClose, o
 								)} */}
 							</Card>
 						);
-						if (IS_NON_PROD) {
+						if (SHOW_DEMAND_HOVER) {
 							return (
 								<Popover
 									key={video.videoId}

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

@@ -25,9 +25,10 @@ import { GzhPlanType } from '../../hooks/useGzhPlanList';
 import { VideoSearchPlanType } from '@src/views/publishContent/weCom/type';
 import useLogger from '@src/hooks/useLogger';
 import { debounce } from '@src/utils/helper';
+import { getUserInfo } from '@src/http/sso';
 
 const { Paragraph, Text } = Typography;
-const IS_NON_PROD = import.meta.env.MODE !== 'production';
+const SHOW_DEMAND_HOVER = import.meta.env.MODE !== 'production' || getUserInfo()?.type === 2;
 
 type LoadMode = 'replace' | 'append' | 'jump';
 
@@ -511,7 +512,7 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ planType, visible,
 								</div>
 							</Card>
 						);
-						if (IS_NON_PROD) {
+						if (SHOW_DEMAND_HOVER) {
 							return (
 								<Popover
 									key={video.videoId}