From d4d31e375ca9e6d03d270635b5a373c785d5a8f9 Mon Sep 17 00:00:00 2001 From: zhaoxiang <756958008@qq.com> Date: Mon, 12 Dec 2016 20:26:04 +0800 Subject: [PATCH] =?UTF-8?q?added=20=E6=96=B0=E5=A2=9E=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=88=A0=E9=99=A4=E5=92=8C=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/AppManager.php | 28 ++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/application/admin/controller/AppManager.php b/application/admin/controller/AppManager.php index 2b4133a..f6a3e8f 100644 --- a/application/admin/controller/AppManager.php +++ b/application/admin/controller/AppManager.php @@ -193,13 +193,13 @@ class AppManager extends Base { public function open(){ if( $this->request->isPut() ){ $id = $this->request->put($this->primaryKey); - $appMemberObj = \app\admin\model\AppMember::get([$this->primaryKey => $id]); - if( is_null($appMemberObj) ){ - $this->error('管理员不存在',''); + $appObj = App::get([$this->primaryKey => $id]); + if( is_null($appObj) ){ + $this->error('当前应用不存在',''); }else{ - $appMemberObj->status = 1; - $appMemberObj->save(); - $this->success('操作成功', url('AppMember/index')); + $appObj->status = 1; + $appObj->save(); + $this->success('操作成功', url('AppManager/index')); } } } @@ -207,13 +207,13 @@ class AppManager extends Base { public function close(){ if( $this->request->isPut() ){ $id = $this->request->put($this->primaryKey); - $appMemberObj = \app\admin\model\AppMember::get([$this->primaryKey => $id]); - if( is_null($appMemberObj) ){ - $this->error('管理员不存在',''); + $appObj = App::get([$this->primaryKey => $id]); + if( is_null($appObj) ){ + $this->error('当前应用不存在',''); }else{ - $appMemberObj->status = 0; - $appMemberObj->save(); - $this->success('操作成功', url('AppMember/index')); + $appObj->status = 0; + $appObj->save(); + $this->success('操作成功', url('AppManager/index')); } } } @@ -221,9 +221,9 @@ class AppManager extends Base { public function del(){ if( $this->request->isDelete() ){ $key = $this->request->delete($this->primaryKey); - $delNum = \app\admin\model\AppMember::destroy($key); + $delNum = App::destroy($key); if( $delNum ){ - $this->success('操作成功!', url('AppMember/index')); + $this->success('操作成功!', url('AppManager/index')); } } $this->error('操作失败!');