|
@ -51,13 +51,20 @@ class index extends publicBase { |
|
|
if (empty($content)) $this->ajax_json(false, '请输入方名'); |
|
|
if (empty($content)) $this->ajax_json(false, '请输入方名'); |
|
|
|
|
|
|
|
|
$page_num = $this->post('page_num') ? $this->post('page_num') : 1; |
|
|
$page_num = $this->post('page_num') ? $this->post('page_num') : 1; |
|
|
$page_size = $this->post('page_size') ? $this->post('page_size') : 100; |
|
|
$page_size = $this->post('page_size') ? $this->post('page_size') : 20; |
|
|
|
|
|
|
|
|
$m_case = new mCase(); |
|
|
$m_case = new mCase(); |
|
|
$data = $m_case->getCaseByName($content, $page_num, $page_size); |
|
|
$data = $m_case->getCaseByName($content, $page_num, $page_size); |
|
|
$total = $m_case->getCaseByNameTotal($content); |
|
|
$total = $m_case->getCaseByNameTotal($content); |
|
|
|
|
|
$rdata = array( |
|
|
|
|
|
'total'=>$total, |
|
|
|
|
|
'per_page' => $page_size, |
|
|
|
|
|
'last_page' => ceil($total / $page_size), |
|
|
|
|
|
'current_page' => $page_num, |
|
|
|
|
|
'data' => $data |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
$this->ajax_json(true, '获取成功', array('total' => $total, 'current_page' => $page_num, 'total_page' => ceil($total / $page_size), 'list' => $data)); |
|
|
$this->ajax_json(true, '获取成功', $rdata); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function ajax_case_detail() { |
|
|
public function ajax_case_detail() { |
|
|