|
|
@ -154,7 +154,7 @@ class index extends publicBase { |
|
|
|
|
|
|
|
$m_user_case = new mUserCase(); |
|
|
|
$data = $m_user_case->getUserCaseList($uinfo['uid'], $page_num, $page_size); |
|
|
|
if (!$data) $this->ajax_json(false, $m_user_case->getError()); |
|
|
|
if (!$data) $this->ajax_json(true, $m_user_case->getError()); |
|
|
|
$total = $m_user_case->getUserCaseListCount($uinfo['uid']); |
|
|
|
|
|
|
|
$rdata = array( |
|
|
@ -249,7 +249,7 @@ class index extends publicBase { |
|
|
|
$return = $m_user_case->postCUrl($post_url, $data); |
|
|
|
|
|
|
|
$res = json_decode($return, 1); |
|
|
|
if (isset($res['info'])) $this->ajax_json(false, $res['info']); |
|
|
|
if (isset($res['info'])) $this->ajax_json(false, '未查询到可导出的医案记录'); |
|
|
|
|
|
|
|
$pdf_name = md5($uinfo['uid'] . $id) . ".pdf"; |
|
|
|
$m_user_case->createPdf($uinfo['uid'], $pdf_name, $return); |
|
|
@ -257,10 +257,8 @@ class index extends publicBase { |
|
|
|
$email = $this->post('email'); |
|
|
|
if (!empty($email)) { |
|
|
|
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) $this->ajax_json(false, '邮箱地址无效'); |
|
|
|
|
|
|
|
$res = $m_user_case->sendMail(array($email), date('Y年m月d日', time()) . '-医案导出', '', sprintf(USER_CASE_PDF_PATH, $uinfo['uid']) . $pdf_name); |
|
|
|
if (!$res) $this->ajax_json(true, '发送失败'); |
|
|
|
|
|
|
|
$this->ajax_json(true, '发送成功'); |
|
|
|
} |
|
|
|
|
|
|
|