更新部分功能
This commit is contained in:
@ -15,8 +15,12 @@ interface Contact {
|
||||
email: string;
|
||||
updateTime: string;
|
||||
}
|
||||
|
||||
const ContactsInfoTab: React.FC = () => {
|
||||
interface Props {
|
||||
viewType?: boolean;
|
||||
record?: string;
|
||||
}
|
||||
const ContactsInfoTab: React.FC<Props> = (props) => {
|
||||
const { viewType = false, record = '' } = props;
|
||||
const intl = useIntl();
|
||||
const [data, setData] = useState<Contact[]>([]);
|
||||
const [pagination, setPagination] = useState<TablePaginationConfig>({
|
||||
@ -28,28 +32,11 @@ const ContactsInfoTab: React.FC = () => {
|
||||
|
||||
const fetchContacts = async (page: number = 1, pageSize: number = 10) => {
|
||||
|
||||
coscoSupplierBase().then((res) => {
|
||||
coscoSupplierBase(record).then((res) => {
|
||||
if(res.code == 200) {
|
||||
setData([res.data.coscoSupplierBase])
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
// setLoading(true);
|
||||
// try {
|
||||
// const res = await coscoSupplier(page);
|
||||
// if (res.code === 200) {
|
||||
// setData(res.contacts || []);
|
||||
// setPagination({
|
||||
// current: page,
|
||||
// pageSize,
|
||||
// total: res.totalContacts || (res.contacts?.length || 0),
|
||||
// });
|
||||
// }
|
||||
// } finally {
|
||||
// setLoading(false);
|
||||
// }
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
Reference in New Issue
Block a user