var $ = require('./zepto');
var React = require('react');
var ReactDOM = require('react-dom');
var test = document.getElementById('test');
class Test extends React.Component {
constructor() {
super();
this.state = {
DATA: "",
};
this.handleSuccess = this.handleSuccess.bind(this);
}
handleSuccess(res) {
this.setState({
DATA: res
});
console.log(res);
}
componentDidMount() {
$.ajax({
url: 'https://dev-promotion.chelun.com/GuangzhouCarShow/index?id=1',
type: 'GET',
success: this.handleSuccess
});
}
render() {
return (
Test
);
}
}
ReactDOM.render(
, test);