$('.m_video_img').on('click',function(){ //处理视频播放图标 var _video = document.getElementById("myVideo"); myVideo.play(); //点击图标视频播放 $('.m_video_sp').attr('controls','controls'); //点击 显示默认的控件 $(this).hide(); var id = $(".m_video_img").attr('data-id'); $.ajax({ url:'/video/plays', dataType:"json", type:'GET', data:{id:id}, success:function(data){ } }); }) // 精选楼盘 换一换 var idQh = 1; //默认页数 var DataN = $('.m_zaigai_title i').attr('city'); //默认ID var _number = $('.m_zaigai_title i').attr('number'); //换一换页数 ajax_lp(); if(_number < 2){ $('.m_zaigai_title i').hide(); }else{ $('.m_zaigai_title i').show(); $('.m_zaigai_title i').on('click',function(){ idQh += 1; // console.log(idQh); if (idQh > _number) { idQh = 1; }; ajax_lp(); }) } // 精选楼盘 function ajax_lp (){ var html = ''; $.ajax({ url: "/video/relevantpush", // 索取 data:{page:idQh,city:DataN}, //传ID type: "GET", dataType: "json", success: function(data) {//请求成功完成后要执行的方法 if(data.code == 200){ $.each(data.data, function (i, data) { html+= '
'; html+= '00:00'; html+= '
'; html+= ''+str+'
'; }else{ html+= ''+data.title+'
'; } html+= ''+(data.plays * 1 + 999)+'播放 | '+data.create_at+'
'; html+= '