_json_succ($result); } // Index Category public function category() { if(!$this->checkIslogin()) return $this->_json_error('请登录' , 777); return $this->_json_succ(Category::make_tree(Category::select())); } // 某分类下all public function getAllIllnessByPid() { if(!$this->checkIslogin()) return $this->_json_error('请登录' , 777); $pid = Request::param('id') ?? ''; $field = 'id , clinical_manifestation , pathogeny , complication , auxiliary , diagnose , cure'; $data = Illness::field($field)->where(['category' => $pid])->select(); return $this->_json_succ($data); } // 单个 public function singleIllness() { if(!$this->checkIslogin()) return $this->_json_error('请登录' , 777); $id = Request::param('id') ?? ''; $field = 'id , illness_name , illness_as_name , icd_number , medicinal , illness_desc , epidemiology'; $data = Illness::field($field)->where(['id' => $id])->find(); return $this->_json_succ($data); } }