import React, { useState } from 'react'; import { Plus, Layout, Sparkles, Network, GitBranch, ChevronDown, MapPin, Search, User, ShoppingBag, Star, Clock, Flame, Coffee, Pizza, ArrowLeft, SmartphoneIcon, CheckCircle2, ChevronRight, Wallet, Tag, MessageCircle, Settings, ShieldCheck, Package, Bike, FileText, Target, Zap, Lock, Eye } from 'lucide-react'; const App = () => { const [activeTab, setActiveTab] = useState('prototype'); // prototype, flowchart, mindmap, prd const [activePageId, setActivePageId] = useState('home'); // home, orders, profile // 原型模拟数据 const orderList = [ { id: 'OR8823', name: '一食堂·红烧肉专场', status: '配送中', price: '¥18.5', time: '预计 12:20 送达', items: '红烧肉套餐 x1', icon: }, { id: 'OR8812', name: '学霸奶茶铺', status: '已完成', price: '¥12.0', time: '昨天 15:30', items: '多肉葡萄 x1', icon: }, ]; const categories = [ { name: '快餐', icon: , color: 'bg-red-500' }, { name: '甜品', icon: , color: 'bg-yellow-400' }, { name: '校园优选', icon: , color: 'bg-blue-600' }, { name: '宵夜', icon: , color: 'bg-red-600' }, { name: '便利店', icon: , color: 'bg-blue-400' }, ]; const shops = [ { id: 1, name: '一食堂·红烧肉专场', rating: 4.8, time: '20min', price: '¥15起', tag: '学生食堂', img: 'bg-red-50' }, { id: 2, name: '学霸奶茶铺', rating: 4.9, time: '15min', price: '¥12起', tag: '人气爆款', img: 'bg-yellow-50' }, { id: 3, name: '蓝港海鲜炒饭', rating: 4.5, time: '25min', price: '¥18起', tag: '校园直达', img: 'bg-blue-50' }, { id: 4, name: '西区炸鸡汉堡', rating: 4.7, time: '18min', price: '¥20起', tag: '限时特惠', img: 'bg-red-50' }, ]; // 渲染首页 const renderHomePage = () => (
华南理工大学-C10栋
{categories.map((cat, i) => (
{cat.icon}
{cat.name}
))}

推荐商家

{shops.map((shop) => (
{shop.tag}
{shop.name}
{shop.rating}
{shop.time}
{shop.price}
))}
); // 渲染订单页 const renderOrdersPage = () => (

我的订单

{orderList.map((order) => (
{order.status === '配送中' && (
校内极速达
)}
{order.icon}

{order.name}

{order.items}

{order.status}

{order.time}

{order.status === '配送中' && }
))}
); // 渲染个人页 const renderProfilePage = () => (
RYB

李同学

已实名学生认证

余额

¥128.5

补贴

¥25.0

积分

2.4k

{[ { icon: , label: "支付设置" }, { icon: , label: "优惠券包" }, { icon: , label: "客服与反馈" } ].map((item, i) => (
{item.icon}
{item.label}
))}

申请校园骑手

本校学生专享 · 自由接单

); // 流程图展示 const renderFlowchart = () => (
Core Business Logic

业务链路流转

{[ { icon: , title: "用户定位", desc: "自动识别校区楼栋,精准派送" }, { icon: , title: "挑选商家", desc: "食堂、档口、便利店全覆盖" }, { icon: , title: "下单支付", desc: "校园补贴自动抵扣,极速核销" }, { icon: , title: "校内配送", desc: "学生骑手熟悉环境,直送寝室" } ].map((node, i) => (
0{i+1}

{node.icon} {node.title}

{node.desc}

))}
); // PRD 展示 (修复了 > 符号导致的 JSX 错误) const renderPRD = () => (

PRD 文档

Campus Delivery Requirement Specification v1.2

1. 产品背景与定位

解决校外外卖进门难、校内食堂数字化程度低、高峰期配送效率慢的问题。 利用学生兼职骑手实现“楼栋直达”,核心色调红(效率)、黄(奖励)、蓝(信任)贯穿交互。

2. 核心竞争力 (MVP)
    {['智能楼栋定位:LBS+寝室号精准绑定', '校园补贴支付:优先抵扣政府/学校专项补贴', '封闭式配送:学生骑手直接刷卡进楼', '实名认证:基于学校数据库的实名接口'].map((t, i) => (
  • {t}
  • ))}
3. 业务规则与数据逻辑
支付逻辑

优先抵扣校园补贴 {'→'} 校园卡余额 {'→'} 微信/支付宝补余。

配送规则

仅限校区围栏内接单/派送。超出范围订单自动进入“转接模式”。

实名校验

下单前强制进行校园实名比对。非认证用户无法进入支付环节。

); return (
{/* 侧边导航 */} {/* 主容器 */}
RYB

RedYellowBlue Delivery

Campus Ecosystem Solution

{activeTab === 'prototype' && (
{/* 页面渲染器 */} {activePageId === 'home' && renderHomePage()} {activePageId === 'orders' && renderOrdersPage()} {activePageId === 'profile' && renderProfilePage()} {/* 底部 Tab Bar */}
)} {activeTab === 'flowchart' && renderFlowchart()} {activeTab === 'mindmap' && (
{[ { title: "用户交互层", items: ["定位/楼栋关联", "多色块分类筛选", "订单进度可视化", "实名资产看板"] }, { title: "业务中台层", items: ["校园补贴算法", "信用积分模型", "地理围栏服务", "统一身份认证"] }, { title: "运力调度层", items: ["学生骑手抢单", "食堂档口接单", "异常订单仲裁", "路线自动纠偏"] } ].map((c, i) => (

# {c.title}

{c.items.map((it, j) => (
{it}
))}
))}
)} {activeTab === 'prd' && renderPRD()}
); }; export default App;