|
|
@@ -21,16 +21,16 @@ class VideoController extends webApp
|
|
|
*/
|
|
|
public function index()
|
|
|
{
|
|
|
-// try {
|
|
|
+ try {
|
|
|
$params = request()->post();
|
|
|
$pageSize = request()->post('pageSize', 0);
|
|
|
$params['is_recommend'] = 1;
|
|
|
$datas = VideoService::make()->getIndexList($params, $pageSize,'', $this->userId);
|
|
|
return message(1010, true, $datas);
|
|
|
-// } catch (\Exception $exception){
|
|
|
-// RedisService::set("caches:request:error_video_index", ['error'=>$exception->getMessage(),'trace'=>$exception->getTrace()], 7200);
|
|
|
-// return message(1018, false, ['error'=>env('APP_DEBUG')? $exception->getMessage() : '']);
|
|
|
-// }
|
|
|
+ } catch (\Exception $exception){
|
|
|
+ RedisService::set("caches:request:error_video_index", ['error'=>$exception->getMessage(),'trace'=>$exception->getTrace()], 7200);
|
|
|
+ return message(1018, false, ['error'=>env('APP_DEBUG')? $exception->getMessage() : '']);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -44,6 +44,7 @@ class VideoController extends webApp
|
|
|
$pageSize = request()->post('pageSize', 0);
|
|
|
$type = request()->post('type', 1);
|
|
|
// 我的视频
|
|
|
+ $datas = [];
|
|
|
if($type == 1){
|
|
|
$datas = VideoService::make()->getDataList($params, $pageSize,'', $this->userId);
|
|
|
}
|