123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- class AppMgr extends Base
- {
- // 新增
- public function save(){
- model('AppMgr')->add();
- HelpHander::success([],'操作成功');
- }
- // 编辑
- public function update(){
- model('AppMgr')->add();
- HelpHander::success([],'操作成功');
- }
- // 详情
- public function detail(){
- $id = input('id/d',0);
- $ret = model('AppMgr')->info($id);
- HelpHander::success($ret);
- }
- // 列表
- public function list(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $type = input('type/d',10);
- $ret = model('AppMgr')->lists($page,$size,$type);
- HelpHander::success($ret);
- }
- // 删除
- public function del(){
- $id = input('id/d',0);
- model('AppMgr')->del($id);
- HelpHander::success([],'操作成功');
- }
- // 修改状态
- public function enableMgr(){
- $id = input('id/d',0);
- $enable = input('enable/d',0);
- model('AppMgr')->changeStatus($id,$enable,$this->orgId);
- HelpHander::success([],'操作成功');
- }
- public function newAppMgr(){
- $ret = model('AppMgr')->appMgr(1);
- HelpHander::success($ret);
- }
- public function newIosMgr(){
- $ret = model('AppMgr')->appMgr(2);
- $ret = $ret?$ret:null;
- HelpHander::success($ret);
- }
- }
|