修复role不为3时,不显示会员
This commit is contained in:
parent
25a83ba8ca
commit
4ad9e4f4c6
|
@ -16,6 +16,7 @@ const My = () => {
|
|||
// setUserInfo(userInfo);
|
||||
getData(userInfo);
|
||||
}
|
||||
console.log("userInfo", userInfo);
|
||||
// getData(userInfo);
|
||||
}, []);
|
||||
const getData = async (oldUserInfo) => {
|
||||
|
@ -151,7 +152,27 @@ const My = () => {
|
|||
style={{ "--size": "76px", "--border-radius": "50%" }}
|
||||
/>
|
||||
<div>
|
||||
<p className="text-2xl">{userInfo.name}</p>
|
||||
<Space align="center">
|
||||
<p
|
||||
className={`text-2xl`}
|
||||
style={{
|
||||
color: userInfo?.is_a_member === 1 ? "#FFADBE" : "white",
|
||||
}}
|
||||
>
|
||||
{userInfo.name}
|
||||
</p>
|
||||
{userInfo?.is_a_member === 1 && (
|
||||
<Image
|
||||
src={
|
||||
process.env.NEXT_PUBLIC_WEB_ASSETS_URL +
|
||||
"/icons/vipbig.png"
|
||||
}
|
||||
width={32}
|
||||
height={32}
|
||||
placeholder=""
|
||||
/>
|
||||
)}
|
||||
</Space>
|
||||
<div className="h-4 flex items-center text-xs bg-[#ffffff18] rounded-full px-2 py-2.5 mt-1 w-max">
|
||||
<Image
|
||||
src={
|
||||
|
|
Loading…
Reference in New Issue