Imcheck.php 721 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\controller\Api;
  4. use think\Db;
  5. /**
  6. * 意见反馈
  7. */
  8. class Imcheck extends Api
  9. {
  10. protected $noNeedLogin = ['keyworld_list'];
  11. protected $noNeedRight = ['*'];
  12. //网址关键词列表
  13. public function keyworld_list(){
  14. $list = Db::name('im_check_keyworld')->column('keyworld');
  15. $this->success('success',$list);
  16. }
  17. //IM审核
  18. public function addone(){
  19. $content = input('content','');
  20. $data = [
  21. 'user_id' => $this->auth->id,
  22. 'content' => $content,
  23. 'createtime' => time(),
  24. ];
  25. $id = Db::name('im_check')->insertGetId($data);
  26. $this->success();
  27. }
  28. }