|
@@ -221,20 +221,20 @@ class Tvindex extends Api
|
|
|
|
|
|
//专题页
|
|
//专题页
|
|
public function zhuanti(){
|
|
public function zhuanti(){
|
|
- $type_id = input('type_id', 0, 'intval'); //分类id
|
|
|
|
- if (!$type_id) {
|
|
|
|
|
|
+ $childcate_id = input('child_id', 0, 'intval'); //子分类id
|
|
|
|
+ if (!$childcate_id) {
|
|
$this->error('您的网络开小差了~');
|
|
$this->error('您的网络开小差了~');
|
|
}
|
|
}
|
|
|
|
|
|
- $video_type = Db::name('video_type')->field('id,name,bg_image')->where('id',$type_id)->find();
|
|
|
|
- $video_type = info_domain_image($video_type,['bg_image']);
|
|
|
|
|
|
+ $video_childcate = Db::name('video_childcate')->field('id,name,bg_image')->where('id',$childcate_id)->find();
|
|
|
|
+ $video_childcate = info_domain_image($video_childcate,['bg_image']);
|
|
|
|
|
|
- $list = Db::name('video')->field('id, title, image, is_pay, status, inject_status, seriesid, programid, movieid')->where(['video_type_id' => $type_id, 'status' => 1, 'inject_status' => 2])->order('weigh asc, id desc')->limit(5)->select();
|
|
|
|
|
|
+ $list = Db::name('video')->field('id, title, image, is_pay, status, inject_status, seriesid, programid, movieid')->where(['childcate_id' => $childcate_id, 'status' => 1, 'inject_status' => 2])->order('weigh asc, id desc')->limit(5)->select();
|
|
|
|
|
|
$list = list_domain_image($list, ['image']);
|
|
$list = list_domain_image($list, ['image']);
|
|
|
|
|
|
$result = [
|
|
$result = [
|
|
- 'info' => $video_type,
|
|
|
|
|
|
+ 'info' => $video_childcate,
|
|
'list' => $list,
|
|
'list' => $list,
|
|
];
|
|
];
|
|
$this->success('视频', $result);
|
|
$this->success('视频', $result);
|