张东林

作品

200

浏览

1796278

分享

363

粉丝

545

资讯

家园-张东林2014全国巡回展 第三站泉州泓翰美术馆

windowHeight){ $(".return-top").show(); }else{ $(".return-top").hide(); } if (scrollTop + windowHeight >= scrollHeight - 10 && !isLoad && !emptyempty(data_type) && data_type!='index') { $('.loading').html('加载中...').show(); if (isEmpty) { $('.loading').html('已全部加载完毕!').show(); return; } isLoad = true; page += 1; load(); }else{ var height = ($(".art_index_top").height()); if($(document).scrollTop()>height){ //$(".tit_5").addClass('float'); $(".nav_float").fadeIn(100); }else{ //$(".tit_5").removeClass('float'); $(".nav_float").fadeOut(100); } } } //加载更多 function load() { var data_type=$('#data_type').val(); $.ajax({ url: "http://m.artxun.com/artist//index.php?module=artist&act=artistinfo&op=info", type: "post", data : "artistid=115081&page="+page+"&type="+data_type, dataType : "json", success : function(msg){ if (msg == "") { isEmpty = true; // $('.loading').html('已全部加载完毕!').show(); //console.log('fElement',fElement); console.log('fElement',fElement); fElement.getBottomHeight(); return; } //video的传值不一样 if(data_type=="shipin"){ $("#data").append(msg.html); //检查视频url check_videourl(); //视频播放事件,用于统计播放量(ajax异步获取数据后要重新绑定jq效果) video_play(); isLoad = false; } //作品的瀑布流效果 else if(data_type=="jiage"){ //var $container = $('#data'); var data=msg.sell_production_res; var str = ''; var num = 0; $.each(data, function(index, el) { var image = new Image(); image.src = el['img']; $(image).load(function(){ // console.log('aa',i); // alert(data[i]['img']); str = '

'+el['name']+'

'+el['size']+'¥'+el['current_price']+'

'; //str = "123"; var $content = $( str ); // alert($content); $("#data").append( $content ).masonry( 'appended', $content ); // $container.append( $content ).masonry( 'appended', $content ); num++; if(num == data.length){ isLoad = false; } }); }); } //20171027 现在欣赏作品也要瀑布流了 else if(data_type=="zuopin"){ //var $container = $('#data'); var data=msg.enjoy_production_res; var str = ''; var num = 0; $.each(data, function(index, el) { var image = new Image(); image.src = el['img']; $(image).load(function(){ // console.log('aa',i); // alert(data[i]['img']); //str = '

'+data[i]['pro_name']+'

'+data[i]['size']+'¥'+data[i]['click_num']+'

'; //str = '123'; // console.log('aa',i); // alert(data[i]['img']); str = '

'+el['pro_name']+'

'+el['artist_name']+''+el['click_num']+'
'; //str = "123"; var $content = $( str ); // alert($content); $("#data").append( $content ).masonry( 'appended', $content ); // $container.append( $content ).masonry( 'appended', $content ); num++; if(num == data.length){ isLoad = false; } }); }); }else{ /*if(data_type=="enjoy_production"){ var msg =msg.enjoy_production_res; }*/ $("#data").append(msg); isLoad = false; } //视频的话还要处理一下 if(data_type=="video"){ var video_url_arr=msg.video_url_arr; video_url_arr.forEach(function(e){ get_video_url_tx(e.vid,e.id_name); }); } /* //作品的瀑布流效果 if(data_type=="production" || data_type=="enjoy_production" || data_type=="sell_production"){ var $container = $('#data'); $container.imagesLoaded(function() { $container.masonry({ columnWidth: '.box', itemSelector: '.box', gutter: '.gutter-sizer', isAnimated: true, }); }); }*/ $('.loading').hide(); }, error: function(XMLHttpRequest, textStatus, errorThrown) { isEmpty = true; $('.loading').html('没有更多了…'); } }); } //去资讯的其他页面(我实在起不好这名字了...) function to_news_else(url){ if(emptyempty(url)){ return false; } location.href=url; } //视频播放 function video_play(){ $(".video_img").click(function(){ id_name=$(this)[0].id; id_name=id_name.replace("video_img","",$(this)[0].id); if(id_name){ $(".img_gif").hide(); $(".img_png").show(); $("#png"+id_name).hide(); $("#gif"+id_name).show(); document.getElementById("player"+id_name).play(); } }); /*视频暂停*/ $('.h5_video').bind('pause', function(){ $(".img_gif").hide(); $(".img_png").show(); }) //视频播放后全屏、统计播放量 $('.h5_video').bind('play', function () { var id_name=$(this)[0].id; //获取id中需要的视频id id_name=id_name.replace("player","",$(this)[0].id).replace("_post","",$(this)[0].id); $.ajax({ url : 'index.php?module=artist&act=artistinfo&op=video_click', type : 'post', data: "video_id="+id_name, datetype : 'jsonp' }); //ios就不强制全屏了 if("else"=='ios'){ return; } /* //后边的操作是我找的js代码,没仔细看 launchFullscreen(document.getElementById("player"+id_name));*/ window.setTimeout(function exit(){ launchFullscreen(document.getElementById("player"+id_name)); /* //檢查瀏覽器是否處於全屏 if(invokeFieldOrMethod(document,'FullScreen') || invokeFieldOrMethod(document,'IsFullScreen') || document.IsFullScreen) { exitFullscreen(); }*/ },1*1000); }); } //去资讯的其他页面(我实在起不好这名字了...) function to_news_else(url){ if(emptyempty(url)){ return false; } location.href=url; } //检查一下是否需要加载更多 function check_load(){ var scrollHeight = $(document).height(); var windowHeight = $(this).height(); if(windowHeight>=scrollHeight){ isEmpty = true; $('.loading').html('已全部加载完毕!'); // fElement.getBottomHeight(); } } $(".return-top").click(function(){ $("html,body").animate( {"scrollTop":0},400); });