截流自动化的商城平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

HotSearch.php 735B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace app\admin\controller\setting;
  3. use app\common\basics\AdminBase;
  4. use app\admin\logic\setting\HotSearchLogic;
  5. use app\common\server\JsonServer;
  6. class HotSearch extends AdminBase
  7. {
  8. public function index()
  9. {
  10. $info = HotSearchLogic::info();
  11. return view('index', ['info' => $info]);
  12. }
  13. public function set()
  14. {
  15. if($this->request->isPost()) {
  16. $post = $this->request->post();
  17. $result = HotSearchLogic::set($post);
  18. if($result){
  19. return JsonServer::success('设置成功');
  20. }
  21. return JsonServer::error('设置失败');
  22. }else{
  23. return JsonServer::error('请求方式错误');
  24. }
  25. }
  26. }