关键字
parent
e2a4891d64
commit
4e5fa3660c
|
|
@ -7,7 +7,7 @@ use Service\GoodsService;
|
|||
use Service\NavigationService;
|
||||
use Service\BuyService;
|
||||
use Service\MessageService;
|
||||
use Service\ResourcesService;
|
||||
use Service\SearchService;
|
||||
|
||||
/**
|
||||
* 前台
|
||||
|
|
@ -176,7 +176,7 @@ class CommonController extends Controller
|
|||
switch(intval(MyC('home_search_keywords_type', 0)))
|
||||
{
|
||||
case 1 :
|
||||
$home_search_keywords = ResourcesService::SearchKeywordsList();
|
||||
$home_search_keywords = SearchService::SearchKeywordsList();
|
||||
break;
|
||||
case 2 :
|
||||
$home_search_keywords = explode(',', MyC('home_search_keywords'));
|
||||
|
|
|
|||
|
|
@ -58,6 +58,9 @@ class SearchController extends CommonController
|
|||
{
|
||||
$this->redirect('Home/Search/Index', ['keywords'=>$this->params['keywords']]);
|
||||
} else {
|
||||
// 搜索记录
|
||||
SearchService::SearchAdd($this->params);
|
||||
|
||||
// 品牌列表
|
||||
$this->assign('brand_list', BrandService::CategoryBrandList(['category_id'=>$this->params['category_id']]));
|
||||
|
||||
|
|
|
|||
|
|
@ -172,18 +172,5 @@ class ResourcesService
|
|||
|
||||
return M('Region')->where($where)->field($field)->order('id asc, sort asc')->select();
|
||||
}
|
||||
|
||||
/**
|
||||
* [SearchKeywordsList 获取热门关键字列表]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2018-10-20T23:55:06+0800
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function SearchKeywordsList($params = [])
|
||||
{
|
||||
return ['自动的', '自动2'];
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -126,5 +126,31 @@ class SearchService
|
|||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* [SearchAdd 搜索记录添加]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2018-10-21T00:37:44+0800
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function SearchAdd($params = [])
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* [SearchKeywordsList 获取热门关键字列表]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2018-10-20T23:55:06+0800
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function SearchKeywordsList($params = [])
|
||||
{
|
||||
return ['自动的', '自动2'];
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Reference in New Issue