From 601e339c042db2ac641928ae2042f236c7ade053 Mon Sep 17 00:00:00 2001 From: nizongfeng Date: Tue, 23 Nov 2021 15:57:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E5=88=97=E8=A1=A8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/CfHotelInfo.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/application/admin/controller/CfHotelInfo.php b/application/admin/controller/CfHotelInfo.php index 0e145fc..db78784 100755 --- a/application/admin/controller/CfHotelInfo.php +++ b/application/admin/controller/CfHotelInfo.php @@ -18,15 +18,15 @@ class CfHotelInfo extends Backend { /** - * PaymentOrder模型对象 - * @var \app\admin\model\PaymentOrder + * CfHotelInfo模型对象 + * @var \app\admin\model\CfHotelInfo */ protected $model = null; public function _initialize() { parent::_initialize(); - $this->model = new \app\admin\model\PaymentOrder; + $this->model = new \app\admin\model\CfHotelInfo; } @@ -41,7 +41,15 @@ class CfHotelInfo extends Backend * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改 */ - + public function getHotelList(){ + $name=$this->request->post('name'); + $keyValue=$this->request->post('keyValue'); + $result= $this->model->getList($name,$keyValue); + if($keyValue){ + return json(['list' => $result]); + } + return json(['list' => $result]); + } /****=========================================**/ /**