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请求等) - 添加公共工具方法和复用组件用于开发者中心及平台管理功能 - 统一品牌名称为“威数谱软件”,更新文案及界面展现一致性
This commit is contained in:
25
src/components/common/StatCard/index.tsx
Normal file
25
src/components/common/StatCard/index.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import { View, Text } from '@tarojs/components'
|
||||
|
||||
interface StatCardProps {
|
||||
label: string
|
||||
value: string | number
|
||||
sub?: string
|
||||
subColor?: string
|
||||
color?: string
|
||||
}
|
||||
|
||||
export default function StatCard({ label, value, sub, subColor, color = '#3b82f6' }: StatCardProps) {
|
||||
return (
|
||||
<View className='bg-white rounded-lg p-4'>
|
||||
<Text className='text-sm text-gray-500 mb-2 block'>{label}</Text>
|
||||
<Text className='text-2xl font-bold block' style={{ color }}>
|
||||
{value}
|
||||
</Text>
|
||||
{sub && (
|
||||
<Text className='text-xs mt-1 block' style={{ color: subColor || '#52c41a' }}>
|
||||
{sub}
|
||||
</Text>
|
||||
)}
|
||||
</View>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user