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


PHP BaseController::get_curl方法代碼示例

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


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

示例1: indexAction

 /**
  * 醫生詳情頁
  */
 public function indexAction($hospitalId, $deptId, $id)
 {
     $hospitalId = htmlspecialchars($hospitalId);
     $deptId = htmlspecialchars($deptId);
     $id = htmlspecialchars($id);
     $doctorItems = array(1 => '主任醫師', 2 => '主治醫師', 3 => '副主任醫師', 4 => '醫師', 5 => '其他');
     $academicItems = array(1 => '教授', 2 => '副教授', 3 => '其他');
     $effect = array(0 => '不知道', 1 => '非常不滿意', 2 => '不滿意', 3 => '一般', 4 => '滿意', 5 => '很滿意');
     $attitude = array(1 => '非常不滿意', 2 => '不滿意', 3 => '一般', 4 => '滿意', 5 => '很滿意');
     //獲取醫生信息
     $doctor = parent::get_curl(array('url' => 'expert/info', 'hospitalId' => $hospitalId, 'hdeptId' => $deptId, 'expertId' => $id));
     //預約規則
     $rule = parent::get_curl(array('url' => 'hospital/detail', 'id' => $hospitalId));
     //醫院ID
     //就醫分享
     $share = parent::get_curl(array('url' => 'extcoop/comments/exphosp/id', 'type' => 2, 'id' => $id));
     //同科室專家
     $expert = parent::get_curl(array('url' => 'expert/info', 'hospitalId' => $hospitalId, 'hdeptId' => $deptId, 'currentPage' => 1, 'pageSize' => 5));
     //醫生信息數據
     $this->getView()->assign('doctor', $doctor['experts']['expert']);
     $this->getView()->assign('doctorItems', $doctorItems);
     $this->getView()->assign('academicItems', $academicItems);
     $this->getView()->assign('hospitalId', $hospitalId);
     $this->getView()->assign('deptId', $deptId);
     $this->getView()->assign('id', $id);
     $this->getView()->assign('doctor', $doctor['experts']['expert']);
     //預約規則數據
     $this->getView()->assign('rule', $rule['hospital']);
     //就醫分享數據
     $this->getView()->assign('share', $share['comments']['comment']);
     $this->getView()->assign('effect', $effect);
     $this->getView()->assign('attitude', $attitude);
     //同科室專家
     $this->getView()->assign('expert', $expert['experts']['expert']);
 }
開發者ID:290329416,項目名稱:guahao,代碼行數:38,代碼來源:Doctordetails.php

示例2: csAction

 function csAction()
 {
     if ($_POST) {
         $cs_a = parent::get_curl(array('url' => 'extcoop/diagnose/next', 'labelId' => '201091172350531', 'id' => "{$_POST['id']}", 'isSelect' => 0));
         print_r(json_encode('{id:' . $cs_a['diagnose']['id'] . ',content:' . $cs_a['diagnose']['content'] . '}'));
         exit;
     }
     $cs = parent::get_curl(array('url' => 'extcoop/symptom/diagnose', 'labelId' => '201091172350531', 'id' => "{$_GET['id']}"));
     //echo "<pre>";
     //print_r($cs);
     //exit;
     $this->getView()->assign('csdiagnose', $cs['diagnose']);
     $this->getView()->assign('cssymptom', $cs['symptom']);
 }
開發者ID:290329416,項目名稱:guahao,代碼行數:14,代碼來源:Diagnose.php

示例3: indexAction

 function indexAction()
 {
     if (!$_GET['key']) {
         $_GET['key'] = '內科';
     }
     $urlmd5 = md5($_SERVER['REQUEST_URI']);
     $doctor = json_decode($this->redis->get($urlmd5), true);
     if ($doctor == false) {
         $doctor = parent::get_curl(array('url' => '/extcoop/department/search/expert', 'name' => htmlspecialchars($_GET['key']), 'sort' => 1, 'hospitalLevel' => htmlspecialchars($_GET['hospitalLevel']), 'expertTitle' => htmlspecialchars($_GET['expertTitle']), 'provinceId' => htmlspecialchars($_GET['cityId']), 'currentPage' => htmlspecialchars($_GET['page']), 'pageSize' => 12));
         $this->redis->set($urlmd5, json_encode($doctor), 3600);
     }
     $npage = strpos($_SERVER['REQUEST_URI'], 'page');
     if ($npage) {
         $newurl = ltrim(substr($_SERVER['REQUEST_URI'], 0, $npage - 1), '/');
     } else {
         $newurl = ltrim($_SERVER['REQUEST_URI'], '/');
     }
     if ($newurl == 'doctor') {
         $newurl = 'doctor?did=7f640bba-cff3-11e1-831f-5cf9dd2e7135&key=內科&cityId=&hospitalLevel=&expertTitle=';
     }
     if ($_GET['page'] && $_GET['page'] <= $doctor['totalPage'] && $_GET['page'] > 0) {
         $num = $_GET['page'];
     } elseif ($_GET['page'] >= $doctor['totalPage'] - 5) {
         $num = $doctor['totalPage'] - 5;
     } elseif ($_GET['page'] <= 0) {
         $num = 1;
     }
     $page = "<a href='" . BASEURL . $newurl . "&page=1" . "'>首頁</a>";
     for ($i = $num - 4 <= 0 ? 1 : $num - 4; $i <= ($num + 4 <= 8 ? 8 : $num + 4); $i++) {
         if ($i <= $doctor['totalPage']) {
             if ($i == $num) {
                 $page .= "<a href='" . BASEURL . $newurl . "&page=" . $i . "'><font color='#FF0000'><b>" . $i . "</b></font></a>";
             } else {
                 $page .= "<a href='" . BASEURL . $newurl . "&page=" . $i . "'>" . $i . "</a>";
             }
             if ($i == ($num + 4 <= 8 ? 8 : $num + 4)) {
                 $page .= "<a href='" . BASEURL . $newurl . "&page=" . $doctor['totalPage'] . "'>尾頁</a>";
             }
         }
     }
     $page .= "  {$doctor['currentPage']}/{$doctor['totalPage']}";
     $this->getView()->assign('doctor', $doctor['experts']['expert']);
     $this->getView()->assign('key', $_GET['key']);
     $this->getView()->assign('cityId', $_GET['cityId']);
     $this->getView()->assign('hospitalLevel', $_GET['hospitalLevel']);
     $this->getView()->assign('expertTitle', $_GET['expertTitle']);
     $this->getView()->assign('page', $page);
 }
開發者ID:290329416,項目名稱:guahao,代碼行數:48,代碼來源:Doctor.php

示例4: newsAction

 /**
  * 醫院相關文章頁
  */
 public function newsAction($hospitalId, $newsid)
 {
     $hospitalId = htmlspecialchars($hospitalId);
     $newsid = htmlspecialchars($newsid);
     $doctorItems = array(1 => '主任醫師', 2 => '主治醫師', 3 => '副主任醫師', 4 => '醫師', 5 => '其他');
     $academicItems = array(1 => '教授', 2 => '副教授', 3 => '其他');
     //獲取醫院信息
     $hospital = parent::get_curl(array('url' => 'hospital/detail', 'id' => $hospitalId));
     //本院醫生
     $expert = parent::get_curl(array('url' => 'expert/info', 'hospitalId' => $hospitalId, 'currentPage' => 1, 'pageSize' => 2));
     //醫院相關文章
     $news = file_get_contents("http://manager.ruanwen.haomeit.com/jiekou/souhucontent?articleid={$newsid}");
     $news = json_decode($news, true);
     //醫院信息數據
     $this->getView()->assign('hospital', $hospital['hospital']);
     //本院醫生
     $this->getView()->assign('expert', $expert['experts']['expert']);
     $this->getView()->assign('doctorItems', $doctorItems);
     $this->getView()->assign('academicItems', $academicItems);
     //醫院相關文章
     $this->getView()->assign('news', $news);
 }
開發者ID:290329416,項目名稱:guahao,代碼行數:25,代碼來源:Hospitaldetails.php

示例5: listAction

 public function listAction()
 {
     if (!empty($_POST['provinceId'])) {
         $hospital = parent::get_curl(array('url' => 'extcoop/disease/search/hospital', 'name' => '', 'provinceId' => $_POST['provinceId'], 'sort' => 1, 'pageSize' => 8));
     }
     $list = '';
     for ($i = 0; $i < 8; $i++) {
         $list .= "<li><a href='/h_{$hospital['hospitals']['hospital'][$i]['id']}/'>{$hospital['hospitals']['hospital'][$i]['name']}</a></li>";
     }
     echo $list;
     exit;
 }
開發者ID:290329416,項目名稱:guahao,代碼行數:12,代碼來源:Hospital.php


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