like-shop/application/admin/logic/HotSearchLogic.php
2024-01-16 13:06:20 +08:00

30 lines
609 B
PHP

<?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);
}
}