forgeplus-react/src/user_info/User/UserIdentify.js

110 lines
3.3 KiB
JavaScript

import React from "react";
import { Tooltip } from "antd";
import { getImageUrl } from "educoder";
import {
DivInline,
GridItem5,
IdentifyName,
IdentifyA,
} from "../css/layout.jsx";
function user_identify({ user_info }) {
const identityImage = getImageUrl(
"images/educoder/icon/auto-identityed.svg"
);
const identityIng = getImageUrl("images/educoder/icon/auto-identity.svg");
const autoPosted = getImageUrl("images/educoder/icon/auto-posted.svg");
const autoPost = getImageUrl("images/educoder/icon/auto-post.svg");
const autoPhone = getImageUrl("images/educoder/icon/auto-phone.svg");
const autoPhoned = getImageUrl("images/educoder/icon/auto-phoneed.svg");
const autoMailed = getImageUrl("images/educoder/icon/auto-emailed.svg");
const autoMail = getImageUrl("images/educoder/icon/auto-email.svg");
return (
<div className="educontent clearfix edu-txt-center mt10">
<DivInline>
<GridItem5>
{user_info.identify && user_info.identify !== "学生" && (
<IdentifyName>{user_info.identify}</IdentifyName>
)}
{/* <Tooltip
title={
user_info.authentication
? "已实名认证"
: user_info.identify_status
? "实名认证中"
: "未实名认证"
}
>
<IdentifyA
href={
user_info.is_current_user
? "/account/authentication"
: "javascript:void(0)"
}
>
<img
src={user_info.authentication ? identityImage : identityIng}
></img>
</IdentifyA>
</Tooltip>
<Tooltip
title={
user_info.professional
? "已职业认证"
: user_info.profession_status
? "职业认证中"
: "未职业认证"
}
>
<IdentifyA
href={
user_info.is_current_user
? "/account/professional_certification"
: "javascript:void(0)"
}
>
<img src={user_info.professional ? autoPosted : autoPost}></img>
</IdentifyA>
</Tooltip>
<Tooltip
title={
user_info.bind_phone
? "已绑定手机"
: "未绑定手机"
}
>
<IdentifyA
href={
user_info.is_current_user
? "/my/account"
: "javascript:void(0)"
}
>
<img src={user_info.bind_phone ? autoPhoned : autoPhone}></img>
</IdentifyA>
</Tooltip>
<Tooltip
title={
user_info.bind_email
? "已绑定邮箱"
: "未绑定邮箱"
}
>
<IdentifyA
href={
user_info.is_current_user
? "/my/account"
: "javascript:void(0)"
}
>
<img src={user_info.bind_email ? autoMailed : autoMail}></img>
</IdentifyA>
</Tooltip> */}
</GridItem5>
</DivInline>
</div>
);
}
export default user_identify;