ContentWidget::loadMore PHP Method

loadMore() public method

载入频道内容
public loadMore ( ) : json
return json 频道渲染内容
    public function loadMore()
    {
        // 频道分类ID
        $cid = intval($_REQUEST['cid']);
        $loadLimit = intval($_REQUEST['loadlimit']);
        $loadId = intval($_REQUEST['loadId']);
        $loadCount = intval($_REQUEST['loadcount']);
        $order = intval($_REQUEST['order']);
        // 获取HTML数据
        $content = $this->getData($cid, $loadLimit, $loadId, $order, $loadCount);
        // 查看是否有更多数据
        if (empty($content['html']) && empty($content['pageHtml'])) {
            $return['status'] = 0;
            $return['msg'] = L('PUBLIC_WEIBOISNOTNEW');
        } else {
            $return['status'] = 1;
            $return['msg'] = L('PUBLIC_SUCCESS_LOAD');
            $return['html'] = $content['html'];
            $return['loadId'] = $content['lastId'];
            $return['firstId'] = empty($_REQUEST['p']) && empty($_REQUEST['loadId']) ? $content['firstId'] : 0;
            $return['pageHtml'] = $content['pageHtml'];
        }
        exit(json_encode($return));
    }