docs: 删除console.log

This commit is contained in:
wenbo.dong 2017-07-31 16:27:55 +08:00
parent 762e26d5d0
commit 857eca39ee
3 changed files with 5 additions and 27 deletions

View File

@ -20,7 +20,6 @@ export default class BreadcrumbNavigation extends Component {
}
getBreadcrumb = (pathSnippets) => {
console.log(pathSnippets);
// 重置 state 中的 breadcrumb防止重复渲染
this.setState({
breadcrumb: []
@ -76,12 +75,9 @@ export default class BreadcrumbNavigation extends Component {
path: '/' + pathSnippets.join('/')
}]
});
} else {
console.log(2);
}
}
componentDidMount() {
console.log(location.hash);
const pathSnippets = location.hash.split('#')[1].split('/').filter(i => i);
this.getBreadcrumb(pathSnippets);
this.setState({

View File

@ -21,8 +21,7 @@ const deleteConfirm = (id, props) => {
delProject(id).then((res) => {
if (res.payload.data.errcode == 0) {
message.success('删除成功!')
fetchProjectList(currGroup._id).then((res) => {
console.log(res);
fetchProjectList(currGroup._id).then(() => {
});
} else {
message.error(res.payload.data.errmsg);
@ -155,7 +154,6 @@ class ProjectList extends Component {
changeTableLoading(true);
addProject(values).then((res) => {
console.log(res);
// 添加项目成功后再次请求列表
if (res.payload.data.errcode == 0) {
that.setState({
@ -163,16 +161,14 @@ class ProjectList extends Component {
});
form.resetFields();
message.success('创建成功! ');
fetchProjectList(currGroup._id, this.props.currPage).then((res) => {
fetchProjectList(currGroup._id, this.props.currPage).then(() => {
changeTableLoading(false);
console.log(131,res);
});
} else {
changeTableLoading(false);
message.error(res.payload.data.errmsg);
}
}).catch((err) => {
console.log(err);
}).catch(() => {
changeTableLoading(false);
});
}

View File

@ -81,17 +81,14 @@ class UpDateModal extends Component {
// 确认修改
handleOk = (e) => {
console.log('in');
e.preventDefault();
const { form, updateProject, changeUpdateModal, currGroup, projectList, handleUpdateIndex, fetchProjectList, changeTableLoading } = this.props;
form.validateFields((err, values) => {
console.log(values);
if (!err) {
// console.log(projectList[handleUpdateIndex]);
let assignValue = Object.assign(projectList[handleUpdateIndex], values);
values.protocol = this.state.protocol.split(':')[0];
assignValue.env = assignValue.envs.map((item, index) => {
console.log(values['envs-protocol-'+index]);
return {
name: values['envs-name-'+index],
domain: values['envs-protocol-'+index] + values['envs-domain-'+index]
@ -104,16 +101,14 @@ class UpDateModal extends Component {
if (res.payload.data.errcode == 0) {
changeUpdateModal(false, -1);
message.success('修改成功! ');
fetchProjectList(currGroup._id).then((res) => {
console.log(res);
fetchProjectList(currGroup._id).then(() => {
changeTableLoading(false);
});
} else {
changeTableLoading(false);
message.error(res.payload.data.errmsg);
}
}).catch((err) => {
console.log(err);
}).catch(() => {
changeTableLoading(false);
});
form.resetFields();
@ -121,13 +116,6 @@ class UpDateModal extends Component {
});
}
envProtocolChange = (value) => {
console.log(value);
// this.setState({
// envProtocolChange: value
// })
}
// 项目的修改操作 - 删除一项环境配置
remove = (id) => {
const { form } = this.props;
@ -142,7 +130,6 @@ class UpDateModal extends Component {
form.setFieldsValue({
envs: envs.filter(key => {
const realKey = key._id ? key._id : key
console.log(key);
return realKey !== id;
})
});
@ -184,7 +171,6 @@ class UpDateModal extends Component {
getFieldDecorator('envs', { initialValue: envMessage });
const envs = getFieldValue('envs');
const formItems = envs.map((k, index) => {
console.log(k);
const secondIndex = 'next' + index; // 为保证key的唯一性
return (
<Row key={index} type="flex" justify="space-between" align={index === 0 ? 'middle' : 'top'}>