|
@@ -145,10 +145,11 @@ const DemandDetailShow = Form.create()(React.createClass({
|
|
|
coverImg: []
|
|
|
};
|
|
|
},
|
|
|
- loadData(id, detailApiUrl,dataCategory) {
|
|
|
+ loadData(id, detailApiUrl) {
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
|
+ console.log(this.props.data);
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
|
dataType: "json",
|
|
@@ -156,7 +157,7 @@ const DemandDetailShow = Form.create()(React.createClass({
|
|
|
url: globalConfig.context + detailApiUrl,
|
|
|
data: {
|
|
|
id: id,
|
|
|
- dataCategory:dataCategory?dataCategory:this.props.data.dataCategory
|
|
|
+ dataCategory:this.props.data.dataCategory
|
|
|
},
|
|
|
success: function (data) {
|
|
|
|
|
@@ -330,14 +331,14 @@ const DemandDetailShow = Form.create()(React.createClass({
|
|
|
}.bind(this));
|
|
|
},
|
|
|
componentWillMount() {
|
|
|
- this.loadData(this.props.data.id, this.props.detailApiUrl,nextProps.data.dataCategory);
|
|
|
+ this.loadData(this.props.data.id, this.props.detailApiUrl);
|
|
|
if (this.props.data.employerId && this.props.data.dataCategory) {
|
|
|
this.getContactsList(this.props.data.employerId);
|
|
|
};
|
|
|
},
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
if (!this.props.visible && nextProps.visible) {
|
|
|
- this.loadData(nextProps.data.id, nextProps.detailApiUrl);
|
|
|
+ this.loadData(nextProps.data.id, nextProps.detailApiUrl);
|
|
|
if (nextProps.data.employerId && nextProps.data.dataCategory) {
|
|
|
this.getContactsList(nextProps.data.employerId);
|
|
|
};
|
|
@@ -767,10 +768,11 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
}.bind(this),
|
|
|
});
|
|
|
},
|
|
|
- loadData(id, detailApiUrl,dataCategory) {
|
|
|
+ loadData(id, detailApiUrl) {
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
|
+ console.log(this.props.data);
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
|
dataType: "json",
|
|
@@ -778,7 +780,7 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
url: globalConfig.context + detailApiUrl,
|
|
|
data: {
|
|
|
id: id,
|
|
|
- dataCategory:dataCategory?dataCategory:this.props.data.dataCategory
|
|
|
+ dataCategory:this.props.data.dataCategory
|
|
|
},
|
|
|
success: function (data) {
|
|
|
let thisData = data.data;
|
|
@@ -977,9 +979,9 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
};
|
|
|
},
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
- if (!this.props.visible && nextProps.visible) {
|
|
|
+ if (!this.props.visible && nextProps.visible) {
|
|
|
if (nextProps.data && nextProps.data.id) {
|
|
|
- this.loadData(nextProps.data.id, nextProps.detailApiUrl,nextProps.data.dataCategory);
|
|
|
+ this.loadData(nextProps.data.id, nextProps.detailApiUrl);
|
|
|
};
|
|
|
this.state.contactsOption = [];
|
|
|
this.state.data = {};
|