import React from 'react'; import { View, Text } from '@tarojs/components'; import { Button } from '@nutui/nutui-react-taro'; import { Scan, Setting, User, Shop } from '@nutui/icons-react-taro'; import navTo from '@/utils/common'; export interface AdminPanelProps { /** 是否显示面板 */ visible: boolean; /** 关闭面板回调 */ onClose?: () => void; /** 自定义样式类名 */ className?: string; } /** * 管理员功能面板组件 */ const AdminPanel: React.FC = ({ visible, onClose, className = '' }) => { if (!visible) return null; // 管理员功能列表 const adminFeatures = [ { id: 'unified-qr', title: '统一扫码', description: '扫码登录和核销一体化功能', icon: , color: 'bg-blue-50 border-blue-200', onClick: () => { navTo('/passport/unified-qr/index', true); onClose?.(); } }, { id: 'user-management', title: '用户管理', description: '管理系统用户信息', icon: , color: 'bg-purple-50 border-purple-200', onClick: () => { // TODO: 跳转到用户管理页面 console.log('跳转到用户管理'); onClose?.(); } }, { id: 'store-management', title: '门店管理', description: '管理门店信息和设置', icon: , color: 'bg-orange-50 border-orange-200', onClick: () => { // TODO: 跳转到门店管理页面 console.log('跳转到门店管理'); onClose?.(); } }, { id: 'system-settings', title: '系统设置', description: '系统配置和参数管理', icon: , color: 'bg-gray-50 border-gray-200', onClick: () => { // TODO: 跳转到系统设置页面 console.log('跳转到系统设置'); onClose?.(); } } ]; return ( {/* 遮罩层 */} {/* 面板内容 */} {/* 面板头部 */} 管理员面板 {/* 功能网格 */} {adminFeatures.map((feature) => ( {feature.icon} {feature.title} {feature.description} ))} {/* 底部提示 */} 💡 管理员功能仅对具有管理权限的用户开放 ); }; export default AdminPanel;