public function render($data)
{
// 设置频道模板
$template = empty($data['tpl']) ? 'list' : t($data['tpl']);
// 配置参数
// $var['loadCount'] = intval($data['loadCount']);
// $var['loadMax'] = intval($data['loadMax']);
// $var['loadId'] = intval($data['loadId']);
// $var['loadLimit'] = intval($data['loadLimit']);
$var['cid'] = intval($data['cid']);
$var['order'] = intval($_REQUEST['order']);
// 获取分享数据
if ($template == 'list' || true) {
$var['list'] = $this->getListData($var['cid']);
// 分享配置
$weiboSet = model('Xdata')->get('admin_Config:feed');
$var['weibo_premission'] = $weiboSet['weibo_premission'];
}
if ($template === 'load') {
$var['categoryJson'] = json_encode($data['channelCategory']);
}
$var['cancomment_old_type'] = array('post', 'repost', 'postimage', 'postfile', 'weiba_post', 'weiba_repost', 'blog_post', 'blog_repost', 'event_post', 'event_repost', 'vote_post', 'vote_repost', 'photo_post', 'photo_repost');
$content = $this->renderFile(dirname(__FILE__) . '/' . $template . '.html', $var);
return $content;
}