diff --git a/service/Application/Common/Conf/config.php b/service/Application/Common/Conf/config.php index 1dd3011f1..f2e0fcb44 100755 --- a/service/Application/Common/Conf/config.php +++ b/service/Application/Common/Conf/config.php @@ -14,7 +14,7 @@ return array( 'IS_DEVELOP' => true, // 显示页面Trace信息 - 'SHOW_PAGE_TRACE' => false, + 'SHOW_PAGE_TRACE' => true, // 允许访问的模块列表 'MODULE_ALLOW_LIST' => array('Admin', 'Api', 'Home'), diff --git a/service/Application/Common/Lang/zh-cn.php b/service/Application/Common/Lang/zh-cn.php index ce12dd089..398156e3d 100755 --- a/service/Application/Common/Lang/zh-cn.php +++ b/service/Application/Common/Lang/zh-cn.php @@ -41,7 +41,7 @@ return array( 'common_ip_name' => 'ip地址', 'common_admin_name' => '管理员', 'common_not_login_name' => '未登录', - 'common_not_data_tips' => '没有数据', + 'common_not_data_tips' => '没有相关数据', 'common_create_time_name' => '创建时间', 'common_reg_time_name' => '注册时间', 'common_upd_time_name' => '更新时间', diff --git a/service/Application/Home/Controller/SearchController.class.php b/service/Application/Home/Controller/SearchController.class.php index 36fdea73e..55cb2f2ce 100755 --- a/service/Application/Home/Controller/SearchController.class.php +++ b/service/Application/Home/Controller/SearchController.class.php @@ -28,9 +28,15 @@ class SearchController extends CommonController // 调用父类前置方法 parent::_initialize(); + // 品牌id + $this->params['brand_id'] = intval(I('brand_id', 0)); + // 分类id $this->params['category_id'] = intval(I('category_id', 0)); + // 筛选价格id + $this->params['screening_price_id'] = intval(I('screening_price_id', 0)); + // 搜索关键字 $this->params['keywords'] = trim(I('keywords')); @@ -79,7 +85,8 @@ class SearchController extends CommonController public function GoodsList() { $data = SearchService::GoodsList($this->params); - $this->ajaxReturn(L('common_operation_success'), 0, $data); + $msg = empty($data['data']) ? L('common_not_data_tips') : L('common_operation_success'); + $this->ajaxReturn($msg, 0, $data); } } ?> \ No newline at end of file diff --git a/service/Application/Home/View/Default/Public/GoodsCategory.html b/service/Application/Home/View/Default/Public/GoodsCategory.html index 030ca8255..912fc7906 100755 --- a/service/Application/Home/View/Default/Public/GoodsCategory.html +++ b/service/Application/Home/View/Default/Public/GoodsCategory.html @@ -1,9 +1,11 @@
- 分类 - 复古复古 - 筛选结果 + 筛选出 + ... + 条数据
'+result.data.data[i]['title']+'
'; html += ''; html += '¥'+result.data.data[i]['price']+'
'; @@ -139,10 +160,11 @@ $(function() $('.data-list').append(html); } - + $('.search-pages-submit').attr('data-page', data.page+1); } else { Prompt(result.msg); } + $('.select .title-tips strong').text(result.data.total); }, error:function(xhr, type) { @@ -150,6 +172,12 @@ $(function() } }); } - get_goods_list(); + get_goods_list(1); + + // 加载更多数据 + $('.search-pages-submit').on('click', function() + { + get_goods_list(); + }); }); \ No newline at end of file