diff --git a/application/index/view/default/category/index.html b/application/index/view/default/category/index.html
index 179751050..bc0803500 100755
--- a/application/index/view/default/category/index.html
+++ b/application/index/view/default/category/index.html
@@ -21,47 +21,57 @@
{{if !empty($goods_category_list)}}
- {{foreach $v.items as $vs}}
-
-
-
- {{if !empty($vs['icon'])}}
-
-
-
- {{/if}}
-
- {{$vs.name}}
-
+ {{if !empty($v['items'])}}
+ {{foreach $v.items as $vs}}
+
+
+ {{if !empty($vs['items'])}}
+
+ {{foreach $vs.items as $kss=>$vss}}
+ -
+ {{if !empty($vss['icon'])}}
+
+
+
+ {{/if}}
+
+ {{$vss.name}}
+
+
+ {{/foreach}}
+
+ {{/if}}
- {{if !empty($vs['items'])}}
-
- {{foreach $vs.items as $kss=>$vss}}
- -
- {{if !empty($vss['icon'])}}
-
-
-
- {{/if}}
-
- {{$vss.name}}
-
-
- {{/foreach}}
-
- {{/if}}
+ {{/foreach}}
+ {{else /}}
+
- {{/foreach}}
+ {{/if}}
{{/foreach}}
{{else /}}
-
没有相关数据
+
没有分类数据
{{/if}}
diff --git a/public/static/index/default/js/category.js b/public/static/index/default/js/category.js
index e4bcd1c38..5442e80e4 100644
--- a/public/static/index/default/js/category.js
+++ b/public/static/index/default/js/category.js
@@ -1,11 +1,22 @@
$(function()
{
- // 分类显/隐
- $('.category-list ul.category-nav li').on('mouseover', function(){
+ // 一级分类显/隐操作
+ $('.category-list ul.category-nav li').on('mouseover', function()
+ {
var index = $(this).index();
$('.category-list ul.category-nav li').removeClass('active');
$(this).addClass('active');
$('.category-content').addClass('none');
$('.category-content-'+index).removeClass('none');
});
+
+ // 一级分类双击进入商品搜索页
+ $('.category-list ul.category-nav li').on('dblclick', function()
+ {
+ var url = $(this).data('url') || null;
+ if(url != null)
+ {
+ window.location.href = url;
+ }
+ });
});
\ No newline at end of file