|
|
@ -29,7 +29,7 @@ class NewSquirrelModel extends Orm_Base{ |
|
|
|
$data=$this->field('id,count,birthday,father,mother,strains,gene,remark,cage')->where("id>0 {$params['where']}")->fList(); |
|
|
|
$data=$this->field('id,count,birthday,father,mother,strains,gene,remark,cage')->where("id>0 {$params['where']}")->fList(); |
|
|
|
foreach($data as $key => &$val){ |
|
|
|
foreach($data as $key => &$val){ |
|
|
|
$val['cage'] = $CageModel->field('number')->where("id={$val['cage']}")->fRow()['number']; |
|
|
|
$val['cage'] = $CageModel->field('number')->where("id={$val['cage']}")->fRow()['number']; |
|
|
|
$val['icon'] = "/public/icon/small.png"; |
|
|
|
$val['icon'] = Yaf_Registry::get("config")->web->url->img."/public/icon/small.png"; |
|
|
|
} |
|
|
|
} |
|
|
|
return $data; |
|
|
|
return $data; |
|
|
|
} |
|
|
|
} |
|
|
@ -37,7 +37,7 @@ class NewSquirrelModel extends Orm_Base{ |
|
|
|
$CageModel = new CageModel(); |
|
|
|
$CageModel = new CageModel(); |
|
|
|
$data = $this->field('id,count,birthday,father,mother,strains,gene,remark,cage')->where("id={$squirrel}")->fRow(); |
|
|
|
$data = $this->field('id,count,birthday,father,mother,strains,gene,remark,cage')->where("id={$squirrel}")->fRow(); |
|
|
|
$data['cage'] = $CageModel->field('number')->where("id={$data['cage']}")->fRow()['number']; |
|
|
|
$data['cage'] = $CageModel->field('number')->where("id={$data['cage']}")->fRow()['number']; |
|
|
|
$data['icon'] = "/public/icon/small.png"; |
|
|
|
$data['icon'] = Yaf_Registry::get("config")->web->url->img."/public/icon/small.png"; |
|
|
|
return $data; |
|
|
|
return $data; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|