123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- use think\Db;
- class Feedback extends Base
- {
- // 新增
- public function save(){
- model('Feedback')->add();
- HelpHander::success([],'操作成功');
- }
- // 编辑
- public function update(){
- model('Feedback')->add();
- HelpHander::success([],'操作成功');
- }
- // 详情
- public function detail(){
- $id = input('id/d',0);
- $ret = model('Feedback')->info($id);
- HelpHander::success($ret);
- }
- // 列表
- public function list(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $ret = model('Feedback')->lists($page,$size);
- HelpHander::success($ret);
- }
- // 删除
- public function del(){
- $id = input('id/d',0);
- model('Feedback')->del($id);
- HelpHander::success([],'操作成功');
- }
- }
|