Commit 7da03725 by 姜雷

修改报修接口报错提示方式

parent 88df2d71
......@@ -201,18 +201,22 @@ class ReprtRepair extends Component {
.then(res => {
console.log(res);
const { data } = res;
const { history } = this.props;
console.log('resetForm');
this.resetApplyForm();
// Toast.hide();
Toast.success(data.msg);
history.replace('/repair/RepairList');
if (data.code && data.code === 1000) {
const { data } = res;
const { history } = this.props;
console.log('resetForm');
this.resetApplyForm();
// Toast.hide();
Toast.success(data.msg);
history.replace('/repair/RepairList');
} else {
throw { msg: data.msg };
}
})
.catch(err => {
console.log(err);
const { data } = err;
// Toast.hide();
Toast.fail(data.msg || '提交失败!');
Toast.fail(err.msg || '提交失败!');
});
};
resetDialog = () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment