12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- use think\Db;
- class SalaryApply extends Base
- {
- public function save(){
- model('SalaryApply')->add();
- HelpHander::success([],'操作成功');
- }
- // 列表
- public function all(){
- $type = input('type/d',0);
- if(!in_array($type,[1,2,3,4,5,6,7,8,9])){
- HelpHander::error('参数错误');
- }
- $ret = model('SalaryApply')->all($type);
- HelpHander::success($ret);
- }
- // 删除
- public function del(){
- $id = input('id/d',0);
- model('SalaryApply')->del($id);
- HelpHander::success([],'操作成功');
- }
- }
|