Report.php 577 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\controller\Api;
  4. use think\Db;
  5. /**
  6. * 意见反馈
  7. */
  8. class Report extends Api
  9. {
  10. protected $noNeedLogin = [];
  11. protected $noNeedRight = ['*'];
  12. public function report(){
  13. $data = [
  14. 'user_id' => $this->auth->id,
  15. 'title' => input('title',''),
  16. 'mobile' => input('mobile',''),
  17. 'images' => input('images',''),
  18. 'createtime' => time(),
  19. ];
  20. Db::name('report')->insertGetId($data);
  21. $this->success('感谢您的反馈');
  22. }
  23. }