<?php
/**
 * 搜索
 * @Copyright (C) 2016 汉潮 All rights reserved.
 * @License http://www.hanchao9999.com
 * @Author zhaoh <1070309178@qq.com>
 */
namespace Mobile\Controller;
class SearchController extends BaseController {
	public function index() {
		$search_history=session('search_history');
		if(!empty($search_history)){
			$this->assign('history',$search_history);
		}
        $this->assign('tplseo_title','商品搜索'.'_'.C('WEB_SITE_TITLE'));
        $this->assign('page_title','商品搜索');
		$this->display();
	}
	public function clear_history() {
		session("search_history",null);
		$data['status']=1;
		$data['data']="<h3>历史记录</h3><p><a><i class='iconfont'>&#xe6b4;</i>暂无搜索记录</a></p>";
		$this->ajaxReturn($data);
	}
}