123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242 |
-
- $('#demo06').navbarscroll({
- defaultSelect: 0 ,
- scrollerWidth:4,
- fingerClick:1,
- endClickScroll:function(obj){
-
- }
- });
- var idData = "";
- var listId = 0;
-
- $('.m_click li').on('click',function(){
- var idSwitch = $(this).attr('switch');
-
- $(this).attr('id','cur').siblings().attr('id','');
- switch(idSwitch)
- {
- case 'false':
- $('.m_notice_list_box').show();
- $(this).attr('switch','true').siblings().attr('switch','false');
- $('.m_albumtnav_zhez').show();
- break;
- case 'true':
- $('.m_notice_list_box').hide();
- $(this).attr('switch','false');
- $('.m_albumtnav_zhez').hide();
- break;
- }
-
- idData = $(this).attr('dataid');
- ajax_list();
- })
- $('.m_albumtnav_zhez').on('click',function(){
- $(this).hide();
- $('.m_notice_list_box').hide();
- $('.m_click li').attr('switch','false');
- })
- AjaxFn();
- function ajax_list(){
- var html = '';
- $.ajax({
- url: "/knowledgebase/getnav",
- data:{id:idData},
- type: "GET",
- dataType: "json",
- success: function(data) {
- $.each(data.data, function (i, data) {
- html+='<li zxid="'+data.id+'">'+data.name+'</li>';
- });
- $(".m_notice_list_box ul").html(html);
- $('.m_notice_list_box ul li').on('click',function(){
- $('.m_zx_list_box ul').html("");
- $('.m_albumtnav_zhez').hide();
- $('.m_notice_list_box').hide();
- $('.m_click li').attr('switch','false');
- listId = $(this).attr('zxid');
-
- AjaxFn();
- })
-
- }
- });
- }
- var w_li ='';
- w_li +='<div class="m_zxbm_box">';
- w_li +='<a class="popup" href="javascript:;" data-name="报名看房" data-text="我们将为您保密个人信息!专业团队,一对一服务,让你全程无忧看房!" data-id="0" data-module="44">';
- w_li +='<img src="/image/wgfxz.png" alt="">';
- w_li +='</a>';
- w_li +='</div>';
- function AjaxFn(){
- page = 0;
- size = 10;
- page++;
- $.ajax({
- type: 'GET',
- url: '/knowledgebase/getlist?&page='+page+'&limit='+size+'&id='+listId,
-
- dataType: 'json',
- success: function(data){
-
- $('.m_zx_list_box ul').append(ModuleWay(data))
-
- var on_off = true;
- if(on_off){
- $('.m_zx_list_box ul li').eq(3).after(w_li)
- on_off = false;
- }
- fun();
-
-
-
-
-
- },
- error: function(xhr, type){
-
-
-
- }
- });
-
-
-
-
-
-
-
-
-
- }
- function ModuleWay(data){
-
- var html ="";
- $.each(data.data, function (i, data) {
- html+='<li class="c">';
- html+='<a href="/knowledgebase/details/'+data.id+'/">';
- html+='<div class="m_zx_listimg"><img src="http://img.yigouf.com/pc/newsknowledge/'+data.thumb[0]+'" alt=""></div>';
- html+='<div class="m_zx_listText">';
- html+='<em>'+data.subject+'</em>';
- html+='<p>'+data.name+'</p>';
- html+='</div>';
- html+='</a>';
- html+='</li>';
- })
- return html ;
- }
- function fun(){
-
- $('.m_zx_list_box').dropload({
-
- scrollArea : window,
-
- loadDownFn : function(me){
- page++;
-
- $.ajax({
- type: 'GET',
- url: '/knowledgebase/getlist?&page='+page+'&limit='+size+'&id='+listId,
-
- dataType: 'json',
- success: function(data){
-
- if(data.code == 200){
- $('.m_zx_list_box ul').append(ModuleWay(data))
-
- }else{
-
- me.lock();
-
- me.noData();
-
- }
-
-
- setTimeout(function(){
-
-
-
- me.resetload();
- },500);
- $('.dropload-down').eq(0).show().siblings('.dropload-down').remove();
-
-
- },
- error: function(xhr, type){
-
-
-
- }
- });
- }
- });
-
- $(window).scroll(function(){
-
- $('.m_notice_list_box').hide();
- $('.m_albumtnav_zhez').hide();
- $('.m_click li').attr('switch','false');
-
- })
- }
|