mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-06 12:45:22 +08:00
fix: 处理项目列表接口请求参数错误的bug
This commit is contained in:
parent
c6a866975c
commit
c2bb1e2a06
@ -53,13 +53,13 @@ const addProject = (data) => {
|
||||
};
|
||||
|
||||
const updateProject = (data) => {
|
||||
const { name, prd_host, basepath, desc, group_id } = data;
|
||||
const { name, prd_host, basepath, desc, _id } = data;
|
||||
const param = {
|
||||
name,
|
||||
prd_host,
|
||||
basepath,
|
||||
desc,
|
||||
group_id
|
||||
id: _id
|
||||
};
|
||||
return {
|
||||
type: PROJECT_UPDATE,
|
||||
|
@ -78,12 +78,13 @@ class UpDateModal extends Component {
|
||||
this.props.changeUpdateModal(false, -1);
|
||||
}
|
||||
|
||||
// 确认修改
|
||||
handleOk = (e) => {
|
||||
e.preventDefault();
|
||||
const { form, updateProject, changeUpdateModal, currGroup, projectList, handleUpdateIndex, fetchProjectList, changeTableLoading } = this.props;
|
||||
form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
console.log(values);
|
||||
console.log(projectList[handleUpdateIndex]);
|
||||
let assignValue = Object.assign(projectList[handleUpdateIndex], values);
|
||||
assignValue.prd_host = this.state.protocol + assignValue.prd_host;
|
||||
assignValue.env = assignValue.envs.map((item) => {
|
||||
|
Loading…
Reference in New Issue
Block a user