| | |
| | | <span>{$attr1_name}</span><i class="icon_down"></i> |
| | | </div> |
| | | {/if} |
| | | {if $_GPC['sort']=='knowledge'} |
| | | {if $_GPC['searchtype']=='2'} |
| | | <div class="list_menu flex-al1 flex9" onclick="showknowledge()"> |
| | | <span>{$knowledgename}</span><i class="icon_down"></i> |
| | | </div> |
| | |
| | | |
| | | <!-- 筛选条件 --> |
| | | <div class="sort_list_grid sort_list hidden"> |
| | | <a href="{php echo $this->createMobileUrl('search')}" {if !$_GPC['sort']}class="curr"{/if}>综合排序</a> |
| | | <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> |
| | | <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> |
| | | <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> |
| | | <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> |
| | | <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> |
| | | <a href="{php echo $this->createMobileUrl('search', array('sort'=>'hot'))}&searchtype={$searchtype}&keyword={$keyword}&cat_id={$cat_id}&pid={$pid}&attr1={$attr1}&attr2={$attr2}&knowledge_id={$know_id}" {if !$_GPC['sort']}class="curr"{/if}>综合排序</a> |
| | | <a href="{php echo $this->createMobileUrl('search', array('sort'=>'price'))}&searchtype={$searchtype}&keyword={$keyword}&cat_id={$cat_id}&pid={$pid}&attr1={$attr1}&attr2={$attr2}&knowledge_id={$know_id}" {if $_GPC['sort']=='price'}class="curr"{/if}>价格优先</a> |
| | | <a href="{php echo $this->createMobileUrl('search', array('sort'=>'hot'))}&searchtype={$searchtype}&keyword={$keyword}&cat_id={$cat_id}&pid={$pid}&attr1={$attr1}&attr2={$attr2}&knowledge_id={$know_id}" {if $_GPC['sort']=='hot'}class="curr"{/if}>人气优先</a> |
| | | <a href="{php echo $this->createMobileUrl('search', array('sort'=>'score'))}&searchtype={$searchtype}&keyword={$keyword}&cat_id={$cat_id}&pid={$pid}&attr1={$attr1}&attr2={$attr2}&knowledge_id={$know_id}" {if $_GPC['sort']=='score'}class="curr"{/if}>好评优先</a> |
| | | <a href="{php echo $this->createMobileUrl('search', array('sort'=>'general'))}&searchtype=1&keyword={$keyword}&cat_id={$cat_id}&pid={$pid}&attr1={$attr1}&attr2={$attr2}" {if $_GPC['sort']=='general'}class="curr"{/if}>普通课程</a> |
| | | <a href="{php echo $this->createMobileUrl('search', array('sort'=>'knowledge'))}&searchtype=2&keyword={$keyword}&cat_id={$cat_id}&pid={$pid}&attr1={$attr1}&attr2={$attr2}" {if $_GPC['sort']=='knowledge'}class="curr"{/if}>知识点课</a> |
| | | <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> |
| | | <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> |
| | | </div> |
| | | <!-- /筛选条件 --> |
| | | |
| | | <!-- 课程分类 --> |
| | | <div class="nav hidden" data-active="cate"> |
| | | <div id="nav" class="nav hidden" data-active="cate"> |
| | | <div class="nav_panel nav_panel-cate"> |
| | | <!-- 顶级分类 --> |
| | | <ul class="nav_menu nav_panel_cate_mt"> |
| | | <ul id="nav_menu_parent1" class="nav_menu"> |
| | | <a href="javascript:;"> |
| | | <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> |
| | | </a> |
| | |
| | | </ul> |
| | | |
| | | <!-- 推荐二级分类 --> |
| | | <ul class="nav_menu nav_panel-cate_st" {if !$_GPC['pid']}style="display:block;"{/if}"> |
| | | <a href="{php echo $this->createMobileUrl('search')}&keyword={$keyword}&sort={$sort}&attr1={$attr1}&attr2={$attr2}"> |
| | | <ul name="nav_st1" class="nav_menu" {if !$_GPC['pid']}style="display:block;"{/if}"> |
| | | <a href="{php echo $this->createMobileUrl('search')}&searchtype={$searchtype}&keyword={$keyword}&sort={$sort}&attr1={$attr1}&attr2={$attr2}"> |
| | | <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> |
| | | </a> |
| | | {loop $hot_category $hot} |
| | | <a href="{php echo $hot['link'] ? $hot['link'] : $this->createMobileUrl('search', array('cat_id'=>$hot['id']))}&keyword={$keyword}&sort={$sort}&attr1={$attr1}&attr2={$attr2}"> |
| | | <a href="{php echo $hot['link'] ? $hot['link'] : $this->createMobileUrl('search', array('cat_id'=>$hot['id']))}&searchtype={$searchtype}&keyword={$keyword}&sort={$sort}&attr1={$attr1}&attr2={$attr2}"> |
| | | <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> |
| | | </a> |
| | | {/loop} |
| | | </ul> |
| | | <!-- 二级分类 --> |
| | | {loop $categorylist $category} |
| | | <ul class="nav_menu nav_panel-cate_st" {if $_GPC['pid']==$category['id']}style="display:block;"{/if}> |
| | | <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;}"> |
| | | <ul name="nav_st1" class="nav_menu" {if $_GPC['pid']==$category['id']}style="display:block;"{/if}> |
| | | <a href="{php echo $category['link'] ? $category['link'] : $this->createMobileUrl('search', array('cat_id'=>$category['id'],'pid'=>$category['id'])).'&searchtype='.$searchtype.'&keyword='.$keyword.'&sort='.$sort.'&attr1='.$attr1.'&attr2='.$attr2;}"> |
| | | <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> |
| | | </a> |
| | | {loop $category['child'] $child} |
| | | <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;}"> |
| | | <a href="{php echo $child['link'] ? $child['link'] : $this->createMobileUrl('search', array('cat_id'=>$child['id'],'pid'=>$child['parentid'])).'&searchtype='.$searchtype.'&keyword='.$keyword.'&sort='.$sort.'&attr1='.$attr1.'&attr2='.$attr2;}"> |
| | | <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> |
| | | </a> |
| | | {/loop} |
| | |
| | | <!-- 课程属性 --> |
| | | {if $lesson_attribute['attribute1']} |
| | | <div class="sort_list_grid attribute1 hidden"> |
| | | <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> |
| | | <a href="{php echo $this->createMobileUrl('search')}&searchtype={$searchtype}&keyword={$keyword}&sort={$sort}&cat_id={$cat_id}&pid={$pid}&attr2={$attr2}&knowledge_id={$know_id}" {if !$_GPC['attr1']}class="curr"{/if}>不限</a> |
| | | {loop $attribute1 $item} |
| | | <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> |
| | | <a href="{php echo $this->createMobileUrl('search', array('attr1'=>$item['id']))}&searchtype={$searchtype}&keyword={$keyword}&sort={$sort}&cat_id={$cat_id}&pid={$pid}&attr2={$attr2}&knowledge_id={$know_id})" {if $_GPC['attr1']==$item['id']}class="curr"{/if}>{$item['name']}</a> |
| | | {/loop} |
| | | </div> |
| | | {/if} |
| | | {if $lesson_attribute['attribute2']} |
| | | <div class="sort_list_grid attribute2 hidden"> |
| | | <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> |
| | | <a href="{php echo $this->createMobileUrl('search')}&searchtype={$searchtype}&keyword={$keyword}&sort={$sort}&cat_id={$cat_id}&pid={$pid}&attr1={$attr1}&knowledge_id={$know_id}" {if !$_GPC['attr2']}class="curr"{/if}>不限</a> |
| | | {loop $attribute2 $item} |
| | | <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> |
| | | <a href="{php echo $this->createMobileUrl('search', array('attr2'=>$item['id']))}&searchtype={$searchtype}&keyword={$keyword}&sort={$sort}&cat_id={$cat_id}&pid={$pid}&attr1={$attr1}&knowledge_id={$know_id}" {if $_GPC['attr2']==$item['id']}class="curr"{/if}>{$item['name']}</a> |
| | | {/loop} |
| | | </div> |
| | | {/if} |
| | | <!-- /课程属性 --> |
| | | |
| | | <!-- 知识点课分类 --> |
| | | <div class="nav1 hidden" data-active="knowledge"> |
| | | <div class="nav_panel nav_panel-know"> |
| | | <div id="nav1" class="nav hidden" data-active="cate"> |
| | | <div class="nav_panel nav_panel-cate"> |
| | | <!-- 顶级分类 --> |
| | | <ul class="nav_menu nav_panel_know_mt"> |
| | | <ul id="nav_menu_parent2" class="nav_menu"> |
| | | <a href="javascript:;"> |
| | | <li class="nav_menu_item {if !$_GPC['knowledge_pid']}nav_menu_item_selected{/if}">推荐知识点</li> |
| | | </a> |
| | |
| | | </a> |
| | | {/loop} |
| | | </ul> |
| | | |
| | | <!-- 推荐二级分类 --> |
| | | <ul class="nav_menu nav_panel-know_st" {if !$_GPC['knowledge_pid']}style="display:block;"{/if}"> |
| | | <a href="{php echo $this->createMobileUrl('search')}&keyword={$keyword}&sort={$sort}&attr1={$attr1}&attr2={$attr2}"> |
| | | <ul name="nav_st2" class="nav_menu" {if !$_GPC['knowledge_pid']}style="display:block;"{/if}"> |
| | | <a href="{php echo $this->createMobileUrl('search')}}&searchtype={$searchtype}&keyword={$keyword}&sort={$sort}&cat_id={$cat_id}&pid={$pid}&attr1={$attr1}&attr2={$attr2}"> |
| | | <li class="nav_menu_item {if !$_GPC['knowledge_id']}nav_menu_item_selected{/if}">全部</li> |
| | | </a> |
| | | {loop $hot_knowledge $hot} |
| | | <a href="{php echo $hot['link'] ? $hot['link'] : $this->createMobileUrl('search', array('knowledge_id'=>$hot['id']))}&keyword={$keyword}&sort={$sort}&attr1={$attr1}&attr2={$attr2}"> |
| | | <a href="{php echo $hot['link'] ? $hot['link'] : $this->createMobileUrl('search', array('knowledge_id'=>$hot['id']))}}&searchtype={$searchtype}&keyword={$keyword}&sort={$sort}&cat_id={$cat_id}&pid={$pid}&attr1={$attr1}&attr2={$attr2}"> |
| | | <li class="nav_menu_item {if !$_GPC['knowledge_pid'] && ($_GPC['knowledge_id']==$hot['id'])}nav_menu_item_selected{/if}">{$hot['name']}</li> |
| | | </a> |
| | | {/loop} |
| | | </ul> |
| | | <!-- 二级分类 --> |
| | | {loop $knowledgelist $know} |
| | | <ul class="nav_menu nav_panel-know_st" {if $_GPC['knowledge_pid']==$know['id']}style="display:block;"{/if}> |
| | | <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;}"> |
| | | <ul name="nav_st2" class="nav_menu" {if $_GPC['knowledge_pid']==$know['id']}style="display:block;"{/if}> |
| | | <a href="{php echo $know['link'] ? $know['link'] : $this->createMobileUrl('search', array('knowledge_id'=>$know['id'])).'&searchtype='.$searchtype.'&keyword='.$keyword.'&sort='.$sort.'&cat_id='.$cat_id.'&pid='.$pid.'&attr1='.$attr1.'&attr2='.$attr2;}"> |
| | | <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> |
| | | </a> |
| | | {loop $know['child'] $child} |
| | | <a href="{php echo $child['link'] ? $child['link'] : $this->createMobileUrl('search', array('knowledge_id'=>$child['id'],'knowledge_pid'=>$child['parentid'])).'&keyword='.$keyword.'&sort='.$sort.'&attr1='.$attr1.'&attr2='.$attr2;}"> |
| | | <a href="{php echo $child['link'] ? $child['link'] : $this->createMobileUrl('search', array('knowledge_id'=>$child['id'],'knowledge_pid'=>$child['parentid'])).'&searchtype='.$searchtype.'&keyword='.$keyword.'&sort='.$sort.'&cat_id='.$cat_id.'&pid='.$pid.'&attr1='.$attr1.'&attr2='.$attr2;}"> |
| | | <li class="nav_menu_item {if $_GPC['knowledge_id']==$child['id']}nav_menu_item_selected{/if}">{$child['name']}</li> |
| | | </a> |
| | | {/loop} |
| | | </ul> |
| | | {/loop} |
| | | |
| | | </div> |
| | | </div> |
| | | <!-- /知识点课分类 --> |
| | |
| | | /* 课程分类 */ |
| | | function showcategory(){ |
| | | closeCondition(); |
| | | $(".nav").removeClass("hidden"); |
| | | switchnav(1); |
| | | $(".mark").removeClass("hidden"); |
| | | } |
| | | $(".nav_panel_cate_mt").on("click", 'a', function() { |
| | | |
| | | $("#nav_menu_parent1").on("click", 'a', function() { |
| | | var $currItem = $(this), |
| | | index = $currItem.index(); |
| | | |
| | |
| | | // /* 知识点分类 */ |
| | | function showknowledge(){ |
| | | closeCondition(); |
| | | $(".nav1").removeClass("hidden"); |
| | | switchnav(2); |
| | | $(".mark").removeClass("hidden"); |
| | | } |
| | | $(".nav_panel_know_mt").on("click", 'a', function() { |
| | | $("#nav_menu_parent2").on("click", 'a', function() { |
| | | var $currItem = $(this), |
| | | index = $currItem.index(); |
| | | |
| | | $(".nav_panel_know_mt a li").removeClass('nav_menu_item_selected'); |
| | | $(".nav_panel_cate_mt a li").removeClass('nav_menu_item_selected'); |
| | | $currItem.addClass('nav_menu_item_selected').siblings().removeClass('nav_menu_item_selected'); |
| | | $(".nav_panel-know_st").hide().eq(index).show(); |
| | | $(".nav_panel-cate_st").hide().eq(index).show(); |
| | | }); |
| | | |
| | | function switchnav(flag){ |
| | | if(flag==1){ |
| | | $("#nav_menu_parent1").removeClass("nav_panel_cate_mt"); |
| | | $("ul[name='nav_st1']").removeClass("nav_panel_cate_st"); |
| | | |
| | | $("#nav_menu_parent1").addClass("nav_panel_cate_mt"); |
| | | $("ul[name='nav_st1']").addClass("nav_panel-cate_st "); |
| | | |
| | | $("#nav_menu_parent2").removeClass("nav_panel_cate_mt"); |
| | | $("ul[name='nav_st2']").removeClass("nav_panel-cate_st "); |
| | | |
| | | $("#nav1").removeClass("nav"); |
| | | $("#nav").removeClass("nav"); |
| | | $("#nav").removeClass("hidden"); |
| | | $("#nav").addClass("nav"); |
| | | }else{ |
| | | $("#nav_menu_parent2").removeClass("nav_panel_cate_mt"); |
| | | $("ul[name='nav_st2']").removeClass("nav_panel-cate_st "); |
| | | $("#nav_menu_parent2").addClass("nav_panel_cate_mt"); |
| | | $("ul[name='nav_st2']").addClass("nav_panel-cate_st "); |
| | | |
| | | $("#nav_menu_parent1").removeClass("nav_panel_cate_mt"); |
| | | $("ul[name='nav_st1']").removeClass("nav_panel-cate_st "); |
| | | |
| | | $("#nav").removeClass("nav"); |
| | | $("#nav1").removeClass("nav"); |
| | | $("#nav1").removeClass("hidden"); |
| | | $("#nav1").addClass("nav"); |
| | | } |
| | | } |
| | | |
| | | |
| | | /* 关闭所有选项 */ |
| | |
| | | $(".sort_list_grid").addClass("hidden"); |
| | | $(".nav").addClass("hidden"); |
| | | $(".attribute1").addClass("hidden"); |
| | | $(".attribute2").addClass("hidden"); |
| | | $(".nav1").addClass("hidden"); |
| | | $(".attribute2").addClass("hidden"); |
| | | $(".mark").addClass("hidden"); |
| | | } |
| | | </script> |
| | |
| | | insertDiv(jsonObj); |
| | | }else{ |
| | | get_status = false; |
| | | document.getElementById("loading_div").innerHTML='<div class="loading_bd">没有了,已经到底了</div>'; |
| | | // document.getElementById("loading_div").innerHTML='<div class="loading_bd">没有了,已经到底了</div>'; |
| | | } |
| | | }); |
| | | } |
| | |
| | | var head = document.head || document.getElementsByTagName('head')[0]; |
| | | var style = document.createElement('style'); |
| | | style.innerHTML = '.nav_panel-cate{height:' + nav_panel_height + 'px !important;}'; |
| | | var style1 = document.createElement('style'); |
| | | style1.innerHTML = '.nav_panel-know{height:' + nav_panel_height + 'px !important;}'; |
| | | head.appendChild(style); |
| | | head.appendChild(style1); |
| | | </script> |
| | | |
| | | {elseif $op=='allcategory'} |