// @ts-nocheck
import React, { useState } from 'react';
import styles from './styles.less';
import BaseModal from '../../base';
import { message } from 'antd4';
import { CommonLoginFormPropType } from '@/propType/form/loginForm';
import { BindOrgInfoForm } from '../../component/form';
import { registerService } from '@/service';
import { errorCodeInfo } from '@/utils/errorInfo';
interface PropTypes {
// 是否显示
visible: boolean;
// 是否显示手机号信息
isShowUserInfo?: boolean;
// 是否显示机构信息
isShowOrgInfoGroup?: boolean;
// 登录用户获取的token
token: string;
// 传入用户信息,不包含机构信息
userInfo: {
username: string;
phone?: string;
};
// 传入机构信息
orgInfo: {
name?: string;
type?: string;
service_id: string;
};
}
const BindOrgInfoModal = (props: PropTypes) => {
const {
visible,
isShowPhoneGroup,
isShowOrgInfoGroup,
isShowUserName,
orgInfo,
userInfo,
} = props;
const handleBindOrgInfoSuccess = (values) => {
if (props?.onSuccess) {
props.onSuccess(values);
}
};
const handleBindOrgInfoFailed = (errorInfo) => {
if (props?.onFailed) {
props.onFailed(errorInfo);
}
};
const commonFormProps: CommonLoginFormPropType = {
isShowMsg: true,
onSuccess: handleBindOrgInfoSuccess,
onFailed: handleBindOrgInfoFailed,
};
return (