import * as React from "react"; import { Typography, message } from "antd"; import ContentView from "@/layout/ContentView"; import { AccountDetail } from "@/api/service/AccountService"; import { defaultAccountDetail } from "../index" import { getDictInfoByCode } from "@/components/CustComponents/CitySelector/utils"; import { HTTP_STATUS, AccountRoleText } from "@/shared/common/constants"; import MainLayout from "@/layout"; import Api from "@/api"; import "../css/info.scss"; // 账户信息 type P = {}; type S = { entity: AccountDetail; agentDistrict: string; }; const { Title, Paragraph, Text } = Typography; class AccountInfo extends React.Component { state = { entity: defaultAccountDetail, agentDistrict: "" }; componentDidMount() { this.getAccountDetail(); } getAccountDetail = async () => { const res = await Api.account.detail(); console.log({ res }); if (HTTP_STATUS.SUCCESSS === res.code) { this.setState({ entity: res.data || null }); const agentDistrict = res.data.agentDistrict || null; if (agentDistrict) { const info = getDictInfoByCode(agentDistrict); if (info) { this.setState({ agentDistrict: info.name || "" }); } } } else { message.error(res.message); } }; render() { const { entity, agentDistrict } = this.state; return (

我的信息

公司信息

喜马拉雅账号 {entity.nickName} 喜马拉雅ID {entity.uid} 公司名称 {entity.companyName} 公司官网 {entity.companyWebsite} 公司介绍 {entity.companyDesc} 公司地址 {entity.companyAddress} 角色 { entity.role ? AccountRoleText[entity.role] : "---"}

入驻业务

代理地区 {agentDistrict}

联系人信息

姓名 {entity.contactName} 手机号 {entity.phone} 邮箱 {entity.email}
); } } export default AccountInfo;