添加网站文件
This commit is contained in:
30
application/admin/logic/HotSearchLogic.php
Normal file
30
application/admin/logic/HotSearchLogic.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace app\admin\logic;
|
||||
|
||||
|
||||
use app\common\server\ConfigServer;
|
||||
|
||||
class HotSearchLogic
|
||||
{
|
||||
|
||||
public static function info(){
|
||||
|
||||
$info = ConfigServer::get('hot_search','hot_keyword',[]);
|
||||
if (empty($info)){
|
||||
return [''];
|
||||
}
|
||||
return $info;
|
||||
}
|
||||
|
||||
public static function set($post){
|
||||
|
||||
if ($post['hot_keyword'] == ['']){
|
||||
return ConfigServer::set('hot_search','hot_keyword',[]);
|
||||
}
|
||||
$hot_keyword = array_values(array_filter($post['hot_keyword']));
|
||||
|
||||
return ConfigServer::set('hot_search','hot_keyword',$hot_keyword);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user