|
|
|
@ -5,12 +5,17 @@ import avatar from "@/static/img/avatar.png" |
|
|
|
|
import blacktriang from "@/static/img/blacktriangle.png" |
|
|
|
|
|
|
|
|
|
const Header = ({showCompany}:{showCompany:()=> void}) => { |
|
|
|
|
const {user,company} = Profile.useContainer() |
|
|
|
|
const {token,user,company,empty} = Profile.useContainer() |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<View className={styles.header}> |
|
|
|
|
<View className='flex'> |
|
|
|
|
{ |
|
|
|
|
token ? |
|
|
|
|
<Image src={user?.avatar || avatar} className={styles.avatar}/>: |
|
|
|
|
<Image src={avatar} className={styles.avatar}/> |
|
|
|
|
} |
|
|
|
|
{ token ? |
|
|
|
|
<View className='flex-1'> |
|
|
|
|
<View className='font-32'>{user?.name}</View> |
|
|
|
|
|
|
|
|
@ -20,12 +25,19 @@ const Header = ({showCompany}:{showCompany:()=> void}) => { |
|
|
|
|
<Text style={{fontSize:'24rpx',fontWeight:'500',color:'#323635'}}>{company?.name}</Text> |
|
|
|
|
<Image src={blacktriang} style={{width:'20rpx',height:'20rpx'}}></Image> |
|
|
|
|
</View> |
|
|
|
|
</View>: |
|
|
|
|
<View className='flex-1'> |
|
|
|
|
<View className='font-32 mt-2' onClick={()=>{ |
|
|
|
|
empty() |
|
|
|
|
}}>注册/登录</View> |
|
|
|
|
</View> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
{/*<View className='login font-24 mt-2 text-secondary flex justify-between content-start'>*/} |
|
|
|
|
{/* <Text>手机号:{user?.phone_number}</Text>*/} |
|
|
|
|
{/*</View>*/} |
|
|
|
|
</View> |
|
|
|
|
</View> |
|
|
|
|
</View> |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|