add ipcam file
This commit is contained in:
parent
1df91aac09
commit
37d854334d
26
route/api/ipcam.js
Normal file
26
route/api/ipcam.js
Normal file
@ -0,0 +1,26 @@
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const rt = require('../ResTool');
|
||||
const config = require('../../config.json');
|
||||
const fs = require('fs');
|
||||
const mysql = require('../../libs/mysql_cls');
|
||||
const tool = require('../../includes/apiTool');
|
||||
const exec = require('child_process').exec;
|
||||
const so = require('../../includes/storeObject');
|
||||
const crypt = require('../../libs/crypto');
|
||||
|
||||
router
|
||||
.get('/', (req, res, n) => {
|
||||
// res.db = new mysql();
|
||||
// res.db.user = config.db.user;
|
||||
// res.db.password = config.db.pass;
|
||||
// res.db.host = config.db.host;
|
||||
// res.db.port = config.db.port;
|
||||
// res.db.database = config.db.db1;
|
||||
// res.db.connect();
|
||||
|
||||
res.send({ name: 'WebIO IPCam API' });
|
||||
})
|
||||
.all('*', rt.send);
|
||||
|
||||
module.exports = router;
|
14
src/components/AdminPage/IPCam/index.js
Normal file
14
src/components/AdminPage/IPCam/index.js
Normal file
@ -0,0 +1,14 @@
|
||||
import React from 'react';
|
||||
import {} from 'semantic-ui-react';
|
||||
|
||||
class IPCamPage extends React.Component{
|
||||
|
||||
render(){
|
||||
|
||||
return (
|
||||
null
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default IPCamPage;
|
18
src/containers/AdminPage/IPCam.js
Normal file
18
src/containers/AdminPage/IPCam.js
Normal file
@ -0,0 +1,18 @@
|
||||
import {connect} from 'react-redux';
|
||||
import {add_dialog_msg, toggle_loading} from '../../actions';
|
||||
import IPCamPage from '../../components/AdminPage/IPCam';
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
i18n: state.i18n
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch, ownProps) => ({
|
||||
showDialog: (msg) => {
|
||||
dispatch(add_dialog_msg(msg));
|
||||
},
|
||||
toggleLoading: (flag = false) => {
|
||||
dispatch(toggle_loading(flag));
|
||||
}
|
||||
})
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(IPCamPage);
|
Loading…
Reference in New Issue
Block a user