From 207726848df28ed04cfaee32fcb4664fbaa6365b Mon Sep 17 00:00:00 2001 From: "yangsai@163.com" <2624183217@qq.com> Date: Fri, 17 May 2024 14:54:54 +0800 Subject: [PATCH] YS --- application/controllers/Api/Squirrel.php | 2 +- application/library/Ctrl/Api.php | 1 - application/models/Squirrel.php | 9 +++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/application/controllers/Api/Squirrel.php b/application/controllers/Api/Squirrel.php index 117e6b5..dc9a027 100644 --- a/application/controllers/Api/Squirrel.php +++ b/application/controllers/Api/Squirrel.php @@ -255,7 +255,7 @@ class Api_SquirrelController extends Ctrl_Api{ Tool_Fnc::apiMsg('获取成功', '200',$return); } public function OperateAction(){ - $params['squirrel_id'] = empty($this->POST['squirrel_id'])?Tool_Fnc::apiMsg('缺少小鼠id', '500'):$this->POST['squirrel_id']; + $params['id'] = empty($this->POST['id'])?Tool_Fnc::apiMsg('缺少小鼠id', '500'):$this->POST['id']; } } diff --git a/application/library/Ctrl/Api.php b/application/library/Ctrl/Api.php index 8175f18..93f7934 100644 --- a/application/library/Ctrl/Api.php +++ b/application/library/Ctrl/Api.php @@ -3,7 +3,6 @@ * api 基础类 */ abstract class Ctrl_Api extends Yaf_Controller_Abstract{ - //创建TOKEN protected function creattoken($mid){ $tUMO = new UserModel; diff --git a/application/models/Squirrel.php b/application/models/Squirrel.php index a387c4c..007d8b7 100644 --- a/application/models/Squirrel.php +++ b/application/models/Squirrel.php @@ -38,8 +38,8 @@ class SquirrelModel extends Orm_Base{ $father = $this->getOneInfo($val['father']); $mother = $this->getOneInfo($val['mother']); $val['sex'] = $val['sex']=1?'公':'母'; - $val['father'] = empty($father)?'无':$father['number']; - $val['mother'] = empty($mother)?'无':$mother['number']; + $val['father'] = empty($father)?$val['father']:$father['number']; + $val['mother'] = empty($mother)?$val['mother']:$mother['number']; //获取笼位号 $val['cage'] =$cageModel->getOneInfo($val['cage'])['number']; } @@ -85,10 +85,11 @@ class SquirrelModel extends Orm_Base{ $date = strtotime(date('Y-m-d',time())); $info = $this->field('nusring_time')->where("id={$squirrel}")->fRow(); if(strotime($info['nusring_time'])>$date){ - $data['icon'] = Yaf_Registry::get("config")->psd->default->appsecret; + $data['icon'] = Yaf_Registry::get("config")->cangshu->url->small; }else{ - + $data['icon'] = Yaf_Registry::get("config")->cangshu->url->big; } + return $data; } }