Files
websopy-taro/src/components/common/CellRow/index.tsx
赵忠林 39d3b59434 refactor(user): 将VIP身份统一改为开发者标记
- 审核通过时不再新增角色,而是更新用户isDeveloper布尔标记
- 后端UserService新增markAsDeveloper方法,通过updateById设置isDeveloper
- UserController新增PUT接口更新开发者标记,权限使用sys:userRole:save
- 前端api新增setUserDeveloper调用新的审核接口
- vip-review页面移除角色相关代码,改为调用setUserDeveloper方法
- 约定开发者身份即sys_user.is_developer字段,不再依赖角色表记录
- app.config.ts追加开发者中心与平台管理相关页面路由
- 新增开发者中心、平台管理的多个API模块(apikey、appProduct、appDomain、developer请求等)
- 添加公共工具方法和复用组件用于开发者中心及平台管理功能
- 统一品牌名称为“威数谱软件”,更新文案及界面展现一致性
2026-07-22 14:57:03 +08:00

48 lines
1.2 KiB
TypeScript

import { View, Text } from '@tarojs/components'
interface CellRowProps {
title: string
subtitle?: string
extra?: string
statusText?: string
statusColor?: string
showArrow?: boolean
onClick?: () => void
}
export default function CellRow({
title,
subtitle,
extra,
statusText,
statusColor,
showArrow = true,
onClick,
}: CellRowProps) {
return (
<View
className='flex items-center justify-between px-4 py-3 bg-white border-b border-gray-50'
onClick={onClick}
>
<View className='flex-1 mr-2'>
<View className='flex items-center gap-2 flex-wrap'>
<Text className='text-sm text-gray-800'>{title}</Text>
{statusText && (
<Text
className='text-xs px-1.5 py-0.5 rounded-full'
style={{ color: statusColor, background: (statusColor || '#999') + '22' }}
>
{statusText}
</Text>
)}
</View>
{subtitle && (
<Text className='text-xs text-gray-400 mt-1 block'>{subtitle}</Text>
)}
</View>
{extra && <Text className='text-sm text-gray-500 mr-2'>{extra}</Text>}
{showArrow && <Text className='text-gray-300'></Text>}
</View>
)
}