初步联调新增及查询专家接口

This commit is contained in:
何童崇 2021-12-17 15:24:14 +08:00
parent 9ef7811f57
commit 05646c17ee
3 changed files with 7 additions and 7 deletions

View File

@ -27,11 +27,11 @@ export function getUserInfo() {
}
//专家注册
export async function expertRegister(params){
export async function expertRegister(data){
let res = await fetch({
url: '/api/experts/register',
method: 'post',
params,
data,
});
if (res.data) {
return res.data;

View File

@ -138,9 +138,8 @@ function List() {
curPage,
status: '',
reviewArea: '',
statusString: '',
statusString: '-1,1,2',
};
// ?curPage=1&expertType=&orderBy=&pageSize=10&reviewArea=&searchInput=&statusString=
expertList(params).then(data => {
if (data && Array.isArray(data.rows)) {
for (const item of data.rows) {

View File

@ -8,7 +8,7 @@ import '../index.scss';
import axios from 'axios';
const Option = Select.Option;
export default Form.create()(({ match, history, showNotification, form }) => {
export default Form.create()(({ match, history, showNotification, form,current_user }) => {
const { getFieldDecorator, validateFields, setFieldsValue } = form;
const [cancelConfirmValue, setCancelConfirmValue] = useState(false);
const [submitConfirmValue, setSubmitConfirmValue] = useState(false);
@ -61,7 +61,8 @@ export default Form.create()(({ match, history, showNotification, form }) => {
titleRank: expertRegisterValues.titleRank || "",
workNature: expertRegisterValues.workNature || "",
workplace: expertRegisterValues.workplace || "",
workplaceType: expertRegisterValues.workplaceType || ""
workplaceType: expertRegisterValues.workplaceType || "",
userId:current_user.user_id,
}
expertRegister(params).then(response=>{
console.log('接口',response);
@ -181,7 +182,7 @@ export default Form.create()(({ match, history, showNotification, form }) => {
</td>
<td>
{helper('职称职级',
'professionalYears',
'titleRank',
[{ required: true, message: "请选择职称职级" }],
<Select placeholder="请选择" dropdownClassName="expert_register">
{positionLevel.map(item=>{