6.27 集成
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import '../Style/ld_style.less';
|
||||
import { Input, List } from 'antd';
|
||||
import { getMemberList } from './service';
|
||||
import { getDetailData } from '../utils';
|
||||
import { history } from 'umi';
|
||||
|
||||
const { Search } = Input;
|
||||
|
||||
@ -43,12 +46,36 @@ const data = [
|
||||
];
|
||||
|
||||
const PersonInfor: React.FC<{}> = () => {
|
||||
//member list
|
||||
const [memberData, setMemberData] = useState<any[]>([]);
|
||||
|
||||
//get session
|
||||
const item = getDetailData();
|
||||
//get member list
|
||||
const getMemberData = () => {
|
||||
getMemberList({ belongBranch: 4 }).then(res => {
|
||||
if (res?.code == 200) {
|
||||
setMemberData(res?.data);
|
||||
}
|
||||
})
|
||||
}
|
||||
//to home
|
||||
const toHome = () => {
|
||||
history.push("/partyMemberTopic/home");
|
||||
}
|
||||
//goback lastpage
|
||||
const toGoBack = () => {
|
||||
window.history.go(-1);
|
||||
}
|
||||
useEffect(() => {
|
||||
getMemberData();
|
||||
}, [])
|
||||
return (
|
||||
<div className="page-container">
|
||||
<div className="top-banner">
|
||||
<div className="back-home">
|
||||
<span>返回首页</span>
|
||||
<span>上一页</span>
|
||||
<span onClick={() => toHome()}>返回首页</span>
|
||||
<span onClick={() => toGoBack()}>上一页</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="search">
|
||||
@ -65,19 +92,19 @@ const PersonInfor: React.FC<{}> = () => {
|
||||
<div className="mess-box mess-detail">
|
||||
<List
|
||||
grid={{ gutter: 16, column: 4 }}
|
||||
dataSource={data}
|
||||
dataSource={memberData}
|
||||
renderItem={item => (
|
||||
<List.Item>
|
||||
<div className="wrapper">
|
||||
<div className="top-bg">
|
||||
<div className="tit">{item.title}</div>
|
||||
<div className="text-r">{item.name}</div>
|
||||
<div className="text-r yellow">{item.position}</div>
|
||||
<div className="tit">{item.branchName}</div>
|
||||
<div className="text-r">{item.contactName}</div>
|
||||
<div className="text-r yellow">{item.contactUnit}</div>
|
||||
</div>
|
||||
<div className="mess">
|
||||
<div>部门:某某部</div>
|
||||
<div>邮箱:12345@chinaunicom.cn</div>
|
||||
<div>电话:12345678</div>
|
||||
<div>部门:{item.contactUnit}</div>
|
||||
<div>邮箱:{item.contactEmail}</div>
|
||||
<div>电话:{item.contactMobiphone}</div>
|
||||
</div>
|
||||
</div>
|
||||
</List.Item>
|
||||
|
@ -0,0 +1,9 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
//党员列表
|
||||
export async function getMemberList(params: any) {
|
||||
return request('/api/biz-service-ebtp-extend/v1/eventpartybranch/partyMember/list', {
|
||||
method: 'GET',
|
||||
params: params
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user