Commit 65e62503 by 冷斌

update

parent e627b141
......@@ -1059,12 +1059,13 @@ class Api_Live extends PhalApi_Api {
/* 主播连麦 */
$pkinfo=array(
'pkuid'=>'0',
'pkpull'=>'0',
'ifpk'=>'0',
'pk_time'=>'0',
'pk_gift_liveuid'=>'0',
'pk_gift_pkuid'=>'0',
'pkuid' => '0',
'pkpull' => '0',
'ifpk' => '0',
'pk_time' => '0',
'ph_time' => '0',
'pk_gift_liveuid' => '0',
'pk_gift_pkuid' => '0',
);
$pkuid=DI()->redis -> hGet('LiveConnect',$liveuid);
// file_put_contents('./LiveConnect.txt',date('Y-m-d H:i:s').' 提交参数信息 pkuid:'.json_encode($pkuid)."\r\n",FILE_APPEND);
......@@ -1074,6 +1075,17 @@ class Api_Live extends PhalApi_Api {
$pkpull=DI()->redis -> hGet('LiveConnect_pull',$pkuid);
// file_put_contents('./LiveConnect.txt',date('Y-m-d H:i:s').' 提交参数信息 pkpull:'.json_encode($pkpull)."\r\n",FILE_APPEND);
$pkinfo['pkpull']=$this->getPullWithSign($pkpull);
$ph_time = DI()->redis->hGet('LivePH_timer', $liveuid);
$nowtime = time();
if (!$ph_time) {
//开始惩罚时间
$ph_time = DI()->redis->hGet('LivePH_timer', $pkuid);
}
if ($ph_time && $ph_time > 0 && $ph_time < $nowtime) {
$chb = 2.5 * 60 - ($nowtime - $ph_time);
$pkinfo['ph_time'] = (string) $chb; //惩罚剩余时间
}
$ifpk=DI()->redis -> hGet('LivePK',$liveuid);
if($ifpk){
$pkinfo['ifpk']='1';
......@@ -1081,7 +1093,7 @@ class Api_Live extends PhalApi_Api {
if(!$pk_time){
$pk_time=DI()->redis -> hGet('LivePK_timer',$pkuid);
}
$nowtime=time();
// $nowtime=time();
if($pk_time && $pk_time >0 && $pk_time< $nowtime){
$cha=7*60 - ($nowtime - $pk_time);
$pkinfo['pk_time']=(string)$cha;
......
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