import React from 'react';
import { Icon, message, Button, Spin, Checkbox } from 'antd';
import './create.less';
import ajax from 'jquery/src/ajax/xhr.js'
import $ from 'jquery/src/ajax';
import Steps from './steps';
const CreateEvaluate = React.createClass({
getInitialState() {
return {
title: '',
id: '',
checked: false,
loading: false,
announce: ''
};
},
componentWillMount() {
if (this.props.id) {
this.state.id = this.props.id;
} else {
this.setState({
loading: true
})
$.ajax({
url: globalConfig.context + '/open/html/get/evaluation_announcement'
}).done(function (res) {
if (res) {
this.setState({
loading: true,
announce: res
})
}
}.bind(this)).always(function () {
this.setState({
loading: false
})
}.bind(this));
}
},
returnList() {
if (this.props.handlekey) {
this.props.handlekey('evaluate');
}
},
announce() {
return {
__html: this.state.announce
}
},
agree() {
$.ajax({
url: globalConfig.context + '/api/user/evaluate/create'
}).done(function (res) {
if (res && res.data) {
this.setState({
loading: true,
id: res.data
})
}
}.bind(this)).always(function () {
this.setState({
loading: false
})
}.bind(this));
},
onChanged(e) {
this.setState({
checked: e.target.checked
});
},
titleChanged(title) {
this.setState({
title: title
});
},
renderBody() {
if (this.state.id) {
return
使用本系统之前,请您务必仔细阅读并透彻理解本声明。当您使用本系统,将视为您认可本声明内容。