public function video_list($type, $since_id = 0, $max_id = 0, $limit = 20, $page = 1, $sql = '', $order = '')
{
$since_id = intval($since_id);
$max_id = intval($max_id);
$limit = intval($limit);
$page = intval($page);
$where = ' is_del = 0 ' . $sql;
//动态类型
// if(in_array($type,array('post','repost','postimage','postfile','postvideo'))){
$where .= " AND type='postvideo' ";
// }
if (!empty($since_id) || !empty($max_id)) {
!empty($since_id) && ($where .= " AND feed_id > {$since_id}");
!empty($max_id) && ($where .= " AND feed_id < {$max_id}");
}
$start = ($page - 1) * $limit;
$end = $limit;
if ($order == '') {
$order = 'digg_count DESC,feed_id DESC';
}
$feed_ids = $this->where($where)->field('feed_id')->limit("{$start},{$end}")->order($order)->getAsFieldArray('feed_id');
// //第一页加入置顶分享
// $list = M('FeedTop')->where('status=0')->order('id desc')->findAll();
// if( $list!=false && $start==0 ){
// $top_feed_ids = getSubByKey($list,'feed_id');
// if( is_array($top_feed_ids) && is_array($feed_ids) )
// $feed_ids = array_merge($top_feed_ids,$feed_ids);
// }
return $this->formatFeed($feed_ids, true);
}