Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bh_face_counter
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄天晨
bh_face_counter
Commits
c46c0e70
Commit
c46c0e70
authored
Jul 11, 2020
by
zeven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实现TCP继电器控制
parent
53d2bbe0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletions
+10
-1
android
android
+1
-1
App.js
src/App.js
+6
-0
TcpRelay.js
src/utils/TcpRelay.js
+3
-0
No files found.
android
@
bb576ace
Subproject commit
2b9ed2edb9621ec69b594266330522cd3679af2e
Subproject commit
bb576ace9f2c3782561d8d3e097374f60adbddf9
src/App.js
View file @
c46c0e70
...
@@ -11,6 +11,7 @@ import models from './models';
...
@@ -11,6 +11,7 @@ import models from './models';
import
dva
from
'./utils/dva'
;
import
dva
from
'./utils/dva'
;
import
Speech
from
'./utils/Speech'
;
import
Speech
from
'./utils/Speech'
;
import
Restart
from
'./utils/Restart'
;
import
Restart
from
'./utils/Restart'
;
import
TcpRelay
from
'./utils/TcpRelay'
;
import
Installer
from
'./utils/Installer'
;
import
Installer
from
'./utils/Installer'
;
import
{
counterInterval
}
from
'./utils/authInterval'
;
import
{
counterInterval
}
from
'./utils/authInterval'
;
import
{
host
}
from
'./utils/config'
;
import
{
host
}
from
'./utils/config'
;
...
@@ -117,6 +118,11 @@ class App extends React.Component {
...
@@ -117,6 +118,11 @@ class App extends React.Component {
Installer
.
uninstall
(
pkg
);
Installer
.
uninstall
(
pkg
);
});
});
}
}
if
(
!
window
.
socket
.
hasListeners
(
'tcpRelay'
))
{
window
.
socket
.
on
(
'tcpRelay'
,
({
ip
,
port
,
route
,
status
})
=>
{
TcpRelay
.
toggle
(
ip
,
port
,
route
,
status
);
});
}
};
};
refresh
=
async
()
=>
{
refresh
=
async
()
=>
{
...
...
src/utils/TcpRelay.js
0 → 100644
View file @
c46c0e70
import
{
NativeModules
}
from
'react-native'
;
export
default
NativeModules
.
TcpRelay
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment