import React from 'react'; import {Container, Segment, Button} from 'semantic-ui-react'; import {getRequest} from '../../../../actions'; const stateDefault = ()=>({ list: [], modal: { open: false, type: 0, data: {} } }) class Location extends React.Component { state = { ...stateDefault() } componentDidMount() { this.getList(); } getList = () => { let {showDialog, toggleLoading} = this.props; toggleLoading(1); fetch('/api/wristband/getlocationlist', getRequest()) .then(response=>response.json()) .then(json => { toggleLoading(0); if(json.status != 1) return showDialog(json.message); this.setState({ list: json.data.record || [] }) }) } render() { return (