This commit is contained in:
Jay 2017-03-31 15:35:39 +08:00
parent b419194b6b
commit c1b443b9d2

View File

@ -0,0 +1,45 @@
import React from 'react';
import {} from 'semantic-ui-react';
import {getRequest} from '../../../actions';
class TimezoneForm extends React.Component {
state = {
zone: [],
zoneset: ''
}
componentDidMount(){
this.getZones();
this.getZoneSet();
}
getZones = () => {
fetch('/api/system/gettimezonelist', getRequest())
.then(response=>response.json())
.then(json => {
if(json.status != 1) return this.props.showDialog(json.message);
this.setState({
zone: json.data.record || []
})
})
}
getZoneSet = () => {
fetch('/api/system/gettimezoneset', getRequest())
.then(response=>response.json())
.then(json => {
if(json.status != 1) return this.props.showDialog(json.message);
this.setState({
zoneset: json.data.record[0].value || ''
})
})
}
render(){
return (
null
)
}
}
export default TimezoneForm;