12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- class Rules extends Base
- {
- // 新增
- public function save(){
- model('Rules')->add();
- HelpHander::success([],'操作成功');
- }
- // 编辑
- public function update(){
- model('Rules')->add();
- HelpHander::success([],'操作成功');
- }
- // 详情
- public function detail(){
- $id = input('id/d',0);
- $ret = model('Rules')->info($id);
- HelpHander::success($ret);
- }
- // 列表
- public function list(){
- $ret = model('Rules')->lists();
- HelpHander::success($ret);
- }
- // 获取机构管理员权限
- public function selectRulesByRoles(){
- $ret = model('Rules')->selectRulesByRoles();
- HelpHander::success($ret);
- }
- }
|