yangsai@163.com 6 months ago
parent c5ee173037
commit 3d7311cf44
  1. 2
      application/controllers/Api/Cage.php
  2. 2
      application/models/Squirrel.php

@ -121,9 +121,7 @@ class Api_CageController extends Ctrl_Api{
}
public function getCageinfoACtion(){
$id = empty($this->POST['id'])?Tool_Fnc::apiMsg('缺少笼位ID', '500'):$this->POST['id'];
$type = empty($this->POST['type'])?Tool_Fnc::apiMsg('缺少笼位ID', '500'):$this->POST['type'];
$params['where'] = "and cage = {$id}";
$params['type'] =$type;
$data['cage'] = $this->Cagemodel->getOneInfo($id);
$data['cage']['code'] = '';
$data['squirrel'] = $this->SquirrelModel->getModelList($params);

@ -45,7 +45,7 @@ class SquirrelModel extends Orm_Base{
$val['icon'] = $this->getIcon($val['id'])['icon'];
}
//获取繁殖笼幼崽信息
$data['youzailishi'] = $params['type']==2?$NewSquirrel->getModelList($params):[];
$data['youzailishi'] = empty($NewSquirrel->getModelList($params))?$NewSquirrel->getModelList($params):[];
return $data;

Loading…
Cancel
Save