forked from Gitlink/forgeplus-react
This commit is contained in:
commit
c75f490b38
|
@ -18,11 +18,27 @@ export async function expertList(params) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// 获取用户信息
|
||||
export function getUserInfo() {
|
||||
return fetch({
|
||||
url: '/user/getUserInfo',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
//专家注册
|
||||
export async function expertRegister(params){
|
||||
let res = await fetch({
|
||||
url: '/api/experts/register',
|
||||
method: 'post',
|
||||
params,
|
||||
});
|
||||
if (res.data) {
|
||||
return res.data;
|
||||
} else {
|
||||
notification.open({
|
||||
message: "提示",
|
||||
description: res.message || '请求错误',
|
||||
});
|
||||
}
|
||||
}
|
|
@ -3,8 +3,8 @@ import javaFetch from '../javaFetch';
|
|||
|
||||
|
||||
let settings=JSON.parse(localStorage.chromesetting);
|
||||
let actionUrl = settings.api_urls && settings.api_urls.expert ? settings.api_urls.expert :'http://117.50.100.12:8067';
|
||||
// 'http://10.47.38.56:8088';
|
||||
let actionUrl = settings.api_urls && settings.api_urls.expert ? settings.api_urls.expert :'http://117.50.100.12:8067/';
|
||||
// http://10.47.38.56:8088
|
||||
|
||||
const service = javaFetch(actionUrl);
|
||||
export const httpUrl = actionUrl;
|
||||
|
|
|
@ -2,8 +2,10 @@ import React, { useEffect, useState, useCallback } from 'react';
|
|||
import { Button, Icon, Form, Modal, Input, Cascader, Select, Upload } from 'antd';
|
||||
import { Link } from "react-router-dom";
|
||||
import { unitType, natureOfWork, highestEducation, positionLevel, professionalType, reviewArea } from '../static';
|
||||
import { expertRegister } from '../api';
|
||||
import './index.scss';
|
||||
import '../index.scss';
|
||||
import axios from 'axios';
|
||||
const Option = Select.Option;
|
||||
|
||||
export default Form.create()(({ match, history, showNotification, form }) => {
|
||||
|
@ -30,6 +32,40 @@ export default Form.create()(({ match, history, showNotification, form }) => {
|
|||
})
|
||||
}
|
||||
|
||||
//注册
|
||||
function expertRegisterOk(){
|
||||
console.log('222',expertRegisterValues);
|
||||
if(expertRegisterValues){
|
||||
let params = {
|
||||
academicAchievements: expertRegisterValues.academicAchievements || "",
|
||||
bankAccount: expertRegisterValues.bankAccount || "",
|
||||
bankName: expertRegisterValues.bankName || "",
|
||||
expertEmail: expertRegisterValues.expertEmail || "",
|
||||
expertName: expertRegisterValues.expertName || "",
|
||||
expertType: expertRegisterValues.expertType || "",
|
||||
graduatedFrom: expertRegisterValues.graduatedFrom || "",
|
||||
highestDegree: expertRegisterValues.highestDegree || "",
|
||||
honors: expertRegisterValues.honors || "",
|
||||
idNumber: expertRegisterValues.idNumber || "",
|
||||
major: expertRegisterValues.major || "",
|
||||
phone: expertRegisterValues.phone || "",
|
||||
professionalTitle: expertRegisterValues.professionalTitle || "",
|
||||
resume: expertRegisterValues.resume || "",
|
||||
reviewAreaOne: expertRegisterValues.reviewAreaOne || "",
|
||||
reviewAreaTwo: expertRegisterValues.reviewAreaTwo || "",
|
||||
reviewAreaThree: expertRegisterValues.reviewAreaThree || "",
|
||||
titleCertificate: expertRegisterValues.titleCertificate || "",
|
||||
titleRank: expertRegisterValues.titleRank || "",
|
||||
workNature: expertRegisterValues.workNature || "",
|
||||
workplace: expertRegisterValues.workplace || "",
|
||||
workplaceType: expertRegisterValues.workplaceType || ""
|
||||
}
|
||||
expertRegister(params).then(response=>{
|
||||
console.log('接口',response);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="centerbox detail">
|
||||
<div className="navigation">
|
||||
|
@ -283,7 +319,7 @@ export default Form.create()(({ match, history, showNotification, form }) => {
|
|||
<Modal
|
||||
title="提交资料"
|
||||
visible={submitConfirmValue}
|
||||
onOk={(e)=>expertRegisterSubmit(e)}
|
||||
onOk={expertRegisterOk}
|
||||
onCancel={() => setSubmitConfirmValue(false)}
|
||||
wrapClassName="expert_modal submit"
|
||||
closeIcon={<Icon className='iconfont icon-guanbi1'/>}
|
||||
|
|
Loading…
Reference in New Issue