...
|
...
|
@@ -22,28 +22,6 @@ class LivingController extends BaseController |
|
|
return parent::beforeAction($action);
|
|
|
}
|
|
|
|
|
|
public function behaviors()
|
|
|
{
|
|
|
return [];
|
|
|
return [
|
|
|
[
|
|
|
'class' => 'yii\filters\PageCache',
|
|
|
'only' => ['detail'],
|
|
|
'duration' => 3600,
|
|
|
'cache' => 'pageCache',
|
|
|
'variations' => [
|
|
|
$this->requests('room_id',0),
|
|
|
$this->requests('video_id',0),
|
|
|
],
|
|
|
/*'dependency' => [
|
|
|
'class' => 'yii\caching\DbDependency',
|
|
|
'sql' => 'SELECT COUNT(*) FROM post',
|
|
|
'sql' => 'SELECT MAX(updated_at) FROM post',
|
|
|
],*/
|
|
|
],
|
|
|
];
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 精选房间
|
|
|
*/
|
...
|
...
|
@@ -299,13 +277,14 @@ class LivingController extends BaseController |
|
|
$this->renderJson(Yii::$app->params['success_code'],'',$ret);
|
|
|
}elseif ($video_id = $this->requests('video_id'))
|
|
|
{//重播视频详情
|
|
|
$key = __CLASS__.__FUNCTION__.'video_id'.$room_id;
|
|
|
$key = __CLASS__.__FUNCTION__.'video_id'.$video_id;
|
|
|
if (!$ret = $this->cache->get($key)){
|
|
|
if (!$model = Video::findOne(['id'=>$video_id])){
|
|
|
$this->renderJson(Yii::$app->params['failed_code'],'找不到该回放');
|
|
|
}
|
|
|
|
|
|
$ret = [
|
|
|
'video_id'=>$model->id,
|
|
|
'master_pic'=>'',
|
|
|
'master_name'=>'',
|
|
|
'master_meta'=>'',
|
...
|
...
|
|