/** * 获取所有用户信息 * @return json */ public function listall() { $data = $this->user_model->findAll(); $result = array_for_list($data, array(), true, 'success'); $this->renderJson($result); }
/** * 获取提醒 * @return json */ public function listall() { $cond = $this->isPost() ? $this->input->post() : $this->input->get(); $data = $this->tips_model->findAll($cond); if ($data) { $result = array_for_list($data, array(), true, 'success'); } else { $result = array_for_list($data, array(), false, 'success'); } $this->renderJson($result); }