|
|
@ -57,7 +57,7 @@ class index extends publicBase { |
|
|
|
$data = $m_case->getCaseByName($content, $page_num, $page_size); |
|
|
|
$total = $m_case->getCaseByNameTotal($content); |
|
|
|
$rdata = array( |
|
|
|
'total'=>$total, |
|
|
|
'total' => $total, |
|
|
|
'per_page' => $page_size, |
|
|
|
'last_page' => ceil($total / $page_size), |
|
|
|
'current_page' => $page_num, |
|
|
@ -91,12 +91,12 @@ class index extends publicBase { |
|
|
|
$data = array( |
|
|
|
'name' => trim($this->post('name')), |
|
|
|
'patient_name' => trim($this->post('patient_name')), |
|
|
|
'patient_age' => $this->post('patient_age')+0, |
|
|
|
'patient_sex' => $this->post('patient_sex')+0, |
|
|
|
'patient_age' => $this->post('patient_age') + 0, |
|
|
|
'patient_sex' => $this->post('patient_sex') + 0, |
|
|
|
'patient_say' => trim($this->post('patient_say')), |
|
|
|
'first_diagnosis' => trim($this->post('first_diagnosis')), |
|
|
|
'diagnosis' => trim($this->post('diagnosis')), |
|
|
|
'prescribe_num' => $this->post('prescribe_num')+0, |
|
|
|
'prescribe_num' => $this->post('prescribe_num') + 0, |
|
|
|
'prescribe_herb' => $this->post('prescribe_herb'), |
|
|
|
); |
|
|
|
|
|
|
@ -147,7 +147,7 @@ class index extends publicBase { |
|
|
|
$total = $m_user_case->getUserCaseListCount($uid); |
|
|
|
|
|
|
|
$rdata = array( |
|
|
|
'total'=>$total, |
|
|
|
'total' => $total, |
|
|
|
'per_page' => $page_size, |
|
|
|
'last_page' => ceil($total / $page_size), |
|
|
|
'current_page' => $page_num, |
|
|
@ -183,7 +183,15 @@ class index extends publicBase { |
|
|
|
$data = $m_case->getCollectLog($page_num, $page_size); |
|
|
|
$total = $m_case->getCollectLogTotal(); |
|
|
|
|
|
|
|
$this->ajax_json(true, '获取成功', array('total' => $total, 'current_page' => $page_num, 'total_page' => ceil($total / $page_size), 'list' => $data)); |
|
|
|
$rdata = array( |
|
|
|
'total' => $total, |
|
|
|
'per_page' => $page_size, |
|
|
|
'last_page' => ceil($total / $page_size), |
|
|
|
'current_page' => $page_num, |
|
|
|
'data' => $data |
|
|
|
); |
|
|
|
|
|
|
|
$this->ajax_json(true, '获取成功', $rdata); |
|
|
|
} |
|
|
|
|
|
|
|
public function ajax_login() { |
|
|
@ -196,7 +204,11 @@ class index extends publicBase { |
|
|
|
|
|
|
|
$token = $m_user->getToken($user['uid']); |
|
|
|
|
|
|
|
$this->ajax_json(true, '登录成功', array('uid' => $user['uid'], 'identifier' => $user['identifier'], 'token' => $token)); |
|
|
|
$this->ajax_json(true, '登录成功', array( |
|
|
|
'uid' => $user['uid'], |
|
|
|
'identifier' => $user['identifier'], |
|
|
|
'token' => $token |
|
|
|
)); |
|
|
|
} |
|
|
|
|
|
|
|
public function ajax_get_user() { |
|
|
@ -206,7 +218,7 @@ class index extends publicBase { |
|
|
|
|
|
|
|
$obj = new mUser(); |
|
|
|
$uinfo = $obj->getUserByUid($uid); |
|
|
|
if(empty($uinfo)) $this->ajax_json(false, '未登录或登录已经失效', array('code' => CODE_LOGIN_EXIPRE)); |
|
|
|
if (empty($uinfo)) $this->ajax_json(false, '未登录或登录已经失效', array('code' => CODE_LOGIN_EXIPRE)); |
|
|
|
|
|
|
|
$this->ajax_json(true, '', $uinfo); |
|
|
|
} |
|
|
@ -239,7 +251,7 @@ class index extends publicBase { |
|
|
|
$pdf_url = $m_user_case->createPdf($uid, $data_key); |
|
|
|
|
|
|
|
$rdata = array( |
|
|
|
'total'=>$total, |
|
|
|
'total' => $total, |
|
|
|
'per_page' => $page_size, |
|
|
|
'last_page' => ceil($total / $page_size), |
|
|
|
'current_page' => $page_num, |
|
|
|