From e91f98ed4b6d683e19d3a84b452ab03b36c1efac Mon Sep 17 00:00:00 2001 From: wong <106998207@qq.com> Date: Wed, 25 Jun 2025 11:39:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=BA=E6=99=AF=E8=8E=B7=E5=AE=A2=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E7=BC=96=E8=BE=91=E4=B8=8D=E8=83=BD=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E4=B8=8B=E4=B8=80=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scenarios/[channel]/edit/[id]/page.tsx | 47 ++----------------- 1 file changed, 4 insertions(+), 43 deletions(-) diff --git a/Cunkebao/app/scenarios/[channel]/edit/[id]/page.tsx b/Cunkebao/app/scenarios/[channel]/edit/[id]/page.tsx index 014d1641..4672b734 100644 --- a/Cunkebao/app/scenarios/[channel]/edit/[id]/page.tsx +++ b/Cunkebao/app/scenarios/[channel]/edit/[id]/page.tsx @@ -112,49 +112,10 @@ export default function EditAcquisitionPlan({ params }: { params: Promise<{ chan } const handleNext = () => { - if (isStepValid()) { - if (currentStep === steps.length) { - handleSave() - } else { - setCurrentStep((prevStep) => Math.min(prevStep + 1, steps.length)) - } - } - } - - const isStepValid = () => { - switch (currentStep) { - case 1: - if (!formData.planName.trim() || formData.posters.length === 0) { - toast({ - title: "请完善信息", - description: "请填写计划名称并选择至少一个账号", - variant: "destructive", - }) - return false - } - return true - case 2: - if (!formData.greeting.trim()) { - toast({ - title: "请完善信息", - description: "请填写好友申请信息", - variant: "destructive", - }) - return false - } - return true - case 3: - if (!formData.messageContent || !formData.messageContent.trim()) { - toast({ - title: "请完善信息", - description: "请填写消息内容", - variant: "destructive", - }) - return false - } - return true - default: - return true + if (currentStep === steps.length) { + handleSave() + } else { + setCurrentStep((prevStep) => Math.min(prevStep + 1, steps.length)) } }