修复已知问题

This commit is contained in:
2025-06-06 18:23:07 +08:00
parent 3ac3fd8cb2
commit 7ff3e3f064
51 changed files with 2503 additions and 1257 deletions

View File

@@ -10,6 +10,7 @@ import {TenantId} from "@/utils/config";
function UserCard() {
const [IsLogin, setIsLogin] = useState<boolean>(false)
const [userInfo, setUserInfo] = useState<User>()
const [roleName, setRoleName] = useState<string>('注册用户')
useEffect(() => {
@@ -52,6 +53,11 @@ function UserCard() {
}
})
}
// 判断身份
const roleName = Taro.getStorageSync('RoleName');
if(roleName){
setRoleName(roleName)
}
}
}).catch(() => {
console.log('未登录')
@@ -159,7 +165,7 @@ function UserCard() {
{IsLogin ? (
<div className={'grade text-xs py-1'}>
<Tag type="success" round>
<div className={'p-1'}>{userInfo?.realName || '注册用户'}</div>
<div className={'p-1'}>{roleName || '注册用户'}</div>
</Tag>
</div>
) : ''}

View File

@@ -78,7 +78,7 @@ const UserCell = () => {
align="center"
extra={<ArrowRight color="#cccccc" size={18}/>}
onClick={() => {
navTo('/user/bx/index', true)
navTo('/hjm/bx/bx', true)
}}
/>
</Cell.Group>
@@ -171,15 +171,8 @@ const UserCell = () => {
title="账号安全"
align="center"
extra={<ArrowRight color="#cccccc" size={18}/>}
onClick={() => Taro.navigateTo({url: '/user/profile/profile'})}
onClick={() => navTo('/user/profile/profile',true)}
/>
{/*<Cell*/}
{/* className="nutui-cell-clickable"*/}
{/* title="切换账户"*/}
{/* align="center"*/}
{/* extra={<ArrowRight color="#cccccc" size={18}/>}*/}
{/* onClick={() => Taro.navigateTo({url: '/user/profile/profile'})}*/}
{/*/>*/}
<Cell
className="nutui-cell-clickable"
title="退出登录"