Merge branch 'hotfix/20160912' into test
Showing
5 changed files
with
22 additions
and
12 deletions
@@ -14,7 +14,7 @@ class SystemController extends BaseController | @@ -14,7 +14,7 @@ class SystemController extends BaseController | ||
14 | { | 14 | { |
15 | $key = 'servers'; | 15 | $key = 'servers'; |
16 | if (Yii::$app->request->isPost && trim(Yii::$app->request->post('content'))) { | 16 | if (Yii::$app->request->isPost && trim(Yii::$app->request->post('content'))) { |
17 | - $content = Yii::$app->request->post('content'); | 17 | + /*$content = Yii::$app->request->post('content'); |
18 | $ip_arr = explode(",",trim($content)); | 18 | $ip_arr = explode(",",trim($content)); |
19 | $ip_arr = array_map(function($v){return trim($v);},$ip_arr); | 19 | $ip_arr = array_map(function($v){return trim($v);},$ip_arr); |
20 | 20 | ||
@@ -26,10 +26,12 @@ class SystemController extends BaseController | @@ -26,10 +26,12 @@ class SystemController extends BaseController | ||
26 | }else{ | 26 | }else{ |
27 | Yii::$app->session->setFlash('error', '保存失败。'); | 27 | Yii::$app->session->setFlash('error', '保存失败。'); |
28 | } | 28 | } |
29 | - $this->redirect('/system/servers'); | 29 | + $this->redirect('/system/servers');*/ |
30 | }else{ | 30 | }else{ |
31 | - $model = SysConfig::find()->where(['conf_key' => $key])->one(); | ||
32 | - $ips = json_decode($model->conf_value, true); | 31 | + /*$model = SysConfig::find()->where(['conf_key' => $key])->one(); |
32 | + $ips = json_decode($model->conf_value, true);*/ | ||
33 | + $cache_prefix = Yii::$app->params['cache_prefix']; | ||
34 | + $ips = Yii::$app->redisIm->smembers($cache_prefix . "server_list"); | ||
33 | return $this->render('servers', ['ips' => $ips]); | 35 | return $this->render('servers', ['ips' => $ips]); |
34 | } | 36 | } |
35 | } | 37 | } |
@@ -29,7 +29,7 @@ use backend\widgets\LinkPager; | @@ -29,7 +29,7 @@ use backend\widgets\LinkPager; | ||
29 | } | 29 | } |
30 | ?> | 30 | ?> |
31 | </td> | 31 | </td> |
32 | - <td><?php echo date('Y-m-i H:i:s',$v['create_time'])?></td> | 32 | + <td><?php echo date('Y-m-d H:i:s',$v['create_time'])?></td> |
33 | <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> | 33 | <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> |
34 | </tr> | 34 | </tr> |
35 | <?php endforeach;?> | 35 | <?php endforeach;?> |
@@ -29,8 +29,7 @@ function refreshProduct(){ | @@ -29,8 +29,7 @@ function refreshProduct(){ | ||
29 | consoleLog('发起推送商品列表刷新指令'); | 29 | consoleLog('发起推送商品列表刷新指令'); |
30 | 30 | ||
31 | cmd = {cmd:10002,room:room_id,msg:'',refresh:'Y'}; | 31 | cmd = {cmd:10002,room:room_id,msg:'',refresh:'Y'}; |
32 | - cmd['secret'] = makeSign(cmd); | ||
33 | - delete(cmd['private_key']); | 32 | + cmd = makeSign(cmd); |
34 | 33 | ||
35 | cmd = JSON.stringify(cmd); | 34 | cmd = JSON.stringify(cmd); |
36 | consoleLog('发送消息: '+cmd); | 35 | consoleLog('发送消息: '+cmd); |
@@ -59,8 +58,7 @@ function sendProduct(product_id){ | @@ -59,8 +58,7 @@ function sendProduct(product_id){ | ||
59 | consoleLog('发起推送,商品ID: '+product_id); | 58 | consoleLog('发起推送,商品ID: '+product_id); |
60 | 59 | ||
61 | cmd = {cmd:10001,room:room_id,skn:product_id}; | 60 | cmd = {cmd:10001,room:room_id,skn:product_id}; |
62 | - cmd['secret'] = makeSign(cmd); | ||
63 | - delete(cmd['private_key']); | 61 | + cmd = makeSign(cmd); |
64 | 62 | ||
65 | cmd = JSON.stringify(cmd); | 63 | cmd = JSON.stringify(cmd); |
66 | consoleLog('发送消息: '+cmd); | 64 | consoleLog('发送消息: '+cmd); |
@@ -9,7 +9,7 @@ $this->title = '管理后台首页'; | @@ -9,7 +9,7 @@ $this->title = '管理后台首页'; | ||
9 | <div class="panel-heading"> | 9 | <div class="panel-heading"> |
10 | <h5 class="panel-title">弹幕服务器列表</h5> | 10 | <h5 class="panel-title">弹幕服务器列表</h5> |
11 | </div> | 11 | </div> |
12 | - <form class="form-inline" method="post" action="/system/servers"> | 12 | + <!--<form class="form-inline" method="post" action="/system/servers"> |
13 | <div class="panel-body"> | 13 | <div class="panel-body"> |
14 | <div> | 14 | <div> |
15 | <div class="form-group"> | 15 | <div class="form-group"> |
@@ -28,7 +28,16 @@ $this->title = '管理后台首页'; | @@ -28,7 +28,16 @@ $this->title = '管理后台首页'; | ||
28 | </div> | 28 | </div> |
29 | </div> | 29 | </div> |
30 | </div> | 30 | </div> |
31 | - </form> | 31 | + </form>--> |
32 | + <div class="panel-body"> | ||
33 | + <?php | ||
34 | + if($ips){ | ||
35 | + foreach($ips as $ip){ | ||
36 | + echo $ip."<br>"; | ||
37 | + } | ||
38 | + } | ||
39 | + ?> | ||
40 | + </div> | ||
32 | </div> | 41 | </div> |
33 | </div> | 42 | </div> |
34 | <div class="col-md-6"> | 43 | <div class="col-md-6"> |
@@ -213,6 +213,7 @@ class LivingController extends BaseController | @@ -213,6 +213,7 @@ class LivingController extends BaseController | ||
213 | 'master_meta'=>'', | 213 | 'master_meta'=>'', |
214 | 'title'=>$model->title, | 214 | 'title'=>$model->title, |
215 | 'pic'=>CommonImages::getTemplateComplex($model->pic, 2), | 215 | 'pic'=>CommonImages::getTemplateComplex($model->pic, 2), |
216 | + 'background_pic'=>CommonImages::getSourceUrl($model->background_pic), | ||
216 | 'watermark'=>$model->watermark, | 217 | 'watermark'=>$model->watermark, |
217 | 'living'=>$model->living, | 218 | 'living'=>$model->living, |
218 | 'like_num'=>0, | 219 | 'like_num'=>0, |
@@ -265,7 +266,7 @@ class LivingController extends BaseController | @@ -265,7 +266,7 @@ class LivingController extends BaseController | ||
265 | } | 266 | } |
266 | } | 267 | } |
267 | 268 | ||
268 | - $ret['background_pic'] = 'http://img11.static.yhbimg.com/global/2016/08/17/18/01f17a9cd44149052482e4ee58e590cf1b.png'; | 269 | + $ret['background_pic'] = $ret['background_pic'] ? : 'http://img11.static.yhbimg.com/global/2016/08/17/18/01f17a9cd44149052482e4ee58e590cf1b.png'; |
269 | $ret['share_url'] = 'http://m.yohobuy.com/activity/live/'.$room_id; | 270 | $ret['share_url'] = 'http://m.yohobuy.com/activity/live/'.$room_id; |
270 | $ret['share_title'] = '有货潮流新品节直播开始啦,快来看!'; | 271 | $ret['share_title'] = '有货潮流新品节直播开始啦,快来看!'; |
271 | $ret['share_content'] = 'YO\'HOOD嘉年华现场火热直播中,明星潮牌等你来!'; | 272 | $ret['share_content'] = 'YO\'HOOD嘉年华现场火热直播中,明星潮牌等你来!'; |
-
Please register or login to post a comment