zm
2020-09-11 80527f8035fb8e0a6b954f6f022a549d38ee422a
commit | author | age
1c88ba 1 <!-- 
Z 2  * 微课堂首页
3  * ============================================================================
3e6546 4  * 版权所有 2015-2020 ,并保留所有权利。
Z 5  * 网站地址: 
1c88ba 6  * ----------------------------------------------------------------------------
3e6546 7
1c88ba 8  * ============================================================================
Z 9 -->
10 {template $template.'/_headerv2'}
11
12 {if $op=='display'}
13 <link href="{MODULE_URL}template/mobile/{$template}/style/cssv2/search.css?v={$versions}" rel="stylesheet" />
14
15 <!-- 顶部搜索框 -->
16 <div class="fix_grid_96">
17     <div class="fix_grid">
18         <div class="search_grid">
19             <div class="search flex0">
20                 <i class="icon_search flex_g0"></i>
21                 <input type="text" name="keyword" value="{$_GPC['keyword']}" placeholder="{php echo $index_page['searchBox'] ? $index_page['searchBox'] : '搜索您感兴趣的课程';}">
ec46c1 22                 <button class="search-btn">搜索aa</button>
1c88ba 23             </div>
Z 24         </div>
25
26         <div class="list_menu_grid flex0_1">
27             <div class="list_menu flex-al1 flex9" onclick="showsort()">
28                 <span>{$sortname}</span><i class="icon_down"></i>
29             </div>
30             <div class="list_menu flex-al1 flex9" onclick="showcategory()">
31                 <span>{$catname}</span><i class="icon_down"></i>
32             </div>
33             {if $lesson_attribute['attribute1']}
34             <div class="list_menu flex-al1 flex9" onclick="showattribute1()">
35                 <span>{$attr1_name}</span><i class="icon_down"></i>
36             </div>
37             {/if}
ec46c1 38             {if $_GPC['sort']=='knowledge'}
Z 39             <div class="list_menu flex-al1 flex9" onclick="showknowledge()">
40                 <span>{$knowledgename}</span><i class="icon_down"></i>
41             </div>
42             {elseif $lesson_attribute['attribute2']}
1c88ba 43             <div class="list_menu flex-al1 flex9" onclick="showattribute2()">
Z 44                 <span>{$attr2_name}</span><i class="icon_down"></i>
45             </div>
46             {/if}
47         </div>
48     </div>
49 </div>
50 <!-- /顶部搜索框 -->
51
52 <!-- 筛选条件 -->
53 <div class="sort_list_grid sort_list hidden">
54     <a href="{php echo $this->createMobileUrl('search')}" {if !$_GPC['sort']}class="curr"{/if}>综合排序</a>
55     <a href="{php echo $this->createMobileUrl('search', array('sort'=>'price'))}&keyword={$keyword}&cat_id={$cat_id}&pid={$pid}&attr1={$attr1}&attr2={$attr2}" {if $_GPC['sort']=='price'}class="curr"{/if}>价格优先</a>
56     <a href="{php echo $this->createMobileUrl('search', array('sort'=>'hot'))}&keyword={$keyword}&cat_id={$cat_id}&pid={$pid}&attr1={$attr1}&attr2={$attr2}" {if $_GPC['sort']=='hot'}class="curr"{/if}>人气优先</a>
57     <a href="{php echo $this->createMobileUrl('search', array('sort'=>'score'))}&keyword={$keyword}&cat_id={$cat_id}&pid={$pid}&attr1={$attr1}&attr2={$attr2}" {if $_GPC['sort']=='score'}class="curr"{/if}>好评优先</a>
58     <a href="{php echo $this->createMobileUrl('search', array('sort'=>'general'))}&keyword={$keyword}&cat_id={$cat_id}&pid={$pid}&attr1={$attr1}&attr2={$attr2}" {if $_GPC['sort']=='general'}class="curr"{/if}>普通课程</a>
ec46c1 59     <a href="{php echo $this->createMobileUrl('search', array('sort'=>'knowledge'))}&keyword={$keyword}&cat_id={$cat_id}&pid={$pid}&attr1={$attr1}&attr2={$attr2}" {if $_GPC['sort']=='knowledge'}class="curr"{/if}>知识点课</a>
1c88ba 60     <a href="{php echo $this->createMobileUrl('search', array('sort'=>'live'))}&keyword={$keyword}&cat_id={$cat_id}&pid={$pid}&attr1={$attr1}&attr2={$attr2}" {if $_GPC['sort']=='live'}class="curr"{/if}>直播课程</a>
Z 61     <a href="{php echo $this->createMobileUrl('search', array('sort'=>'apply'))}&keyword={$keyword}&cat_id={$cat_id}&pid={$pid}&attr1={$attr1}&attr2={$attr2}" {if $_GPC['sort']=='apply'}class="curr"{/if}>报名课程</a>
62 </div>
63 <!-- /筛选条件 -->
64
65 <!-- 课程分类 -->
66 <div class="nav hidden" data-active="cate">
67     <div class="nav_panel nav_panel-cate">
68         <!-- 顶级分类 -->
69         <ul class="nav_menu nav_panel_cate_mt">
70             <a href="javascript:;">
71                 <li class="nav_menu_item {if !$_GPC['pid']}nav_menu_item_selected{/if}"><img class="nav_menu_item-icon" src="{MODULE_URL}template/mobile/{$template}/images/ico-allcategory.png">推荐分类</li>
72             </a>
73             {loop $categorylist $key $parent}
74             <a href="javascript:;">
75                 <li class="nav_menu_item {if $_GPC['pid']==$parent['id']}nav_menu_item_selected{/if}"><img class="nav_menu_item-icon" src="{$_W['attachurl']}{$parent['ico']}">{$parent['name']}</li>
76             </a>
77             {/loop}
78         </ul>
79
80         <!-- 推荐二级分类 -->
81         <ul class="nav_menu nav_panel-cate_st" {if !$_GPC['pid']}style="display:block;"{/if}">
82             <a href="{php echo $this->createMobileUrl('search')}&keyword={$keyword}&sort={$sort}&attr1={$attr1}&attr2={$attr2}">
83                 <li class="nav_menu_item {if !$_GPC['cat_id']}nav_menu_item_selected{/if}"><img class="nav_menu_item-icon" src="{$all_category_ico}">全部</li>
84             </a>
85             {loop $hot_category $hot}
86             <a href="{php echo $hot['link'] ? $hot['link'] : $this->createMobileUrl('search', array('cat_id'=>$hot['id']))}&keyword={$keyword}&sort={$sort}&attr1={$attr1}&attr2={$attr2}">
87                 <li class="nav_menu_item {if !$_GPC['pid'] && ($_GPC['cat_id']==$hot['id'])}nav_menu_item_selected{/if}"><img class="nav_menu_item-icon" src="{$_W['attachurl']}{$hot['ico']}">{$hot['name']}</li>
88             </a>
89             {/loop}
90         </ul>
91         <!-- 二级分类 -->
92         {loop $categorylist $category}
93             <ul class="nav_menu nav_panel-cate_st" {if $_GPC['pid']==$category['id']}style="display:block;"{/if}>
94                 <a href="{php echo $category['link'] ? $category['link'] : $this->createMobileUrl('search', array('cat_id'=>$category['id'],'pid'=>$category['id'])).'&keyword='.$keyword.'&sort='.$sort.'&attr1='.$attr1.'&attr2='.$attr2;}">
95                     <li class="nav_menu_item {if ($_GPC['pid']==$_GPC['cat_id']) && ($_GPC['cat_id']==$category['id'])}nav_menu_item_selected{/if}"><img class="nav_menu_item-icon" src="{$_W['attachurl']}{$category['ico']}">{$category['name']}</li>
96                 </a>
97                 {loop $category['child'] $child}
98                 <a href="{php echo $child['link'] ? $child['link'] : $this->createMobileUrl('search', array('cat_id'=>$child['id'],'pid'=>$child['parentid'])).'&keyword='.$keyword.'&sort='.$sort.'&attr1='.$attr1.'&attr2='.$attr2;}">
99                     <li class="nav_menu_item {if $_GPC['cat_id']==$child['id']}nav_menu_item_selected{/if}"><img class="nav_menu_item-icon" src="{$_W['attachurl']}{$child['ico']}">{$child['name']}</li>
100                 </a>
101                 {/loop}
102             </ul>
103         {/loop}
104     </div>
105 </div>
106 <!-- /课程分类 -->
107
108 <!-- 课程属性 -->
109 {if $lesson_attribute['attribute1']}
110 <div class="sort_list_grid attribute1 hidden">
111     <a href="{php echo $this->createMobileUrl('search')}&keyword={$keyword}&sort={$sort}&cat_id={$cat_id}&pid={$pid}&attr2={$attr2}" {if !$_GPC['attr1']}class="curr"{/if}>不限</a>
112     {loop $attribute1 $item}
113     <a href="{php echo $this->createMobileUrl('search', array('attr1'=>$item['id']))}&keyword={$keyword}&sort={$sort}&cat_id={$cat_id}&pid={$pid}&attr2={$attr2}" {if $_GPC['attr1']==$item['id']}class="curr"{/if}>{$item['name']}</a>
114     {/loop}
115 </div>
116 {/if}
117 {if $lesson_attribute['attribute2']}
118 <div class="sort_list_grid attribute2 hidden">
119     <a href="{php echo $this->createMobileUrl('search')}&keyword={$keyword}&sort={$sort}&cat_id={$cat_id}&pid={$pid}&attr1={$attr1}" {if !$_GPC['attr2']}class="curr"{/if}>不限</a>
120     {loop $attribute2 $item}
121     <a href="{php echo $this->createMobileUrl('search', array('attr2'=>$item['id']))}&keyword={$keyword}&sort={$sort}&cat_id={$cat_id}&pid={$pid}&attr1={$attr1}" {if $_GPC['attr2']==$item['id']}class="curr"{/if}>{$item['name']}</a>
122     {/loop}
123 </div>
124 {/if}
125 <!-- /课程属性 -->
ec46c1 126
Z 127 <!-- 知识点课分类 -->
80527f 128 <div class="nav1 hidden" data-active="knowledge">
ec46c1 129     <div class="nav_panel nav_panel-know">
Z 130         <!-- 顶级分类 -->
131         <ul class="nav_menu nav_panel_know_mt">
132             <a href="javascript:;">
80527f 133                 <li class="nav_menu_item {if !$_GPC['knowledge_pid']}nav_menu_item_selected{/if}">推荐知识点</li>
ec46c1 134             </a>
Z 135             {loop $knowledgelist $key $parent}
136             <a href="javascript:;">
80527f 137                 <li class="nav_menu_item {if $_GPC['knowledge_pid']==$parent['knowledge_pid']}nav_menu_item_selected{/if}">{$parent['name']}</li>
ec46c1 138             </a>
Z 139             {/loop}
140         </ul>
141
142         <!-- 推荐二级分类 -->
143         <ul class="nav_menu nav_panel-know_st" {if !$_GPC['knowledge_pid']}style="display:block;"{/if}">
144             <a href="{php echo $this->createMobileUrl('search')}&keyword={$keyword}&sort={$sort}&attr1={$attr1}&attr2={$attr2}">
80527f 145                 <li class="nav_menu_item {if !$_GPC['knowledge_id']}nav_menu_item_selected{/if}">全部</li>
ec46c1 146             </a>
Z 147             {loop $hot_knowledge $hot}
148             <a href="{php echo $hot['link'] ? $hot['link'] : $this->createMobileUrl('search', array('knowledge_id'=>$hot['id']))}&keyword={$keyword}&sort={$sort}&attr1={$attr1}&attr2={$attr2}">
80527f 149                 <li class="nav_menu_item {if !$_GPC['knowledge_pid'] && ($_GPC['knowledge_id']==$hot['id'])}nav_menu_item_selected{/if}">{$hot['name']}</li>
ec46c1 150             </a>
Z 151             {/loop}
152         </ul>
153         <!-- 二级分类 -->
154         {loop $knowledgelist $know}
155             <ul class="nav_menu nav_panel-know_st" {if $_GPC['knowledge_pid']==$know['id']}style="display:block;"{/if}>
80527f 156                 <a href="{php echo $know['link'] ? $know['link'] : $this->createMobileUrl('search', array('knowledge_id'=>$know['id'],'pid'=>$know['id'])).'&keyword='.$keyword.'&sort='.$sort.'&attr1='.$attr1.'&attr2='.$attr2;}">
Z 157                     <li class="nav_menu_item {if ($_GPC['knowledge_pid']==$_GPC['knowledge_id']) && ($_GPC['knowledge_id']==$know['id'])}nav_menu_item_selected{/if}">{$know['name']}</li>
ec46c1 158                 </a>
Z 159                 {loop $know['child'] $child}
80527f 160                 <a href="{php echo $child['link'] ? $child['link'] : $this->createMobileUrl('search', array('knowledge_id'=>$child['id'],'pid'=>$child['parentid'])).'&keyword='.$keyword.'&sort='.$sort.'&attr1='.$attr1.'&attr2='.$attr2;}">
Z 161                     <li class="nav_menu_item {if $_GPC['knowledge_id']==$child['id']}nav_menu_item_selected{/if}">{$child['name']}</li>
ec46c1 162                 </a>
Z 163                 {/loop}
164             </ul>
165         {/loop}
166     </div>
167 </div>
168 <!-- /知识点课分类 -->
1c88ba 169 <div class="mark hidden"></div>
Z 170
171 <!-- 课程列表 -->
172 <div class="section">
173     {if $total}
174         <div class="list_grid" id="lesson-list">
175         </div>
176         <div id="loading_div" class="loading_div" style="padding:15px 0 30px 0;">
177             <a href="javascript:void(0);" id="btn_Page"><i class="fa fa-arrow-circle-down"></i> 加载更多</a>
178         </div>
179     {else}
180         <div class="my_empty">
181             <div class="empty_bd  my_course_empty">
182                 <h3>没有找到任何课程~</h3>
183                 <p><a href="{php echo $this->createMobileUrl('index', array('t'=>1));}">去首页看看...</a></p>
184             </div>
185         </div>
186     {/if}
187 </div>
188 <!-- /课程列表 -->
189
190 <div id="loadingToast">
191     <div class="weui-mask_transparent"></div>
192     <div class="weui-toast">
193         <i class="weui-loading weui-icon_toast"></i>
194         <p class="weui-toast__content">加载数据中</p>
195     </div>
196 </div>
197
198 <script type="text/javascript">
199 /* 搜索 */
200 $(".search-btn").click(function() {
201     var keywords = $.trim($("input[name=keyword]").val());
202     if (keywords == '') {
203         searchUrl = "{php echo $this->createMobileUrl('search');}";
204     } else {
205         searchUrl = searchUrl = "{php echo $this->createMobileUrl('search');}&keyword=" + encodeURIComponent(keywords);
206     }
207     document.location.href = searchUrl;
208     return false;
209 });
210
211 /* 综合排序 */
212 function showsort() {
213     closeCondition();
214     $(".sort_list").removeClass("hidden");
215     $(".mark").removeClass("hidden");
216 }
217
218 /* 课程分类 */
219 function showcategory(){
220     closeCondition();
221     $(".nav").removeClass("hidden");
222     $(".mark").removeClass("hidden");
223 }
224 $(".nav_panel_cate_mt").on("click", 'a', function() {
225     var $currItem = $(this),
226     index = $currItem.index();
227
228     $(".nav_panel_cate_mt a li").removeClass('nav_menu_item_selected');    
229     $currItem.addClass('nav_menu_item_selected').siblings().removeClass('nav_menu_item_selected');
230     $(".nav_panel-cate_st").hide().eq(index).show();
231 });
232
233 /* 课程属性 */
234 function showattribute1() {
235     closeCondition();
236     $(".attribute1").removeClass("hidden");
237     $(".mark").removeClass("hidden");
238 }
239
240 function showattribute2() {
241     closeCondition();
242     $(".attribute2").removeClass("hidden");
243     $(".mark").removeClass("hidden");
244 }
245
ec46c1 246 // /* 知识点分类 */
Z 247 function showknowledge(){
248     closeCondition();
80527f 249     $(".nav1").removeClass("hidden");
ec46c1 250     $(".mark").removeClass("hidden");
Z 251 }
252 $(".nav_panel_know_mt").on("click", 'a', function() {
253     var $currItem = $(this),
254     index = $currItem.index();
255
256     $(".nav_panel_know_mt a li").removeClass('nav_menu_item_selected');    
257     $currItem.addClass('nav_menu_item_selected').siblings().removeClass('nav_menu_item_selected');
258     $(".nav_panel-know_st").hide().eq(index).show();
259 });
260
261
1c88ba 262 /* 关闭所有选项 */
Z 263 $(".mark, .sort_list_grid").click(function(){
264     closeCondition();
265 })
266 function closeCondition() {
267   $(".sort_list_grid").addClass("hidden");
268   $(".nav").addClass("hidden");
269   $(".attribute1").addClass("hidden");
80527f 270   $(".attribute2").addClass("hidden");  
Z 271   $(".nav1").addClass("hidden");
1c88ba 272   $(".mark").addClass("hidden");
Z 273 }
274 </script>
275
276 <script type="text/javascript">
277 var uniacid = "{$uniacid}";
278 //首页检索跳转过来的清掉缓存
279 var clear = "{php echo intval($_GPC['clear']);}";
280 if(clear==1){
281     localStorage.removeItem('lesson_back_'+uniacid);
282 }
283
284 var localStorage = window.localStorage;
285 var ajaxUrl   = "{php echo $_W['siteUrl'];}";
286 var attachUrl = "{php echo $_W['attachurl'];}";
287 var lessonUrl = "{php echo $this->createMobileUrl('lesson');}";
288 var loadingToast = document.getElementById("loadingToast");
289 var get_status = true;
290 $(function () {
291     var nowPage = 1; //设置当前页数,全局变量
292     function getData(page) {
293         if(get_status){
294             nowPage++;
295             $.get(ajaxUrl, {page: page}, function (data) {
296                 var jsonObj = JSON.parse(data);
297                 loadingToast.style.display = 'none';
298                 if (jsonObj.length > 0) {
299                     insertDiv(jsonObj);
300                 }else{
301                     get_status = false;
302                     document.getElementById("loading_div").innerHTML='<div class="loading_bd">没有了,已经到底了</div>';
303                 }
304             });
305         }
306     } 
307     //初始化加载数据
308     var lesson_back = localStorage.getItem('lesson_back_'+uniacid);
309     var lesson_list = localStorage.getItem('lesson_list_'+uniacid);
310
311     if(lesson_back==1 && lesson_list){
312         $("#lesson-list").append(lesson_list);
313         $(".section").scrollTop(localStorage.getItem('section_top_'+uniacid));
314         nowPage = localStorage.getItem('nowPage_'+uniacid);
315         loadingToast.style.display = 'none';
316         localStorage.removeItem('lesson_back_'+uniacid);
317     }else{
318         getData(1);
319     }
320
321     //生成数据html,append到div中  
322     function insertDiv(result) {  
323         var mainDiv =$("#lesson-list");
324         var already_study = "{$already_study}";
325         var lesson_vip_status = {$setting['lesson_vip_status']};
326         var chtml = '';  
327         for (var j = 0; j < result.length; j++) {
328             chtml += '<a href="' + lessonUrl + '&id=' + result[j].id + '" class="normal_grid flex0_1">';
329             chtml += '    <div class="normal_grid_a flex_g0">';
330             chtml += '        <div class="img-box flex_g0">';
c47fd0 331             chtml += '            <div class="img"><img src="' + (result[j].images.substr(0,4).toLowerCase()=='http'?'':attachUrl) + result[j].images + '"></div>';
1c88ba 332             chtml += '            <div class="icon-live ' + result[j].icon_live_status + '"></div>';
Z 333             chtml += '            <div class="learned ' + result[j].learned_hide + '">' + result[j].buyTotal + already_study + '</div>';
334             chtml += '            <i class="ico_common '+ result[j].ico_name +'"></i>';
335             chtml += '        </div>';
336             chtml += '    </div>';
337             chtml += '    <div class="flex-al1 flex10">';
338             chtml += '        <div>';
339             chtml += '            <div class="grid_title2">' + result[j].bookname + '</div>';
340             chtml += '            <div class="grid_info flex0">';
341             if(lesson_vip_status!=1){
342                 if(result[j].price>0){
343                     chtml += '        <span class="price flex_g0 index_price_lesson ios-system">¥' + result[j].price + '</span>';
344                 }else{
345                     chtml += '        <span class="free flex_g0 index_free_lesson ios-system">免费课程</span>';
346                 }
347             }
348             if(result[j].soncount>0){
349                     chtml += '        <span class="mar5 ios-system">|</span>';
350                     chtml += '        <span class="index_section_number">' + result[j].soncount + '节</span>';
351             }
352             chtml += '            </div>';
353             chtml += '        </div>';
354             chtml += '        <div class="grid_bottom2 flex1">';
355             chtml += '    <div class="text">';
356             if(result[j].section_status==0){
357                 chtml += '已完结';
358             }
359             chtml += '    </div>';
360             if(result[j].score>0){
361                     chtml += '    <span class="eva index_lesson_evaluation">' + result[j].score_rate + '%好评</span>';
362             }
363             chtml += '        </div>';
364             chtml += '    </div>';
365             chtml += '</a>';
366         }
367         mainDiv.append(chtml);
368         
369         //存储当前课程列表信息
370         if($("#lesson-list").html()){
371             localStorage.setItem('lesson_list_'+uniacid, $("#lesson-list").html());
372             localStorage.setItem('nowPage_'+uniacid, nowPage);
373         }
374     }  
375   
376     //==============核心代码=============
377     var msg_list_loading = false;
378     $('.section').on('scroll', function(){
379         if (!msg_list_loading){
380             load_more_msg();
381         }
382
383         //记录滚动条位置
384         localStorage.setItem('section_top_'+uniacid, $(".section").scrollTop());
385     })
386     function load_more_msg(){     
387         var msg_list = $('.section');
388         if (msg_list.height() + msg_list[0].scrollTop >= msg_list[0].scrollHeight) {
389             msg_list_loading = true;
390             $("#btn_Page").hide();
391             getData(nowPage);
392             msg_list_loading = false;
393         }
394         $("#btn_Page").show();
395     }
396
397     //继续加载按钮事件
398     $("#btn_Page").click(function () {
399         loadingToast.style.display = 'block';
400         getData(nowPage);
401     });
402 });
403
404 var nav_panel_height = parseInt(document.body.clientHeight * 0.7);
405 var head = document.head || document.getElementsByTagName('head')[0];
406 var style = document.createElement('style');
407 style.innerHTML = '.nav_panel-cate{height:' + nav_panel_height + 'px !important;}';
408 head.appendChild(style);
409 </script>
410
411 {elseif $op=='allcategory'}
412 <link href="{MODULE_URL}template/mobile/{$template}/style/cssv2/all-category.css?v={$versions}" rel="stylesheet" />
413
414 <div class="header-2 cbox">
415     <a href="javascript:history.go(-1);" class="ico go-back"></a>
416     <div class="flex title" style="max-width:80%;">{$title}</div>
417 </div>
418
419 <!-- 分类 START-->
420 <div class="fui-fullHigh-group max-width-640">
421     <div class="category-inner menu">
422         <nav class="category-switch on">推荐分类</nav>
423         {loop $categorylist $key $item}
424         <nav class="category-switch">{$item['name']}</nav>
425         {/loop}
426     </div>
427     <div class="category-inner container">
428         <div class="all-category-son">
429             <div class="category-right">
430                 <a href="{php echo $this->createMobileUrl('search');}" class="category-item">
431                     <div class="icon radius">
432                         <img src="{$all_category_ico}">
433                     </div>
434                     <div class="text">全部课程</div>
435                 </a>
436                 {loop $hot_category $hot}
437                 <a href="{php echo $hot['link'] ? $hot['link'] : $this->createMobileUrl('search',array('cat_id'=>$hot['id']));}" class="category-item">
438                     <div class="icon radius">
439                         <img src="{$_W['attachurl']}{$hot['ico']}">
440                     </div>
441                     <div class="text">{$hot['name']}</div>
442                 </a>
443                 {/loop}
444             </div>
445         </div>
446
447         {loop $categorylist $key $parent}
448         <div class="all-category-son" style="display:none;">
449             <div class="category-right">
450                 <a href="{php echo $parent['link'] ? $parent['link'] : $this->createMobileUrl('search', array('cat_id'=>$parent['id'],'pid'=>$parent['id']));}" class="category-item">
451                     <div class="icon radius">
452                         <img src="{$_W['attachurl']}{$parent['ico']}">
453                     </div>
454                     <div class="text">{$parent['name']}</div>
455                 </a>
456
457                 {loop $parent['child'] $son}
458                 <a href="{php echo $son['link'] ? $son['link'] : $this->createMobileUrl('search', array('cat_id'=>$son['id'],'pid'=>$parent['id']));}" class="category-item">
459                     <div class="icon radius">
460                         <img src="{$_W['attachurl']}{$son['ico']}">
461                     </div>
462                     <div class="text">{$son['name']}</div>
463                 </a>
464                 {/loop}
465             </div>
466         </div>
467         {/loop}
468     </div>
469 </div>
470 <!-- 分类 END-->
471 <script type="text/javascript">
472 $(".category-inner").on("click", 'nav', function() {
473     var $currItem = $(this),
474     index = $currItem.index();
475     
476     $currItem.addClass('on').siblings().removeClass('on');
477     $(".all-category-son").hide().eq(index).show();
478 })
479 </script>
480
481 {/if}
482
483 {template $template.'/_footerv2'}