當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PageNav::getPageNavTemplate4DiseasePage方法代碼示例

本文整理匯總了PHP中PageNav::getPageNavTemplate4DiseasePage方法的典型用法代碼示例。如果您正苦於以下問題:PHP PageNav::getPageNavTemplate4DiseasePage方法的具體用法?PHP PageNav::getPageNavTemplate4DiseasePage怎麽用?PHP PageNav::getPageNavTemplate4DiseasePage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PageNav的用法示例。


在下文中一共展示了PageNav::getPageNavTemplate4DiseasePage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: wxMsgImageList

 public function wxMsgImageList($request, $response)
 {
     /*{{{*/
     $wxUserId = $request->getRequest('WxUserId', 0);
     $nowPage = $request->getRequest('p', 1);
     $res = WxMgrClient::getInstance()->queryWxMsgList($wxUserId, $nowPage, 30, array('msgtype' => 'image'));
     $wxMsgImageList = array();
     if (false == empty($res['ids'])) {
         $wxMsgImageList = DAL::get()->find('WxMsg', $res['ids']);
     }
     $response->wxMsgImageList = $wxMsgImageList;
     $pageLink = '';
     if (empty($res['pageInfo']) == false) {
         $url = "/wxmgr/wxmsgimagelist?wxUserId=" . $wxUserId;
         $pageLink = PageNav::getNavLink(PageNav::getPageNavTemplate4DiseasePage($url . "&p="), $res['pageInfo']['nowpage'], $res['pageInfo']['pagesize'], $res['pageInfo']['total']);
     }
     $response->pageLink = $pageLink;
 }
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:18,代碼來源:wxmgrcontroller.php

示例2: diseasePageZhuanti

    public function diseasePageZhuanti($request, $response)
    {/*{{{*/
        $diseasePage = DiseasePage::getByDiseaseId($this->disease->id);
        $response->diseasePage = $diseasePage;
        $queryType = $request->getRequest('queryType', self::ZHUANTI_QUERYTYPE_LABLE);
        $response->queryType = $queryType;
        $options = array();
        $options['diseaseId'] = $this->disease->id;
        if (false == empty($queryType))
        {
            $options['queryType'] = $queryType;
        }

        $rootLableKey = $request->getRequest('rootLableKey', '');
        $response->rootLableKey = $rootLableKey;
        if (false == empty($rootLableKey))
        {
            $options['rootLableKey'] = $rootLableKey;
        }

        $leafLableKey = $request->getRequest('leafLableKey', '');
        $response->leafLableKey = $leafLableKey;
        if (false == empty($leafLableKey))
        {
            $options['leafLableKey'] = $leafLableKey;
        }

        $cmsCategory = $request->getRequest('cmsCategory', '');
        $response->cmsCategory = $cmsCategory;
        if (false == empty($cmsCategory))
        {
            $options['cmsCategory'] = $cmsCategory;
        }

        $lableName = "專家觀點";
        if ($rootLableKey) 
        {
            $lableList = LableDefine::getRootLableList();
            $lableName = $lableList[$rootLableKey];
        }
        else if ($leafLableKey)
        {
            $lableName = LableDefine::getLableTitle($leafLableKey);
        }
        else if ($cmsCategory)
        {
            $lableName = CmsObjCategory::getDesc($cmsCategory);
        }
        $response->lableName = $lableName;

        $page = $request->getRequest('page', 1);
        $response->page = $page;
        $pageSize = $request->getRequest('pageSize', 10);

        if(stripos($_SERVER['REQUEST_URI'], 'leafLableKey=') 
           || stripos($_SERVER['REQUEST_URI'], 'rootLableKey=')
           || stripos($_SERVER['REQUEST_URI'], 'queryType=')
           || stripos($_SERVER['REQUEST_URI'], 'cmsCategory=')
           )
        {
            $jumpUrl = DiseasePage::getZhuantiUrl($diseasePage->disease->key, $queryType, $rootLableKey, $leafLableKey, $cmsCategory);
            if ($page > 1)
            {
                $jumpUrl .= "?page=$page";
            }
           $response->exitJump($jumpUrl, 301);
        }

        $res = $diseasePage->getPaperAndZhuantiList4ZhuantiPage($page, $pageSize, $options);
        $response->id2Types = $res['id2Types'];
        $response->pageLink = PageNav::getNavLink(
                 PageNav::getPageNavTemplate4DiseasePage(DiseasePage::getZhuantiUrl($this->disease->key, $queryType, $rootLableKey, $leafLableKey, $cmsCategory).'&page='), $page, $pageSize, $res['total']);

        $disease=$this->disease;
        $ddCnt = DiseaseClient::getInstance()->getDiseaseDoctorCnt($this->disease->id);
//        $title=$disease->name."專題_".$disease->name."_專家觀點_好大夫在線";
        $keywords=$disease->name."專題,".$disease->name."專家觀點";
        $description="中國最大的醫療網站-好大夫在線為您提供".$disease->name."詳細介紹,".$disease->name."症狀,".$disease->name."治療,".$disease->name."吃什麽等。更多".$disease->name."知識,".$ddCnt."位".$disease->name."專家觀點,".$res['total']."篇".$disease->name."專題";
 //       $response->title=$title;
        $response->keywords=$keywords;
        $response->description=$description;

    }/*}}}*/
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:83,代碼來源:diseasecontroller.php


注:本文中的PageNav::getPageNavTemplate4DiseasePage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。