feat: 存储了

This commit is contained in:
许永平
2025-07-05 22:49:50 +08:00
parent 17ec8ecf25
commit 5a981bf038
13 changed files with 593 additions and 114 deletions

View File

@@ -1,6 +1,7 @@
import React, { useEffect, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { Plus, Calendar } from 'lucide-react';
import PageHeader from '@/components/PageHeader';
interface Plan {
id: string;
@@ -98,11 +99,10 @@ export default function Plans() {
if (loading) {
return (
<div className="flex-1 overflow-y-auto pb-20 bg-gray-50">
<header className="sticky top-0 z-10 bg-white border-b">
<div className="flex items-center justify-between p-4">
<h1 className="text-xl font-semibold"></h1>
</div>
</header>
<PageHeader
title="获客计划"
showBack={false}
/>
<div className="flex justify-center items-center h-40">
<div className="text-gray-500">...</div>
</div>
@@ -113,11 +113,10 @@ export default function Plans() {
if (error) {
return (
<div className="flex-1 overflow-y-auto pb-20 bg-gray-50">
<header className="sticky top-0 z-10 bg-white border-b">
<div className="flex items-center justify-between p-4">
<h1 className="text-xl font-semibold"></h1>
</div>
</header>
<PageHeader
title="获客计划"
showBack={false}
/>
<div className="text-red-500 text-center py-8">{error}</div>
</div>
);
@@ -125,9 +124,10 @@ export default function Plans() {
return (
<div className="flex-1 overflow-y-auto pb-20 bg-gray-50">
<header className="sticky top-0 z-10 bg-white border-b">
<div className="flex items-center justify-between p-4">
<h1 className="text-xl font-semibold"></h1>
<PageHeader
title="获客计划"
showBack={false}
rightContent={
<button
onClick={() => navigate('/scenarios/new')}
className="flex items-center px-3 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors text-sm"
@@ -135,8 +135,8 @@ export default function Plans() {
<Plus className="h-4 w-4 mr-1" />
</button>
</div>
</header>
}
/>
<div className="p-4">
{plans.length === 0 ? (