|
@@ -781,7 +781,50 @@ class Video extends Base
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * @title 以下接口学习服务模块的
|
|
|
+ * @desc
|
|
|
+ * @author qc
|
|
|
+ * @method
|
|
|
+ * @url /api/Video/learn()
|
|
|
+ */
|
|
|
+ public function learn(){}
|
|
|
|
|
|
+ /**
|
|
|
+ * @title 图文学习历史
|
|
|
+ * @desc 图文学习历史
|
|
|
+ * @author qc
|
|
|
+ * @method GET
|
|
|
+ * @url /api/Video/getLearnHistory
|
|
|
+ * @header name:Authorization require:1 desc:Token
|
|
|
+ * @param name:title type:string default:-- desc:标题
|
|
|
+ * @param name:page type:int default:0 desc:页数
|
|
|
+ * @param name:page_num type:int default:20 desc:每页数
|
|
|
+ * @return name:title type:string default:-- desc:标题
|
|
|
+ * @return name:video_id type:string default:-- desc:视频id
|
|
|
+ * @return name:url_id type:string default:-- desc:url_id
|
|
|
+ * @return name:cover type:string default:-- desc:封面
|
|
|
+ * @return name:time type:string default:-- desc:时间
|
|
|
+ */
|
|
|
+ public function getLearnHistory()
|
|
|
+ {
|
|
|
+ $sel_where = [];
|
|
|
+ $sel_where[] = ['t.user_id','=',$this->user_id];
|
|
|
+ $sel_where[] = ['t.type','=',1];
|
|
|
+ $title = input('get.title');
|
|
|
+ if($title) $sel_where[] = ['i.title','like','%'.$title.'%'];
|
|
|
+ $list = UserTrack::where($sel_where)
|
|
|
+ ->alias('t')
|
|
|
+ ->field('t.id,t.update_int,t.first_id video_id,t.second_id url_id,i.title,i.cover,i.ali_vid')
|
|
|
+ ->leftJoin('VideoUrl i','t.second_id = i.id')
|
|
|
+ ->order('update_int desc')
|
|
|
+ ->limit($this->off_set,$this->page_num)
|
|
|
+ ->select()->toArray();
|
|
|
+ foreach ($list as &$v) {
|
|
|
+ $v['time'] = date("Y-m-d H:i:s",$v['update_int']);
|
|
|
+ }
|
|
|
+ $this->success('ok',['list'=>$list]);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|