Authored by xiaofeng.yao@yoho.cn

Merge branch 'hotfix/20160912' into test

... ... @@ -14,7 +14,7 @@ class SystemController extends BaseController
{
$key = 'servers';
if (Yii::$app->request->isPost && trim(Yii::$app->request->post('content'))) {
$content = Yii::$app->request->post('content');
/*$content = Yii::$app->request->post('content');
$ip_arr = explode(",",trim($content));
$ip_arr = array_map(function($v){return trim($v);},$ip_arr);
... ... @@ -26,10 +26,12 @@ class SystemController extends BaseController
}else{
Yii::$app->session->setFlash('error', '保存失败。');
}
$this->redirect('/system/servers');
$this->redirect('/system/servers');*/
}else{
$model = SysConfig::find()->where(['conf_key' => $key])->one();
$ips = json_decode($model->conf_value, true);
/*$model = SysConfig::find()->where(['conf_key' => $key])->one();
$ips = json_decode($model->conf_value, true);*/
$cache_prefix = Yii::$app->params['cache_prefix'];
$ips = Yii::$app->redisIm->smembers($cache_prefix . "server_list");
return $this->render('servers', ['ips' => $ips]);
}
}
... ...
... ... @@ -29,7 +29,7 @@ use backend\widgets\LinkPager;
}
?>
</td>
<td><?php echo date('Y-m-i H:i:s',$v['create_time'])?></td>
<td><?php echo date('Y-m-d H:i:s',$v['create_time'])?></td>
<td><button class="btn btn-danger jinyan" uid="<?php echo $v['uid']?>" name="<?php echo $v['name']?>" room_id="<?php echo $v['room_id']?>">禁言</button></td>
</tr>
<?php endforeach;?>
... ...
... ... @@ -29,8 +29,7 @@ function refreshProduct(){
consoleLog('发起推送商品列表刷新指令');
cmd = {cmd:10002,room:room_id,msg:'',refresh:'Y'};
cmd['secret'] = makeSign(cmd);
delete(cmd['private_key']);
cmd = makeSign(cmd);
cmd = JSON.stringify(cmd);
consoleLog('发送消息: '+cmd);
... ... @@ -59,8 +58,7 @@ function sendProduct(product_id){
consoleLog('发起推送,商品ID: '+product_id);
cmd = {cmd:10001,room:room_id,skn:product_id};
cmd['secret'] = makeSign(cmd);
delete(cmd['private_key']);
cmd = makeSign(cmd);
cmd = JSON.stringify(cmd);
consoleLog('发送消息: '+cmd);
... ...
... ... @@ -9,7 +9,7 @@ $this->title = '管理后台首页';
<div class="panel-heading">
<h5 class="panel-title">弹幕服务器列表</h5>
</div>
<form class="form-inline" method="post" action="/system/servers">
<!--<form class="form-inline" method="post" action="/system/servers">
<div class="panel-body">
<div>
<div class="form-group">
... ... @@ -28,7 +28,16 @@ $this->title = '管理后台首页';
</div>
</div>
</div>
</form>
</form>-->
<div class="panel-body">
<?php
if($ips){
foreach($ips as $ip){
echo $ip."<br>";
}
}
?>
</div>
</div>
</div>
<div class="col-md-6">
... ...
... ... @@ -213,6 +213,7 @@ class LivingController extends BaseController
'master_meta'=>'',
'title'=>$model->title,
'pic'=>CommonImages::getTemplateComplex($model->pic, 2),
'background_pic'=>CommonImages::getSourceUrl($model->background_pic),
'watermark'=>$model->watermark,
'living'=>$model->living,
'like_num'=>0,
... ... @@ -265,7 +266,7 @@ class LivingController extends BaseController
}
}
$ret['background_pic'] = 'http://img11.static.yhbimg.com/global/2016/08/17/18/01f17a9cd44149052482e4ee58e590cf1b.png';
$ret['background_pic'] = $ret['background_pic'] ? : 'http://img11.static.yhbimg.com/global/2016/08/17/18/01f17a9cd44149052482e4ee58e590cf1b.png';
$ret['share_url'] = 'http://m.yohobuy.com/activity/live/'.$room_id;
$ret['share_title'] = '有货潮流新品节直播开始啦,快来看!';
$ret['share_content'] = 'YO\'HOOD嘉年华现场火热直播中,明星潮牌等你来!';
... ...