Commit 7be60b2d by 冷斌

fix bug

parent 69cbe6f1
...@@ -1082,6 +1082,17 @@ class Api_Live extends PhalApi_Api { ...@@ -1082,6 +1082,17 @@ class Api_Live extends PhalApi_Api {
$pkpull=DI()->redis -> hGet('LiveConnect_pull',$pkuid); $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); // 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); $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); $ifpk=DI()->redis -> hGet('LivePK',$liveuid);
if($ifpk){ if($ifpk){
$pkinfo['ifpk']='1'; $pkinfo['ifpk']='1';
...@@ -1089,7 +1100,7 @@ class Api_Live extends PhalApi_Api { ...@@ -1089,7 +1100,7 @@ class Api_Live extends PhalApi_Api {
if(!$pk_time){ if(!$pk_time){
$pk_time=DI()->redis -> hGet('LivePK_timer',$pkuid); $pk_time=DI()->redis -> hGet('LivePK_timer',$pkuid);
} }
$nowtime=time(); // $nowtime=time();
if($pk_time && $pk_time >0 && $pk_time< $nowtime){ if($pk_time && $pk_time >0 && $pk_time< $nowtime){
$cha=5*60 - ($nowtime - $pk_time); $cha=5*60 - ($nowtime - $pk_time);
$pkinfo['pk_time']=(string)$cha; $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