feat(customer): 优化报备人管理和权限控制
- 移除页面分页查询,仅保留精确查询接口调用 - 添加当前登录用户ID获取和报备人规范化处理逻辑 - 实现管理员可查看全部客户,普通分销商仅查看自己的权限控制 - 集成用户角色显示功能,在用户卡片组件中展示角色标签 - 修复角色名称获取逻辑,支持多种数据
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import {Button} from '@nutui/nutui-react-taro'
|
||||
import {Avatar} from '@nutui/nutui-react-taro'
|
||||
import {Avatar, Button, Tag} from '@nutui/nutui-react-taro'
|
||||
import {View} from '@tarojs/components'
|
||||
import {Scan} from '@nutui/icons-react-taro';
|
||||
import {getWxOpenId} from '@/api/layout';
|
||||
@@ -16,7 +15,8 @@ function UserCard() {
|
||||
isLoggedIn,
|
||||
loginUser,
|
||||
fetchUserInfo,
|
||||
getDisplayName
|
||||
getDisplayName,
|
||||
getRoleName
|
||||
} = useUser();
|
||||
|
||||
useEffect(() => {
|
||||
@@ -178,9 +178,7 @@ function UserCard() {
|
||||
<View className={'py-1 text-black font-bold max-w-28'}>{getDisplayName()}</View>
|
||||
{isLoggedIn ? (
|
||||
<View className={'grade text-xs py-0'}>
|
||||
{/*<Text className={'p-1'}>*/}
|
||||
{/* {getRoleName()}*/}
|
||||
{/*</Text>*/}
|
||||
<Tag type="success">{getRoleName()}</Tag>
|
||||
</View>
|
||||
) : ''}
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user