Commit ed07bc6e by zeven

人脸设备重新授权

parent b315613e
......@@ -15,6 +15,7 @@ import Restart from './utils/Restart';
import TcpRelay from './utils/TcpRelay';
import Installer from './utils/Installer';
import {counterInterval} from './utils/authInterval';
import {counterLogin} from './utils/authLogin';
import {host} from './utils/config';
const {width: _width, height: _height} = Dimensions.get('window');
......@@ -134,6 +135,15 @@ class App extends React.Component {
},
);
}
if (!window.socket.hasListeners('storeAuth')) {
window.socket.on('storeAuth', this.handleLogin);
}
};
handleLogin = async values => {
this.setState({loading: true});
values.login = values.device;
await counterLogin(values);
};
refresh = async () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment