Hotsearch.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkAdmin
  4. // +----------------------------------------------------------------------
  5. // | 版权所有 2014~2022 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
  6. // +----------------------------------------------------------------------
  7. // | 官方网站: https://thinkadmin.top
  8. // +----------------------------------------------------------------------
  9. // | 开源协议 ( https://mit-license.org )
  10. // | 免费声明 ( https://thinkadmin.top/disclaimer )
  11. // +----------------------------------------------------------------------
  12. // | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
  13. // | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
  14. // +----------------------------------------------------------------------
  15. namespace app\admin\controller;
  16. use app\data\model\DataBestKnowledge;
  17. use app\data\model\DataClassification;
  18. use app\data\model\DataHotSearch;
  19. use app\data\model\DataPoolTalent;
  20. use app\data\model\DataZhicheng;
  21. use Carbon\Carbon;
  22. use think\admin\Controller;
  23. use think\admin\model\SystemUser;
  24. use think\db\Query;
  25. /**
  26. * 热门搜索管理
  27. * Class Hotsearch
  28. * @package app\admin\controller
  29. */
  30. class Hotsearch extends Controller
  31. {
  32. /**
  33. * 热门搜索管理
  34. * @auth true
  35. * @menu true
  36. */
  37. public function index(){
  38. $this->title='热门搜索管理';
  39. DataHotSearch::mQuery()
  40. ->like('name')
  41. ->order('id','desc')
  42. ->layTable();
  43. }
  44. /**
  45. * 编辑
  46. * @auth true
  47. * @menu true
  48. */
  49. public function edit(){
  50. DataHotSearch::mForm('class_form');
  51. }
  52. /**
  53. * 添加
  54. * @auth true
  55. * @menu true
  56. */
  57. public function add(){
  58. DataHotSearch::mForm('class_form');
  59. }
  60. /**
  61. * 删除
  62. * @auth true
  63. * @menu true
  64. */
  65. public function del($id){
  66. DataHotSearch::whereIn('id',$id)->save([
  67. 'is_del'=>0,
  68. ]);
  69. $this->success('删除成功');
  70. }
  71. }