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.
29 lines
735 B
29 lines
735 B
<?php
|
|
namespace app\admin\controller\setting;
|
|
|
|
use app\common\basics\AdminBase;
|
|
use app\admin\logic\setting\HotSearchLogic;
|
|
use app\common\server\JsonServer;
|
|
|
|
class HotSearch extends AdminBase
|
|
{
|
|
public function index()
|
|
{
|
|
$info = HotSearchLogic::info();
|
|
return view('index', ['info' => $info]);
|
|
}
|
|
|
|
public function set()
|
|
{
|
|
if($this->request->isPost()) {
|
|
$post = $this->request->post();
|
|
$result = HotSearchLogic::set($post);
|
|
if($result){
|
|
return JsonServer::success('设置成功');
|
|
}
|
|
return JsonServer::error('设置失败');
|
|
}else{
|
|
return JsonServer::error('请求方式错误');
|
|
}
|
|
}
|
|
}
|