update
This commit is contained in:
parent
b419194b6b
commit
c1b443b9d2
45
src/components/AdminPage/SystemInfo/TimezoneForm.js
Normal file
45
src/components/AdminPage/SystemInfo/TimezoneForm.js
Normal 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;
|
Loading…
Reference in New Issue
Block a user