From 5ff15472f54fbbc4d22067743753da332e41f11f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AC=94=E8=AE=B0=E6=9C=AC=E9=87=8C=E7=9A=84=E6=B0=B8?= =?UTF-8?q?=E5=B9=B3?= Date: Mon, 7 Jul 2025 17:08:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9C=AC=E6=AC=A1=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=86=85=E5=AE=B9=E5=A6=82=E4=B8=8B=20?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E8=8E=B7=E5=AE=A2=E5=88=97=E8=A1=A8=E6=90=9E?= =?UTF-8?q?=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cunkebao/.babelrc | 3 + Cunkebao/.gitignore | 2 - Cunkebao/app/admin/accounts/mobile/page.tsx | 250 + .../app/admin/accounts/operators/page.tsx | 197 + .../app/admin/components/AdminSidebar.tsx | 88 + Cunkebao/app/admin/layout.tsx | 28 + Cunkebao/app/admin/page.tsx | 66 + .../api/acquisition/[planId]/orders/route.ts | 1 - Cunkebao/app/api/auth.ts | 1 - Cunkebao/app/api/devices/route.ts | 1 - .../docs/scenarios/[channel]/[id]/page.tsx | 377 ++ Cunkebao/app/api/scenarios/route.ts | 1 - Cunkebao/app/api/users/route.ts | 1 - Cunkebao/app/clientLayout.tsx | 34 +- Cunkebao/app/components-demo/loading.tsx | 34 + Cunkebao/app/components-demo/page.tsx | 493 ++ Cunkebao/app/components-docs/loading.tsx | 32 + Cunkebao/app/components-docs/page.tsx | 375 ++ Cunkebao/app/components/AIRewriteModal.tsx | 1 - Cunkebao/app/components/AdaptiveLayout.tsx | 22 + Cunkebao/app/components/ApiTester.tsx | 80 + Cunkebao/app/components/AuthProvider.tsx | 236 +- Cunkebao/app/components/BindDouyinQRCode.tsx | 1 - Cunkebao/app/components/BottomNav.tsx | 63 +- Cunkebao/app/components/Charts.tsx | 1 - Cunkebao/app/components/ChatMessage.tsx | 1 - .../components/CircleSync/ContentSelector.tsx | 1 - .../components/CircleSync/DeviceSelector.tsx | 1 - .../app/components/CircleSync/TaskSetup.tsx | 1 - Cunkebao/app/components/DeviceSelector.tsx | 10 +- Cunkebao/app/components/ErrorBoundary.tsx | 1 - Cunkebao/app/components/FileUploader.tsx | 1 - Cunkebao/app/components/LayoutWrapper.tsx | 58 +- Cunkebao/app/components/LoginErrorHandler.tsx | 68 + Cunkebao/app/components/SideNav.tsx | 6 + .../app/components/SpeechToTextProcessor.tsx | 1 - .../app/components/TrafficTeamSettings.tsx | 1 - .../app/components/VideoTutorialButton.tsx | 63 + Cunkebao/app/components/VoiceRecognition.tsx | 1 - .../acquisition/AcquisitionPlanChart.tsx | 1 - .../acquisition/DailyAcquisitionChart.tsx | 1 - .../acquisition/DeviceTreeChart.tsx | 1 - .../acquisition/ExpandableAcquisitionCard.tsx | 13 +- .../acquisition/NewAcquisitionPlanForm.tsx | 1 - .../acquisition/ScenarioAcquisitionCard.tsx | 65 +- .../app/components/common/AddDeviceDialog.tsx | 242 + Cunkebao/app/components/common/CardGrid.tsx | 155 + Cunkebao/app/components/common/Charts.tsx | 242 + .../app/components/common/ContentSelector.tsx | 287 ++ Cunkebao/app/components/common/DataTable.tsx | 363 ++ .../app/components/common/DeviceFilter.tsx | 320 ++ .../app/components/common/DeviceSelector.tsx | 537 +++ .../app/components/common/FileUploader.tsx | 373 ++ Cunkebao/app/components/common/FormLayout.tsx | 207 + Cunkebao/app/components/common/LazyLoad.tsx | 137 + .../components/common/NotificationSystem.tsx | 182 + Cunkebao/app/components/common/PageHeader.tsx | 59 + .../app/components/common/SearchFilter.tsx | 169 + Cunkebao/app/components/common/StatCard.tsx | 76 + Cunkebao/app/components/common/TagManager.tsx | 193 + .../app/components/common/VirtualizedList.tsx | 110 + Cunkebao/app/components/common/Wizard.tsx | 243 + Cunkebao/app/components/device-grid.tsx | 335 +- .../components/device-selection-dialog.tsx | 280 +- Cunkebao/app/components/poster-selector.tsx | 14 +- .../app/components/traffic-pool-selector.tsx | 375 +- Cunkebao/app/components/ui/accordion.tsx | 1 - Cunkebao/app/components/ui/avatar.tsx | 1 - Cunkebao/app/components/ui/badge.tsx | 2 +- Cunkebao/app/components/ui/button.tsx | 1 - Cunkebao/app/components/ui/calendar.tsx | 1 - Cunkebao/app/components/ui/card.tsx | 1 - Cunkebao/app/components/ui/chart.tsx | 69 + Cunkebao/app/components/ui/checkbox.tsx | 1 - Cunkebao/app/components/ui/collapsible.tsx | 1 - Cunkebao/app/components/ui/dialog.tsx | 1 - Cunkebao/app/components/ui/dropdown-menu.tsx | 1 - Cunkebao/app/components/ui/input.tsx | 1 - Cunkebao/app/components/ui/label.tsx | 1 - Cunkebao/app/components/ui/pagination.tsx | 1 - Cunkebao/app/components/ui/popover.tsx | 1 - Cunkebao/app/components/ui/preview-dialog.tsx | 1 - Cunkebao/app/components/ui/progress.tsx | 1 - Cunkebao/app/components/ui/radio-group.tsx | 1 - Cunkebao/app/components/ui/scroll-area.tsx | 1 - Cunkebao/app/components/ui/select.tsx | 1 - Cunkebao/app/components/ui/skeleton.tsx | 1 - Cunkebao/app/components/ui/step-indicator.tsx | 157 + Cunkebao/app/components/ui/steps.tsx | 1 - Cunkebao/app/components/ui/switch.tsx | 1 - Cunkebao/app/components/ui/table.tsx | 1 - Cunkebao/app/components/ui/tabs.tsx | 1 - Cunkebao/app/components/ui/textarea.tsx | 1 - Cunkebao/app/components/ui/toast.tsx | 1 - Cunkebao/app/components/ui/tooltip.tsx | 3 +- Cunkebao/app/components/ui/use-toast.ts | 1 - .../app/content/[id]/materials/new/page.tsx | 442 +- Cunkebao/app/content/[id]/materials/page.tsx | 515 +- Cunkebao/app/content/[id]/page.tsx | 1 - Cunkebao/app/content/loading.tsx | 3 + Cunkebao/app/content/new/device-selector.tsx | 1 - Cunkebao/app/content/new/page.tsx | 430 +- .../app/content/new/steps/basic-settings.tsx | 150 + .../content/new/steps/content-settings.tsx | 150 + .../app/content/new/steps/preview-confirm.tsx | 244 + .../content/new/steps/source-selection.tsx | 259 + .../app/content/new/steps/tag-settings.tsx | 151 + Cunkebao/app/content/page.tsx | 443 +- Cunkebao/app/devices/[id]/page.tsx | 1139 ++--- Cunkebao/app/devices/loading.tsx | 3 + Cunkebao/app/devices/page.tsx | 1403 +++--- Cunkebao/app/globals.css | 162 +- Cunkebao/app/hooks/useDeviceStatusPolling.ts | 97 +- Cunkebao/app/layout.tsx | 41 +- Cunkebao/app/lib/date-utils.ts | 33 + Cunkebao/app/lib/toast.ts | 22 + Cunkebao/app/lib/utils.ts | 22 + Cunkebao/app/login/page.tsx | 437 +- Cunkebao/app/orders/submit/[planId]/page.tsx | 1 - Cunkebao/app/page.tsx | 332 +- Cunkebao/app/profile/devices/loading.tsx | 3 + Cunkebao/app/profile/devices/page.tsx | 371 ++ Cunkebao/app/profile/page.tsx | 250 +- .../app/scenarios/[channel]/devices/page.tsx | 2 +- .../scenarios/[channel]/edit/[id]/page.tsx | 168 +- Cunkebao/app/scenarios/[channel]/page.tsx | 781 +-- Cunkebao/app/scenarios/api/route.ts | 5 + Cunkebao/app/scenarios/douyin/page.tsx | 2 +- .../app/scenarios/haibao/edit/[id]/page.tsx | 8 +- Cunkebao/app/scenarios/new/page.tsx | 342 +- .../new/steps/TrafficChannelSettings | 209 + Cunkebao/app/scenarios/page.tsx | 326 +- .../scenarios/payment/[id]/payments/page.tsx | 4 +- Cunkebao/app/scenarios/payment/stats/page.tsx | 10 +- .../app/scenarios/phone/new/basic/page.tsx | 3 +- Cunkebao/app/scenarios/phone/page.tsx | 2 +- Cunkebao/app/scenarios/weixinqun/page.tsx | 2 +- .../components/analytics-dashboard.tsx | 311 ++ .../components/date-range-picker.tsx | 1 - .../components/multi-device-selector.tsx | 309 ++ .../components/pool-management.tsx | 420 ++ .../components/pool-usage-chart.tsx | 1 - Cunkebao/app/traffic-pool/loading.tsx | 1 - Cunkebao/app/traffic-pool/page.tsx | 2014 +++++--- Cunkebao/app/wechat-accounts/[id]/page.tsx | 1386 +----- Cunkebao/app/wechat-accounts/loading.tsx | 3 + Cunkebao/app/wechat-accounts/page.tsx | 673 ++- .../app/workspace/ai-analyzer/[id]/page.tsx | 1 - .../components/analysis-settings.tsx | 1 - .../components/confirm-analysis.tsx | 1 - .../components/device-selection.tsx | 1 - .../ai-analyzer/components/step-indicator.tsx | 1 - .../create/components/basic-settings.tsx | 1 - .../create/components/target-selection.tsx | 1 - .../app/workspace/ai-analyzer/create/page.tsx | 3 +- .../new/components/basic-settings.tsx | 1 - .../new/components/target-selection.tsx | 1 - .../app/workspace/ai-analyzer/new/page.tsx | 1 - Cunkebao/app/workspace/ai-analyzer/page.tsx | 1 - .../ai-assistant/knowledge-base/page.tsx | 1 - Cunkebao/app/workspace/ai-assistant/page.tsx | 1 - .../app/workspace/ai-strategy/[id]/page.tsx | 1 - .../components/confirm-strategy.tsx | 1 - .../components/execution-setup.tsx | 1 - .../ai-strategy/components/step-indicator.tsx | 1 - .../components/strategy-selection.tsx | 1 - .../components/traffic-pool-selection.tsx | 1 - .../app/workspace/ai-strategy/new/page.tsx | 1 - Cunkebao/app/workspace/ai-strategy/page.tsx | 1 - .../components/StepByStepPlanForm.tsx | 1 - .../components/auto-group-service.ts | 1 - .../auto-group/components/columns.tsx | 1 - .../auto-group/components/data-table.tsx | 1 - .../components/device-selection.tsx | 435 +- .../auto-group/components/device-selector.tsx | 1 - .../auto-group/components/group-assistant.tsx | 1 - .../components/group-creation-progress.tsx | 1 - .../auto-group/components/group-preview.tsx | 1 - .../auto-group/components/group-settings.tsx | 311 +- .../auto-group/components/new-plan-form.tsx | 1 - .../auto-group/components/step-indicator.tsx | 46 +- .../auto-group/components/tag-selection.tsx | 595 +-- .../components/traffic-pool-selector.tsx | 193 + .../components/wechat-account-selector.tsx | 214 +- .../app/workspace/auto-group/new/loading.tsx | 42 + .../app/workspace/auto-group/new/page.tsx | 136 + Cunkebao/app/workspace/auto-group/page.tsx | 139 +- .../auto-like/components/basic-settings.tsx | 85 +- .../components/device-selection-dialog.tsx | 195 +- .../auto-like/components/like-config.tsx | 1 - .../auto-like/components/tag-selector.tsx | 8 + .../auto-like/components/time-settings.tsx | 1 - Cunkebao/app/workspace/auto-like/new/page.tsx | 117 +- Cunkebao/app/workspace/auto-like/page.tsx | 373 +- .../workspace/group-push/[id]/edit/page.tsx | 314 +- .../group-push/components/basic-settings.tsx | 19 +- .../components/content-selector.tsx | 101 +- .../group-push/components/friend-selector.tsx | 1 - .../group-push/components/group-selector.tsx | 225 +- .../group-push/components/message-editor.tsx | 1 - .../group-push/components/step-indicator.tsx | 1 - Cunkebao/app/workspace/group-push/loading.tsx | 1 - .../app/workspace/group-push/new/loading.tsx | 1 - .../app/workspace/group-push/new/page.tsx | 38 +- Cunkebao/app/workspace/group-push/page.tsx | 242 +- .../group-sync/auto-group/loading.tsx | 1 - .../workspace/group-sync/auto-group/page.tsx | 3 +- .../components/auto-group-creator.tsx | 1 - .../components/content-selector.tsx | 1 - .../group-sync/components/group-selector.tsx | 1 - .../group-sync/components/step-indicator.tsx | 1 - Cunkebao/app/workspace/group-sync/loading.tsx | 1 - .../app/workspace/group-sync/new/loading.tsx | 1 - .../app/workspace/group-sync/new/page.tsx | 48 +- Cunkebao/app/workspace/group-sync/page.tsx | 1 - .../workspace/moments-sync/[id]/edit/page.tsx | 154 +- .../moments-sync/[id]/edit/step-indicator.tsx | 1 - .../[id]/edit/steps/basic-settings.tsx | 1 - .../edit/steps/content-library-selection.tsx | 1 - .../[id]/edit/steps/device-selection.tsx | 1 - .../app/workspace/moments-sync/[id]/page.tsx | 520 +- .../workspace/moments-sync/[id]/view/page.tsx | 1 - .../components/basic-settings.tsx | 191 +- .../components/content-selector.tsx | 17 + .../components/content-viewer.tsx | 1 - .../components/device-selection-dialog.tsx | 195 +- .../components/step-indicator.tsx | 1 - .../moments-sync/components/tag-editor.tsx | 1 - .../app/workspace/moments-sync/new/page.tsx | 111 +- .../new/steps/ContentSelector.tsx | 1 - Cunkebao/app/workspace/moments-sync/page.tsx | 408 +- Cunkebao/app/workspace/page.tsx | 346 +- .../app/workspace/pricing/edit/[id]/page.tsx | 1 - Cunkebao/app/workspace/pricing/new/page.tsx | 1 - Cunkebao/app/workspace/pricing/page.tsx | 1 - .../traffic-distribution/[id]/edit/page.tsx | 296 +- .../traffic-distribution/[id]/page.tsx | 57 +- .../new/components/basic-info-step.tsx | 188 +- .../new/components/target-settings-step.tsx | 275 +- .../new/components/traffic-pool-step.tsx | 203 +- .../traffic-distribution/new/page.tsx | 137 +- .../workspace/traffic-distribution/page.tsx | 425 +- .../app/workspace/traffic-pricing/loading.tsx | 1 - .../app/workspace/traffic-pricing/page.tsx | 1 - Cunkebao/app/开发文档.md | 197 + Cunkebao/components/ui/accordion.tsx | 20 +- Cunkebao/components/ui/avatar.tsx | 19 +- Cunkebao/components/ui/badge.tsx | 25 +- Cunkebao/components/ui/button.tsx | 48 +- Cunkebao/components/ui/calendar.tsx | 40 +- Cunkebao/components/ui/card.tsx | 87 +- Cunkebao/components/ui/checkbox.tsx | 15 +- Cunkebao/components/ui/dialog.tsx | 50 +- Cunkebao/components/ui/dropdown-menu.tsx | 63 +- Cunkebao/components/ui/input.tsx | 31 +- Cunkebao/components/ui/label.tsx | 16 +- Cunkebao/components/ui/pagination.tsx | 75 +- Cunkebao/components/ui/popover.tsx | 5 +- Cunkebao/components/ui/progress.tsx | 8 +- Cunkebao/components/ui/radio-group.tsx | 19 +- Cunkebao/components/ui/scroll-area.tsx | 21 +- Cunkebao/components/ui/select.tsx | 88 +- Cunkebao/components/ui/slider.tsx | 6 +- Cunkebao/components/ui/switch.tsx | 9 +- Cunkebao/components/ui/table.tsx | 149 +- Cunkebao/components/ui/tabs.tsx | 13 +- Cunkebao/components/ui/textarea.tsx | 12 +- Cunkebao/components/ui/toast.tsx | 129 + Cunkebao/components/ui/tooltip.tsx | 27 +- Cunkebao/components/ui/use-toast.ts | 17 +- Cunkebao/docs/API对接指南.md | 180 + Cunkebao/docs/README.md | 29 + Cunkebao/docs/api-guide.tsx | 413 ++ Cunkebao/docs/home/README.md | 10 + Cunkebao/docs/home/data-overview.md | 28 + Cunkebao/docs/home/quick-access.md | 29 + Cunkebao/docs/home/recent-activities.md | 31 + Cunkebao/docs/scenarios/README.md | 11 + Cunkebao/docs/scenarios/douyin-acquisition.md | 44 + Cunkebao/docs/scenarios/new-scenario.md | 47 + Cunkebao/docs/scenarios/phone-acquisition.md | 44 + Cunkebao/docs/scenarios/poster-acquisition.md | 44 + Cunkebao/docs/workspace/README.md | 16 + Cunkebao/docs/workspace/auto-group.md | 47 + Cunkebao/docs/workspace/auto-like.md | 45 + Cunkebao/docs/workspace/group-push.md | 46 + Cunkebao/docs/workspace/group-sync.md | 46 + Cunkebao/docs/workspace/moments-sync.md | 44 + .../docs/workspace/traffic-distribution.md | 64 + Cunkebao/hooks/use-debounce.ts | 1 - Cunkebao/hooks/use-mobile.tsx | 33 +- Cunkebao/hooks/use-toast.ts | 12 +- Cunkebao/hooks/useDeviceStatusPolling.ts | 70 +- Cunkebao/lib/actions/auth-actions.ts | 30 + Cunkebao/lib/api/auth.ts | 261 +- Cunkebao/lib/api/client.ts | 244 + Cunkebao/lib/api/config.ts | 132 + Cunkebao/lib/api/content.ts | 275 +- Cunkebao/lib/api/dashboard.ts | 150 + Cunkebao/lib/api/devices.ts | 321 +- Cunkebao/lib/api/github-integration.ts | 98 + Cunkebao/lib/api/index.ts | 1 - Cunkebao/lib/api/scenarios-mobile.ts | 305 ++ Cunkebao/lib/api/scenarios.ts | 271 +- Cunkebao/lib/api/traffic.ts | 247 +- Cunkebao/lib/api/users.ts | 1 - Cunkebao/lib/api/wechat.ts | 186 + Cunkebao/lib/api/workspace.ts | 579 ++- Cunkebao/lib/migration/github-adapter.ts | 232 + Cunkebao/lib/migration/integration-checker.ts | 351 ++ Cunkebao/lib/migration/migration-guide.ts | 247 + Cunkebao/lib/tutorials.ts | 1 - Cunkebao/lib/utils.ts | 34 +- Cunkebao/next.config.mjs | 172 +- Cunkebao/package.json | 54 +- Cunkebao/pnpm-lock.yaml | 4169 +---------------- Cunkebao/public/device-management-design.png | Bin 0 -> 419100 bytes Cunkebao/public/diverse-avatars.png | Bin 0 -> 681174 bytes Cunkebao/public/diverse-group-avatars.png | Bin 0 -> 442826 bytes Cunkebao/public/interface-design.png | Bin 0 -> 98323 bytes Cunkebao/public/mobile-device-management.png | Bin 0 -> 129624 bytes .../public/mobile-traffic-pool-design.png | Bin 0 -> 187800 bytes Cunkebao/public/placeholder-logo.png | Bin 958 -> 568 bytes Cunkebao/public/placeholder-user.jpg | Bin 2615 -> 1635 bytes Cunkebao/public/placeholder.jpg | Bin 1596 -> 1064 bytes Cunkebao/public/profile-design.png | Bin 0 -> 166755 bytes Cunkebao/public/profile-functions.png | Bin 0 -> 81228 bytes Cunkebao/public/scenario-cards.png | Bin 0 -> 79740 bytes Cunkebao/public/wechat-detail.png | Bin 0 -> 31166 bytes Cunkebao/public/wechat-management-design.png | Bin 0 -> 671613 bytes Cunkebao/public/workspace-design.png | Bin 0 -> 195534 bytes Cunkebao/public/workspace-stats.png | Bin 0 -> 42930 bytes Cunkebao/public/场景获客.png | Bin 0 -> 565198 bytes Cunkebao/scripts/api-test.sh | 96 + Cunkebao/scripts/migration-setup.sh | 279 ++ Cunkebao/styles/globals.css | 71 +- Cunkebao/tailwind.config.js | 2 +- Cunkebao/tsconfig.json | 1 - Cunkebao/types/acquisition.ts | 1 - Cunkebao/types/auto-group.ts | 1 - Cunkebao/types/common.ts | 1 - Cunkebao/types/content-library.ts | 28 - Cunkebao/types/content.ts | 1 - Cunkebao/types/device.ts | 59 +- Cunkebao/types/group-push.ts | 1 - Cunkebao/types/group-sync.ts | 1 - Cunkebao/types/scenario.ts | 1 - Cunkebao/types/traffic.ts | 1 - Cunkebao/types/tutorial.ts | 1 - Cunkebao/yarn.lock | 1563 +++--- nkebao/src/pages/scenarios/Scenarios.tsx | 230 +- .../gongzhonghao/GongzhonghaoScenario.tsx | 1 + 352 files changed, 24040 insertions(+), 18575 deletions(-) create mode 100644 Cunkebao/.babelrc create mode 100644 Cunkebao/app/admin/accounts/mobile/page.tsx create mode 100644 Cunkebao/app/admin/accounts/operators/page.tsx create mode 100644 Cunkebao/app/admin/components/AdminSidebar.tsx create mode 100644 Cunkebao/app/admin/layout.tsx create mode 100644 Cunkebao/app/admin/page.tsx create mode 100644 Cunkebao/app/api/docs/scenarios/[channel]/[id]/page.tsx create mode 100644 Cunkebao/app/components-demo/loading.tsx create mode 100644 Cunkebao/app/components-demo/page.tsx create mode 100644 Cunkebao/app/components-docs/loading.tsx create mode 100644 Cunkebao/app/components-docs/page.tsx create mode 100644 Cunkebao/app/components/AdaptiveLayout.tsx create mode 100644 Cunkebao/app/components/ApiTester.tsx create mode 100644 Cunkebao/app/components/LoginErrorHandler.tsx create mode 100644 Cunkebao/app/components/SideNav.tsx create mode 100644 Cunkebao/app/components/VideoTutorialButton.tsx create mode 100644 Cunkebao/app/components/common/AddDeviceDialog.tsx create mode 100644 Cunkebao/app/components/common/CardGrid.tsx create mode 100644 Cunkebao/app/components/common/Charts.tsx create mode 100644 Cunkebao/app/components/common/ContentSelector.tsx create mode 100644 Cunkebao/app/components/common/DataTable.tsx create mode 100644 Cunkebao/app/components/common/DeviceFilter.tsx create mode 100644 Cunkebao/app/components/common/DeviceSelector.tsx create mode 100644 Cunkebao/app/components/common/FileUploader.tsx create mode 100644 Cunkebao/app/components/common/FormLayout.tsx create mode 100644 Cunkebao/app/components/common/LazyLoad.tsx create mode 100644 Cunkebao/app/components/common/NotificationSystem.tsx create mode 100644 Cunkebao/app/components/common/PageHeader.tsx create mode 100644 Cunkebao/app/components/common/SearchFilter.tsx create mode 100644 Cunkebao/app/components/common/StatCard.tsx create mode 100644 Cunkebao/app/components/common/TagManager.tsx create mode 100644 Cunkebao/app/components/common/VirtualizedList.tsx create mode 100644 Cunkebao/app/components/common/Wizard.tsx create mode 100644 Cunkebao/app/components/ui/chart.tsx create mode 100644 Cunkebao/app/components/ui/step-indicator.tsx create mode 100644 Cunkebao/app/content/loading.tsx create mode 100644 Cunkebao/app/content/new/steps/basic-settings.tsx create mode 100644 Cunkebao/app/content/new/steps/content-settings.tsx create mode 100644 Cunkebao/app/content/new/steps/preview-confirm.tsx create mode 100644 Cunkebao/app/content/new/steps/source-selection.tsx create mode 100644 Cunkebao/app/content/new/steps/tag-settings.tsx create mode 100644 Cunkebao/app/devices/loading.tsx create mode 100644 Cunkebao/app/lib/date-utils.ts create mode 100644 Cunkebao/app/lib/toast.ts create mode 100644 Cunkebao/app/profile/devices/loading.tsx create mode 100644 Cunkebao/app/profile/devices/page.tsx create mode 100644 Cunkebao/app/scenarios/api/route.ts create mode 100644 Cunkebao/app/scenarios/new/steps/TrafficChannelSettings create mode 100644 Cunkebao/app/traffic-pool/components/analytics-dashboard.tsx create mode 100644 Cunkebao/app/traffic-pool/components/multi-device-selector.tsx create mode 100644 Cunkebao/app/traffic-pool/components/pool-management.tsx create mode 100644 Cunkebao/app/wechat-accounts/loading.tsx create mode 100644 Cunkebao/app/workspace/auto-group/components/traffic-pool-selector.tsx create mode 100644 Cunkebao/app/workspace/auto-group/new/loading.tsx create mode 100644 Cunkebao/app/workspace/auto-group/new/page.tsx create mode 100644 Cunkebao/app/workspace/moments-sync/components/content-selector.tsx create mode 100644 Cunkebao/app/开发文档.md create mode 100644 Cunkebao/components/ui/toast.tsx create mode 100644 Cunkebao/docs/API对接指南.md create mode 100644 Cunkebao/docs/README.md create mode 100644 Cunkebao/docs/api-guide.tsx create mode 100644 Cunkebao/docs/home/README.md create mode 100644 Cunkebao/docs/home/data-overview.md create mode 100644 Cunkebao/docs/home/quick-access.md create mode 100644 Cunkebao/docs/home/recent-activities.md create mode 100644 Cunkebao/docs/scenarios/README.md create mode 100644 Cunkebao/docs/scenarios/douyin-acquisition.md create mode 100644 Cunkebao/docs/scenarios/new-scenario.md create mode 100644 Cunkebao/docs/scenarios/phone-acquisition.md create mode 100644 Cunkebao/docs/scenarios/poster-acquisition.md create mode 100644 Cunkebao/docs/workspace/README.md create mode 100644 Cunkebao/docs/workspace/auto-group.md create mode 100644 Cunkebao/docs/workspace/auto-like.md create mode 100644 Cunkebao/docs/workspace/group-push.md create mode 100644 Cunkebao/docs/workspace/group-sync.md create mode 100644 Cunkebao/docs/workspace/moments-sync.md create mode 100644 Cunkebao/docs/workspace/traffic-distribution.md create mode 100644 Cunkebao/lib/actions/auth-actions.ts create mode 100644 Cunkebao/lib/api/client.ts create mode 100644 Cunkebao/lib/api/config.ts create mode 100644 Cunkebao/lib/api/dashboard.ts create mode 100644 Cunkebao/lib/api/github-integration.ts create mode 100644 Cunkebao/lib/api/scenarios-mobile.ts create mode 100644 Cunkebao/lib/api/wechat.ts create mode 100644 Cunkebao/lib/migration/github-adapter.ts create mode 100644 Cunkebao/lib/migration/integration-checker.ts create mode 100644 Cunkebao/lib/migration/migration-guide.ts create mode 100644 Cunkebao/public/device-management-design.png create mode 100644 Cunkebao/public/diverse-avatars.png create mode 100644 Cunkebao/public/diverse-group-avatars.png create mode 100644 Cunkebao/public/interface-design.png create mode 100644 Cunkebao/public/mobile-device-management.png create mode 100644 Cunkebao/public/mobile-traffic-pool-design.png create mode 100644 Cunkebao/public/profile-design.png create mode 100644 Cunkebao/public/profile-functions.png create mode 100644 Cunkebao/public/scenario-cards.png create mode 100644 Cunkebao/public/wechat-detail.png create mode 100644 Cunkebao/public/wechat-management-design.png create mode 100644 Cunkebao/public/workspace-design.png create mode 100644 Cunkebao/public/workspace-stats.png create mode 100644 Cunkebao/public/场景获客.png create mode 100644 Cunkebao/scripts/api-test.sh create mode 100644 Cunkebao/scripts/migration-setup.sh diff --git a/Cunkebao/.babelrc b/Cunkebao/.babelrc new file mode 100644 index 000000000..1ff94f7ed --- /dev/null +++ b/Cunkebao/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["next/babel"] +} diff --git a/Cunkebao/.gitignore b/Cunkebao/.gitignore index e39c24cf6..f650315f3 100644 --- a/Cunkebao/.gitignore +++ b/Cunkebao/.gitignore @@ -7,8 +7,6 @@ /.next/ /out/ -/.history/ - # production /build diff --git a/Cunkebao/app/admin/accounts/mobile/page.tsx b/Cunkebao/app/admin/accounts/mobile/page.tsx new file mode 100644 index 000000000..69b99964b --- /dev/null +++ b/Cunkebao/app/admin/accounts/mobile/page.tsx @@ -0,0 +1,250 @@ +"use client" + +import { useState } from "react" +import { Pencil, Trash2, Plus } from "lucide-react" +import { Button } from "@/components/ui/button" +import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table" +import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog" +import { Input } from "@/components/ui/input" +import { Label } from "@/components/ui/label" +import { Checkbox } from "@/components/ui/checkbox" +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select" +import { Badge } from "@/components/ui/badge" + +interface MobileAccount { + id: string + name: string + phone: string + createdAt: string + status: "active" | "inactive" +} + +export default function MobileAccountsPage() { + const [accounts, setAccounts] = useState([ + { + id: "1", + name: "用户1", + phone: "13809076043", + createdAt: "2023-01-15", + status: "active", + }, + { + id: "2", + name: "用户2", + phone: "13819176143", + createdAt: "2023-02-15", + status: "inactive", + }, + { + id: "3", + name: "用户3", + phone: "13829276243", + createdAt: "2023-03-15", + status: "active", + }, + { + id: "4", + name: "用户4", + phone: "13839376343", + createdAt: "2023-04-15", + status: "inactive", + }, + { + id: "5", + name: "用户5", + phone: "13849476443", + createdAt: "2023-05-15", + status: "active", + }, + ]) + + const [isDialogOpen, setIsDialogOpen] = useState(false) + const [newAccount, setNewAccount] = useState({ + name: "", + password: "", + phone: "", + role: "", + permissions: { + notifications: false, + dataView: false, + remoteControl: false, + }, + }) + + const handleCreateAccount = () => { + // 这里应该有API调用来创建账号 + const newId = (accounts.length + 1).toString() + setAccounts([ + ...accounts, + { + id: newId, + name: newAccount.name, + phone: newAccount.phone, + createdAt: new Date().toISOString().split("T")[0], + status: "active", + }, + ]) + setIsDialogOpen(false) + setNewAccount({ + name: "", + password: "", + phone: "", + role: "", + permissions: { + notifications: false, + dataView: false, + remoteControl: false, + }, + }) + } + + const handleDeleteAccount = (id: string) => { + setAccounts(accounts.filter((account) => account.id !== id)) + } + + return ( +
+
+

手机端账号列表

+ +
+ +
+ + + + 账号名称 + 手机号码 + 创建时间 + 状态 + 操作 + + + + {accounts.map((account) => ( + + {account.name} + {account.phone} + {account.createdAt} + + + {account.status === "active" ? "活跃" : "非活跃"} + + + + + + + + ))} + +
+
+ + + + + 新增手机端账号 + +
+
+ + setNewAccount({ ...newAccount, name: e.target.value })} + placeholder="请输入账号名称" + /> +
+
+ + setNewAccount({ ...newAccount, password: e.target.value })} + placeholder="请输入初始密码" + /> +
+
+ + setNewAccount({ ...newAccount, phone: e.target.value })} + placeholder="请输入手机号码" + /> +
+
+ + +
+
+ +
+
+ + setNewAccount({ + ...newAccount, + permissions: { ...newAccount.permissions, notifications: !!checked }, + }) + } + /> + +
+
+ + setNewAccount({ + ...newAccount, + permissions: { ...newAccount.permissions, dataView: !!checked }, + }) + } + /> + +
+
+ + setNewAccount({ + ...newAccount, + permissions: { ...newAccount.permissions, remoteControl: !!checked }, + }) + } + /> + +
+
+
+
+
+ +
+
+
+
+ ) +} diff --git a/Cunkebao/app/admin/accounts/operators/page.tsx b/Cunkebao/app/admin/accounts/operators/page.tsx new file mode 100644 index 000000000..30f695c2f --- /dev/null +++ b/Cunkebao/app/admin/accounts/operators/page.tsx @@ -0,0 +1,197 @@ +"use client" + +import { useState } from "react" +import { Pencil, Trash2, Plus } from "lucide-react" +import { Button } from "@/components/ui/button" +import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table" +import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog" +import { Input } from "@/components/ui/input" +import { Label } from "@/components/ui/label" +import { Badge } from "@/components/ui/badge" + +interface OperatorAccount { + id: string + phone: string + nickname: string + deviceCount: number + friendCount: number + createdAt: string + status: "active" | "inactive" +} + +export default function OperatorAccountsPage() { + const [accounts, setAccounts] = useState([ + { + id: "1", + phone: "13809076043", + nickname: "操盘手1", + deviceCount: 1, + friendCount: 25, + createdAt: "2023-01-15", + status: "active", + }, + { + id: "2", + phone: "13819176143", + nickname: "操盘手2", + deviceCount: 2, + friendCount: 50, + createdAt: "2023-02-15", + status: "inactive", + }, + { + id: "3", + phone: "13829276243", + nickname: "操盘手3", + deviceCount: 3, + friendCount: 75, + createdAt: "2023-03-15", + status: "active", + }, + { + id: "4", + phone: "13839376343", + nickname: "操盘手4", + deviceCount: 4, + friendCount: 100, + createdAt: "2023-04-15", + status: "inactive", + }, + { + id: "5", + phone: "13849476443", + nickname: "操盘手5", + deviceCount: 5, + friendCount: 125, + createdAt: "2023-05-15", + status: "active", + }, + ]) + + const [isDialogOpen, setIsDialogOpen] = useState(false) + const [newAccount, setNewAccount] = useState({ + phone: "", + nickname: "", + password: "", + }) + + const handleCreateAccount = () => { + // 这里应该有API调用来创建账号 + const newId = (accounts.length + 1).toString() + setAccounts([ + ...accounts, + { + id: newId, + phone: newAccount.phone, + nickname: newAccount.nickname, + deviceCount: 0, + friendCount: 0, + createdAt: new Date().toISOString().split("T")[0], + status: "active", + }, + ]) + setIsDialogOpen(false) + setNewAccount({ + phone: "", + nickname: "", + password: "", + }) + } + + const handleDeleteAccount = (id: string) => { + setAccounts(accounts.filter((account) => account.id !== id)) + } + + return ( +
+
+

操盘手账号列表

+ +
+ +
+ + + + 登录手机号 + 备注 (昵称) + 关联设备数量 + 微信好友数量 + 创建时间 + 状态 + 操作 + + + + {accounts.map((account) => ( + + {account.phone} + {account.nickname} + {account.deviceCount} + {account.friendCount} + {account.createdAt} + + + {account.status === "active" ? "活跃" : "非活跃"} + + + + + + + + ))} + +
+
+ + + + + 新增操盘手账号 + +
+
+ + setNewAccount({ ...newAccount, phone: e.target.value })} + placeholder="请输入手机号" + /> +
+
+ + setNewAccount({ ...newAccount, nickname: e.target.value })} + placeholder="请输入昵称" + /> +
+
+ + setNewAccount({ ...newAccount, password: e.target.value })} + placeholder="请输入初始密码" + /> +
+
+
+ +
+
+
+
+ ) +} diff --git a/Cunkebao/app/admin/components/AdminSidebar.tsx b/Cunkebao/app/admin/components/AdminSidebar.tsx new file mode 100644 index 000000000..52dba01a1 --- /dev/null +++ b/Cunkebao/app/admin/components/AdminSidebar.tsx @@ -0,0 +1,88 @@ +"use client" + +import { useState } from "react" +import Link from "next/link" +import { usePathname } from "next/navigation" +import { ChevronDown, Users, MessageSquare } from "lucide-react" + +export default function AdminSidebar() { + const pathname = usePathname() + const [expandedItems, setExpandedItems] = useState>({ + 账号管理: true, + }) + + const toggleExpand = (key: string) => { + setExpandedItems((prev) => ({ + ...prev, + [key]: !prev[key], + })) + } + + const isActive = (path: string) => pathname === path + + return ( +
+
+

存客宝管理系统

+
+ +
+ ) +} diff --git a/Cunkebao/app/admin/layout.tsx b/Cunkebao/app/admin/layout.tsx new file mode 100644 index 000000000..6b21f7179 --- /dev/null +++ b/Cunkebao/app/admin/layout.tsx @@ -0,0 +1,28 @@ +"use client" + +import type React from "react" +import { Bell, User } from "lucide-react" +import { Button } from "@/components/ui/button" +import AdminSidebar from "./components/AdminSidebar" + +export default function AdminLayout({ children }: { children: React.ReactNode }) { + return ( +
+ +
+
+

运营端后台

+
+ + +
+
+
{children}
+
+
+ ) +} diff --git a/Cunkebao/app/admin/page.tsx b/Cunkebao/app/admin/page.tsx new file mode 100644 index 000000000..4ace7fdce --- /dev/null +++ b/Cunkebao/app/admin/page.tsx @@ -0,0 +1,66 @@ +"use client" + +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" +import { Button } from "@/components/ui/button" +import { ArrowRight } from "lucide-react" +import Link from "next/link" + +export default function AdminDashboard() { + const stats = [ + { title: "总账号数", value: "42" }, + { title: "手机端账号", value: "28" }, + { title: "操盘手账号", value: "14" }, + { title: "今日活跃", value: "18" }, + ] + + return ( +
+

存客宝管理后台

+ +
+ {stats.map((stat, index) => ( + + + {stat.title} + + +

{stat.value}

+
+
+ ))} +
+ +
+ + + 手机端账号管理 + + +

管理存客宝手机端的用户账号,设置权限和功能。

+ + + +
+
+ + + + 操盘手账号管理 + + +

管理操盘手账号,查看关联设备和微信好友数量。

+ + + +
+
+
+
+ ) +} diff --git a/Cunkebao/app/api/acquisition/[planId]/orders/route.ts b/Cunkebao/app/api/acquisition/[planId]/orders/route.ts index 57754319b..08bc6bc4f 100644 --- a/Cunkebao/app/api/acquisition/[planId]/orders/route.ts +++ b/Cunkebao/app/api/acquisition/[planId]/orders/route.ts @@ -17,4 +17,3 @@ export async function POST(request: Request, { params }: { params: { planId: str return NextResponse.json({ success: false, message: "订单提交失败" }, { status: 500 }) } } - diff --git a/Cunkebao/app/api/auth.ts b/Cunkebao/app/api/auth.ts index c17c48c59..529d07d2f 100644 --- a/Cunkebao/app/api/auth.ts +++ b/Cunkebao/app/api/auth.ts @@ -66,4 +66,3 @@ export async function publicFetch(url: string, options: RequestInit = {}) { throw error } } - diff --git a/Cunkebao/app/api/devices/route.ts b/Cunkebao/app/api/devices/route.ts index 6de78c121..c7a1de4db 100644 --- a/Cunkebao/app/api/devices/route.ts +++ b/Cunkebao/app/api/devices/route.ts @@ -79,4 +79,3 @@ export async function GET(request: Request) { ) } } - diff --git a/Cunkebao/app/api/docs/scenarios/[channel]/[id]/page.tsx b/Cunkebao/app/api/docs/scenarios/[channel]/[id]/page.tsx new file mode 100644 index 000000000..b37bd496a --- /dev/null +++ b/Cunkebao/app/api/docs/scenarios/[channel]/[id]/page.tsx @@ -0,0 +1,377 @@ +"use client" + +import { useState } from "react" +import { ChevronLeft, Copy, Check, Info } from "lucide-react" +import { Button } from "@/components/ui/button" +import { useRouter } from "next/navigation" +import { useToast } from "@/components/ui/use-toast" +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" +import { getApiGuideForScenario } from "@/docs/api-guide" +import { Badge } from "@/components/ui/badge" +import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion" + +export default function ApiDocPage({ params }: { params: { channel: string; id: string } }) { + const router = useRouter() + const { toast } = useToast() + const [copiedExample, setCopiedExample] = useState(null) + + const apiGuide = getApiGuideForScenario(params.id, params.channel) + + const copyToClipboard = (text: string, exampleId: string) => { + navigator.clipboard.writeText(text) + setCopiedExample(exampleId) + + toast({ + title: "已复制代码", + description: "代码示例已复制到剪贴板", + }) + + setTimeout(() => { + setCopiedExample(null) + }, 2000) + } + + return ( +
+
+
+
+ +
+

{apiGuide.title}

+

API接口文档

+
+
+
+ +
+
+
+ +
+ {/* API密钥卡片 */} + + +
+
+ +
+
+ API密钥 + 用于身份验证,请妥善保管,不要在客户端代码中暴露它 +
+
+
+ +
+
+
+ api_1_xqbint74 + +
+
+ +
+
+ +
+

安全提示

+

+ 请妥善保管您的API密钥,不要在客户端代码中暴露它。建议在服务器端使用该接口。 +

+
+
+
+
+
+
+ + {/* 接口地址卡片 */} + + + 接口地址 + 使用此接口直接导入客户资料到该获客计划,支持多种编程语言 + + +
+
+
+ POST 请求地址 + +
+ + https://kzminfd0rplrm7owmj4b.lite.vusercontent.net/api/scenarios/post + +
+ +
+
+

必要参数

+
+ + name (姓名) + + + phone (电话) + +
+
+
+

可选参数

+
+ + source (来源) + + + remark (备注) + + + tags (标签) + +
+
+
+
+
+
+ + {/* 接口文档卡片 */} + + + 接口文档 + 详细的API规范和集成指南 + + +
+ + +
+
+
+ + {/* 快速测试卡片 */} + + + 快速测试 + 使用以下URL可以快速测试接口是否正常工作 + + +
+
+ 测试URL + +
+ + https://kzminfd0rplrm7owmj4b.lite.vusercontent.net/api/scenarios/poster/1/webhook?name=测试客户&phone=13800138000 + +
+
+

💡 点击上方链接或复制到浏览器中访问,即可快速测试接口连通性

+
+
+
+ + {/* 详细文档手风琴 */} +
+ + {apiGuide.endpoints.map((endpoint, index) => ( + + +
+ {endpoint.method} + {endpoint.url} +
+
+ +
+

{endpoint.description}

+ +
+

请求头

+
+ {endpoint.headers.map((header, i) => ( +
+ + {header.required ? "*" : ""} + {header.name} + +
+

{header.value}

+

{header.description}

+
+
+ ))} +
+
+ +
+

请求参数

+
+ {endpoint.parameters.map((param, i) => ( +
+ + {param.required ? "*" : ""} + {param.name} + +
+

+ {param.type} +

+

{param.description}

+
+
+ ))} +
+
+ +
+

响应示例

+
+                        {JSON.stringify(endpoint.response, null, 2)}
+                      
+
+
+
+
+ ))} +
+
+ + {/* 代码示例 */} + + + 代码示例 + 以下是不同编程语言的接口调用示例 + + + + + {apiGuide.examples.map((example) => ( + + {example.title} + + ))} + + + {apiGuide.examples.map((example) => ( + +
+
{example.code}
+ +
+
+ ))} +
+
+
+ + {/* 集成指南 */} +
+

集成指南

+ + + + 集简云平台集成 + + +
    +
  1. 登录集简云平台
  2. +
  3. 导航至"应用集成" > "外部接口"
  4. +
  5. 选择"添加新接口",输入存客宝接口信息
  6. +
  7. 配置回调参数,将"X-API-KEY"设置为您的API密钥
  8. +
  9. + 设置接口URL为: + {apiGuide.endpoints[0].url} +
  10. +
  11. 映射必要字段(name, phone等)
  12. +
  13. 保存并启用集成
  14. +
+
+
+ + + + 问题排查 + + +
+

接口认证失败

+

+ 请确保X-API-KEY正确无误,此密钥区分大小写。如需重置密钥,请联系管理员。 +

+
+ +
+

数据格式错误

+

+ 确保所有必填字段已提供,并且字段类型正确。特别是电话号码格式需符合标准。 +

+
+ +
+

请求频率限制

+

+ 单个API密钥每分钟最多可发送30个请求,超过限制将被暂时限制。对于大批量数据,请使用批量接口。 +

+
+
+
+
+
+
+ ) +} diff --git a/Cunkebao/app/api/scenarios/route.ts b/Cunkebao/app/api/scenarios/route.ts index f82d21d8b..7b5e7c0a6 100644 --- a/Cunkebao/app/api/scenarios/route.ts +++ b/Cunkebao/app/api/scenarios/route.ts @@ -71,4 +71,3 @@ export async function GET(request: Request) { ) } } - diff --git a/Cunkebao/app/api/users/route.ts b/Cunkebao/app/api/users/route.ts index 31046e372..ace987c7d 100644 --- a/Cunkebao/app/api/users/route.ts +++ b/Cunkebao/app/api/users/route.ts @@ -270,4 +270,3 @@ export async function GET(request: Request) { }, }) } - diff --git a/Cunkebao/app/clientLayout.tsx b/Cunkebao/app/clientLayout.tsx index cb105ad8d..0054c5055 100644 --- a/Cunkebao/app/clientLayout.tsx +++ b/Cunkebao/app/clientLayout.tsx @@ -1,34 +1,13 @@ "use client" import "./globals.css" -import BottomNav from "./components/BottomNav" import "regenerator-runtime/runtime" import type React from "react" import ErrorBoundary from "./components/ErrorBoundary" -import { VideoTutorialButton } from "@/components/VideoTutorialButton" import { AuthProvider } from "@/app/components/AuthProvider" -import { usePathname } from "next/navigation" +import BottomNav from "./components/BottomNav" -// 创建一个包装组件来使用 usePathname hook -function LayoutContent({ children }: { children: React.ReactNode }) { - const pathname = usePathname() - - // 只在主页路径显示底部导航栏 - const showBottomNav = - pathname === "/" || pathname === "/devices" || pathname === "/content" || pathname === "/profile" - - return ( -
-
- {children} - {showBottomNav && } - {showBottomNav && } -
-
- ) -} - -export default function RootLayout({ +export default function ClientLayout({ children, }: { children: React.ReactNode @@ -38,11 +17,16 @@ export default function RootLayout({ - {children} +
+ {children} + {/* 移除条件渲染,确保底部导航始终显示 */} +
+ +
+
) } - diff --git a/Cunkebao/app/components-demo/loading.tsx b/Cunkebao/app/components-demo/loading.tsx new file mode 100644 index 000000000..a69af0209 --- /dev/null +++ b/Cunkebao/app/components-demo/loading.tsx @@ -0,0 +1,34 @@ +import { Card, CardContent, CardHeader } from "@/components/ui/card" + +export default function ComponentsDemoLoading() { + return ( +
+
+
+
+
+ +
+
+ {Array.from({ length: 6 }).map((_, i) => ( +
+ ))} +
+ +
+ {Array.from({ length: 6 }).map((_, i) => ( + + +
+
+ + +
+ + + ))} +
+
+
+ ) +} diff --git a/Cunkebao/app/components-demo/page.tsx b/Cunkebao/app/components-demo/page.tsx new file mode 100644 index 000000000..7d99363fc --- /dev/null +++ b/Cunkebao/app/components-demo/page.tsx @@ -0,0 +1,493 @@ +"use client" + +import type React from "react" +import { useState } from "react" +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" +import { Button } from "@/components/ui/button" +import { Badge } from "@/components/ui/badge" +import { Input } from "@/components/ui/input" +import { Label } from "@/components/ui/label" +import { Textarea } from "@/components/ui/textarea" +import { Switch } from "@/components/ui/switch" +import { Checkbox } from "@/components/ui/checkbox" +import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group" +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select" +import { Progress } from "@/components/ui/progress" +import { Slider } from "@/components/ui/slider" +import { Calendar } from "@/components/ui/calendar" +import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover" +import { + Dialog, + DialogContent, + DialogDescription, + DialogHeader, + DialogTitle, + DialogTrigger, +} from "@/components/ui/dialog" +import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion" +import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" +import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip" +import { ScrollArea } from "@/components/ui/scroll-area" +import { Separator } from "@/components/ui/separator" +import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table" + +import { CalendarIcon, Code, Copy, Check, Smartphone, Users, TrendingUp, Activity } from "lucide-react" + +/** + * 组件库展示页面 + * 展示所有可用的UI组件和自定义组件 + */ +export default function ComponentsDemo() { + return ( +
+
+

存客宝组件库

+

展示项目中所有可用的UI组件和自定义组件,包含使用示例和代码演示

+
+ + + + 基础组件 + 表单组件 + 数据展示 + 反馈组件 + 导航组件 + 自定义组件 + + + {/* 基础组件 */} + + +
+ + + + + + + + +
+
+ + +
+ 默认 + 次要 + 边框 + 危险 + 成功 + 警告 +
+
+ + +
+ + + CN + + + AB + + + XY + +
+
+ + +
+
水平分隔符
+ +
垂直分隔符
+
+ 左侧内容 + + 右侧内容 +
+
+
+
+ + {/* 表单组件 */} + + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+ +