@@ -175,4 +175,17 @@ class Tvindex extends Api
$this->success('详情', $result);
}
+ //专题页
+ public function zhuanti(){
+ $type_id = input('type_id', 0, 'intval'); //分类id
+ if (!$type_id) {
+ $this->error('您的网络开小差了~');
+ }
+
+ $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 = list_domain_image($list, ['image']);
+ $this->success('视频', $list);
@@ -205,6 +205,12 @@ class Api
*/
protected function success($msg = '', $data = null, $code = 1, $type = null, array $header = [])
{
+ if($msg == 1){
+ $msg = 'success';
+ if(empty($msg)){
+ $msg = '操作成功';
$this->result($msg, $data, $code, $type, $header);
@@ -218,6 +224,9 @@ class Api
protected function error($msg = '', $data = null, $code = 0, $type = null, array $header = [])
+ $msg = __('Invalid parameters');