diff --git a/nkebao/src/pages/scenarios/plan/list/index.tsx b/nkebao/src/pages/scenarios/plan/list/index.tsx index 18d18b5f..a2eb89e0 100644 --- a/nkebao/src/pages/scenarios/plan/list/index.tsx +++ b/nkebao/src/pages/scenarios/plan/list/index.tsx @@ -80,15 +80,6 @@ const ScenarioList: React.FC = () => { return channelMap[channel] || `${channel}获客`; }; - // 获取场景名称 - const getScenarioName = useCallback(() => { - const urlName = searchParams.get("name"); - if (urlName) { - return urlName; - } - return getChannelName(scenarioId || ""); - }, [searchParams, scenarioId]); - useEffect(() => { const fetchScenarioData = async () => { if (!scenarioId) return; @@ -104,25 +95,16 @@ const ScenarioList: React.FC = () => { // 设置计划列表 setTasks(response.list); - - // 设置页面标题 - setPageTitle(getScenarioName()); } catch (error) { console.error("获取场景数据失败:", error); setTasks([]); - setPageTitle(getScenarioName()); } finally { setLoading(false); } }; fetchScenarioData(); - }, [scenarioId, getScenarioName]); - - // 更新页面标题 - useEffect(() => { - setPageTitle(getScenarioName()); - }, [getScenarioName]); + }, [scenarioId]); const handleCopyPlan = async (taskId: string) => { const taskToCopy = tasks.find((task) => task.id === taskId); @@ -362,7 +344,7 @@ const ScenarioList: React.FC = () => { {pageTitle}} + left={
{scenarioName}
} right={