|
@@ -135,7 +135,7 @@ class Video extends Base
|
|
|
->limit($this->off_set,$this->page_num)->select()->toArray();
|
|
|
array_walk($list,function (&$v,$k){
|
|
|
$v['is_collect'] = UserCollect::checkCollectByType($this->user_id,1,$v['id']);
|
|
|
- $v['label_name'] = [$v['label']];
|
|
|
+ $v['label_name'] = explode(',',trim(',',$v['label']));
|
|
|
$v['read_num'] = array_sum(array_column($v['video_arr'],'read_num'));
|
|
|
});
|
|
|
|
|
@@ -179,7 +179,7 @@ class Video extends Base
|
|
|
if($detail['is_deleted'] == 1 || $detail['status'] == 0)$this->error('该视频已下线');
|
|
|
$detail['label_name'] = [];
|
|
|
if($detail['label']) {
|
|
|
- $detail['label_name'] = [$detail['label']];
|
|
|
+ $detail['label_name'] = explode(',',trim(',',$detail['label']));
|
|
|
}
|
|
|
$level_id = UserLevelRank::getUserVip($this->user_id);
|
|
|
foreach ($detail['video_arr'] as &$dv) {
|
|
@@ -373,7 +373,7 @@ class Video extends Base
|
|
|
if($detail['is_deleted'] == 1) $this->error('视频已删除');
|
|
|
$detail['label_name'] = [];
|
|
|
if($detail['label']) {
|
|
|
- $detail['label_name'] = [$detail['label']];
|
|
|
+ $detail['label_name'] =explode(',',trim(',',$detail['label']));
|
|
|
}
|
|
|
$this->success('获取成功',['detail'=>$detail]);
|
|
|
}
|