关键字

feat/task1-c-wallet
gongfuxiang 2018-10-21 00:38:36 +08:00
parent e2a4891d64
commit 4e5fa3660c
4 changed files with 31 additions and 15 deletions

View File

@ -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'));

View File

@ -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']]));

View File

@ -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'];
}
}
?>

View File

@ -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'];
}
}
?>