Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
schedule
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
fengzhaoyu
schedule
Commits
336554bb
Commit
336554bb
authored
4 years ago
by
xiexiaoqin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 定时发送心跳包
parent
9161d462
release/dev/2.1.0
…
release/2.0.0
release/2.1.0
release/dev/2.0.0
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
config.js
config.js
+1
-1
index.js
pages/index/index.js
+10
-7
No files found.
config.js
View file @
336554bb
export
const
globalUrl
=
"https://gateway-
ding
.mingwork.com"
;
export
const
globalUrl
=
"https://gateway-
beta
.mingwork.com"
;
export
const
globalUrl2
=
"https://third-authentication.mingwork.com"
;
...
...
This diff is collapsed.
Click to expand it.
pages/index/index.js
View file @
336554bb
...
...
@@ -157,12 +157,14 @@ create.Page({
dd
.
onSocketOpen
((
res
)
=>
{
console
.
log
(
'连接已打开!'
);
dd
.
sendSocketMessage
({
data
:
'heartbeat'
,
// 需要发送的内容
success
:
(
res
)
=>
{
console
.
log
(
'数据发送!'
+
'heartbeat'
);
},
});
this
.
socketTimer
=
setInterval
(()
=>
{
dd
.
sendSocketMessage
({
data
:
'heartbeat'
,
// 需要发送的内容
success
:
(
res
)
=>
{
console
.
log
(
'数据发送!'
+
'heartbeat'
);
},
});
},
25000
)
});
...
...
@@ -288,11 +290,12 @@ create.Page({
onHide
()
{
dd
.
closeSocket
();
clearInterval
(
this
.
timer
);
this
.
socketTimer
&&
clearInterval
(
this
.
socketTimer
);
this
.
timer
=
null
;
this
.
socketTimer
=
null
;
},
onUload
()
{
dd
.
closeSocket
();
},
refresh
()
{
this
.
isNeverShowSchedulePage
=
true
;
...
...
This diff is collapsed.
Click to expand it.
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