本文整理汇总了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']);
}
示例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']);
}
示例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);
}
示例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);
}
示例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;
}