Browse Source

查药方接口 列表增加用户自拟药方

查药方详情 兼容查询用户自拟药方
pull/1/head
pengda 8 months ago
parent
commit
02820f5827
  1. 12
      control/index.php

12
control/index.php

@ -27,7 +27,7 @@ class index extends publicBase {
public function home() { public function home() {
$id = $this->get('id'); $id = $this->get('id');
$mformula = new mFormulaNew(); $mformula = new mFormula();
$data = $mformula->getFormulaInfo($id); $data = $mformula->getFormulaInfo($id);
$this->view['data'] = $data; $this->view['data'] = $data;
@ -40,7 +40,7 @@ class index extends publicBase {
$herbs = $this->post('herbs'); $herbs = $this->post('herbs');
//新增药方 //新增药方
$mformula = new mFormulaNew(); $mformula = new mFormula();
$id = $mformula->createCase($name, $source, $method, $herbs); $id = $mformula->createCase($name, $source, $method, $herbs);
if (!$id) $this->ajax_json(false, $mformula->getError()); if (!$id) $this->ajax_json(false, $mformula->getError());
@ -55,7 +55,7 @@ class index extends publicBase {
$method = trim($this->post('method')); $method = trim($this->post('method'));
$herbs = $this->post('herbs'); $herbs = $this->post('herbs');
$mformula = new mFormulaNew(); $mformula = new mFormula();
$res = $mformula->updateCase($id, $name, $source, $method, $herbs); $res = $mformula->updateCase($id, $name, $source, $method, $herbs);
if (!$res) $this->ajax_json(false, $mformula->getError()); if (!$res) $this->ajax_json(false, $mformula->getError());
@ -71,7 +71,7 @@ class index extends publicBase {
$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') : 20; $page_size = $this->post('page_size') ? $this->post('page_size') : 20;
$mformula = new mFormulaNew(); $mformula = new mFormula();
$list = $mformula->getFormulaList($uinfo['uid'], $page_num, $page_size, $content); $list = $mformula->getFormulaList($uinfo['uid'], $page_num, $page_size, $content);
$total = $mformula->getFormulaTotal($uinfo['uid'], $content); $total = $mformula->getFormulaTotal($uinfo['uid'], $content);
@ -92,7 +92,7 @@ class index extends publicBase {
$id = $this->post('id') + 0; $id = $this->post('id') + 0;
if (!$id) $this->ajax_json(false, '参数错误'); if (!$id) $this->ajax_json(false, '参数错误');
$mformula = new mFormulaNew(); $mformula = new mFormula();
$data = $mformula->getFormulaInfo($id); $data = $mformula->getFormulaInfo($id);
if (!$data) $this->ajax_json(false, $mformula->getError()); if (!$data) $this->ajax_json(false, $mformula->getError());
@ -186,7 +186,7 @@ class index extends publicBase {
$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') : 100;
$mformula = new mFormulaNew(); $mformula = new mFormula();
$data = $mformula->getCollectLog($page_num, $page_size); $data = $mformula->getCollectLog($page_num, $page_size);
$total = $mformula->getCollectLogTotal(); $total = $mformula->getCollectLogTotal();

Loading…
Cancel
Save