Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
haishi
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
haishi
Commits
d21dac6b
Commit
d21dac6b
authored
Apr 29, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
e2a3ee4f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
LiveNewIM/s1.js
+3
-3
api/Appapi/Api/Live.php
+1
-1
No files found.
LiveNewIM/s1.js
View file @
d21dac6b
...
@@ -613,7 +613,7 @@ io.on('connection', function(socket) {
...
@@ -613,7 +613,7 @@ io.on('connection', function(socket) {
clientRedis
.
hset
(
'LivePK_gift'
,
pkuid
,
0
);
clientRedis
.
hset
(
'LivePK_gift'
,
pkuid
,
0
);
var
time
=
Math
.
floor
(
(
new
Date
()).
getTime
()
/
1000
);
var
time
=
Math
.
floor
(
(
new
Date
()).
getTime
()
/
1000
);
var
phtime
=
time
+
7
*
60
;
//PK结束、开始惩罚时间
var
phtime
=
time
+
2
*
60
;
//PK结束、开始惩罚时间
var
phetime
=
phtime
+
1.5
*
60
;
//惩罚结束时间
var
phetime
=
phtime
+
1.5
*
60
;
//惩罚结束时间
/* 发送连麦成功信息 */
/* 发送连麦成功信息 */
/* 当前房间 */
/* 当前房间 */
...
@@ -693,7 +693,7 @@ io.on('connection', function(socket) {
...
@@ -693,7 +693,7 @@ io.on('connection', function(socket) {
clearTimeout
(
LivePH_timer
[
socket
.
uid
]);
clearTimeout
(
LivePH_timer
[
socket
.
uid
]);
LivePH_timer
[
socket
.
uid
]
=
null
;
LivePH_timer
[
socket
.
uid
]
=
null
;
}
}
},
8
.5
*
60
*
1000
);
//pk惩罚结束时间
},
3
.5
*
60
*
1000
);
//pk惩罚结束时间
LivePKtime_timer
[
socket
.
uid
]
=
setInterval
(
function
()
{
//定时发送结果
LivePKtime_timer
[
socket
.
uid
]
=
setInterval
(
function
()
{
//定时发送结果
var
leftTime
=
phtime
-
Math
.
floor
(
(
new
Date
()).
getTime
()
/
1000
);
//计算剩余的毫秒数
var
leftTime
=
phtime
-
Math
.
floor
(
(
new
Date
()).
getTime
()
/
1000
);
//计算剩余的毫秒数
...
@@ -739,7 +739,7 @@ io.on('connection', function(socket) {
...
@@ -739,7 +739,7 @@ io.on('connection', function(socket) {
// sockets[uid].emit('phtime',[PHTimer]);
// sockets[uid].emit('phtime',[PHTimer]);
},
1000
);
},
1000
);
endLivePk
(
io
,
socket
.
uid
,
0
);
endLivePk
(
io
,
socket
.
uid
,
0
);
},
7
*
60
*
1000
);
},
2
*
60
*
1000
);
//5*60*1000
//5*60*1000
}
else
if
(
action
==
'5'
){
}
else
if
(
action
==
'5'
){
...
...
api/Appapi/Api/Live.php
View file @
d21dac6b
...
@@ -1095,7 +1095,7 @@ class Api_Live extends PhalApi_Api {
...
@@ -1095,7 +1095,7 @@ class Api_Live extends PhalApi_Api {
}
}
// $nowtime=time();
// $nowtime=time();
if
(
$pk_time
&&
$pk_time
>
0
&&
$pk_time
<
$nowtime
){
if
(
$pk_time
&&
$pk_time
>
0
&&
$pk_time
<
$nowtime
){
$cha
=
7
*
60
-
(
$nowtime
-
$pk_time
);
$cha
=
2
*
60
-
(
$nowtime
-
$pk_time
);
$pkinfo
[
'pk_time'
]
=
(
string
)
$cha
;
$pkinfo
[
'pk_time'
]
=
(
string
)
$cha
;
$pk_gift_liveuid
=
DI
()
->
redis
->
hGet
(
'LivePK_gift'
,
$liveuid
);
$pk_gift_liveuid
=
DI
()
->
redis
->
hGet
(
'LivePK_gift'
,
$liveuid
);
...
...
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