diff --git a/src/pages/user/components/UserCard.tsx b/src/pages/user/components/UserCard.tsx index ccda8ed..b2e2dc8 100644 --- a/src/pages/user/components/UserCard.tsx +++ b/src/pages/user/components/UserCard.tsx @@ -1,4 +1,4 @@ -import {Avatar, Tag, Space} from '@nutui/nutui-react-taro' +import {Avatar, Tag, Space, Button} from '@nutui/nutui-react-taro' import {View, Text} from '@tarojs/components' import {getUserInfo, getWxOpenId} from '@/api/layout'; import Taro from '@tarojs/taro'; @@ -179,22 +179,35 @@ const UserCard = forwardRef((_, ref) => { className={'user-card w-full flex flex-col justify-around rounded-xl'} > - - + {IsLogin && ( + navTo(`/user/profile/profile`)}> + + - - {getDisplayName()} - {IsLogin ? ( - - - - {getRoleName()} - - + /> + + {getDisplayName() || '点击登录'} + {getRoleName()} + - ) : ''} - + + )} + {!IsLogin && ( + + )}