Jony/assets/js/joe.video.min.js

1 line
7.4 KiB
JavaScript
Raw Normal View History

2021-04-02 02:07:39 +00:00
document.addEventListener("DOMContentLoaded",()=>{function t(){function t(){window.scrollTo({top:0,behavior:"smooth"}),$(".joe_video__list-item").css("display","").html(""),o=!0,$.ajax({url:Joe.BASE_API,type:"POST",dataType:"json",data:{routeType:"maccms_list",ac:"videolist",t:i.t,pg:i.pg,wd:i.wd},success(t){if(1!==t.code)return $(".joe_video__list-item").css("display","block").html('<p class="error">数据加载失败!请检查!</p>');if(t.data.list.length){let e="";t.data.list.forEach(t=>{e+=`\n\t\t\t\t\t\t\t\t<a class="item animated bounceIn" href="${window.location.href+"?vod_id="+t.vod_id}" target="_blank" rel="noopener noreferrer nofollow">\n\t\t\t\t\t\t\t\t\t<i class="year" style="display: ${t.vod_year&&0!=t.vod_year?"block":"none"}">${t.vod_year}</i>\n\t\t\t\t\t\t\t\t\t<div class="thumb">\n\t\t\t\t\t\t\t\t\t\t<img width="100%" height="100%" class="pic lazyload" src="${Joe.LAZY_LOAD}" data-src="${t.vod_pic}" alt="${t.vod_name}">\n\t\t\t\t\t\t\t\t\t</div> \n\t\t\t\t\t\t\t\t\t<p class="title">${t.vod_name}</p>\n\t\t\t\t\t\t\t\t</a>`}),$(".joe_video__list-item").html(e)}else $(".joe_video__list-item").css("display","block").html('<p class="error">暂无数据!</p>');a=t.data.pagecount,e()},complete:()=>o=!1})}function e(){if(0==a)return $(".joe_video__pagination").hide();$(".joe_video__pagination").show();let t="";1!=i.pg&&(t+=`\n \t\t<li class="joe_video__pagination-item" data-pg="1">首页</li>\n \t\t<li class="joe_video__pagination-item" data-pg="${i.pg-1}">\n <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="12" height="12"><path d="M822.272 146.944l-396.8 396.8c-19.456 19.456-51.2 19.456-70.656 0-18.944-19.456-18.944-51.2 0-70.656l396.8-396.8c19.456-19.456 51.2-19.456 70.656 0 18.944 19.456 18.944 45.056 0 70.656z"/><path d="M745.472 940.544l-396.8-396.8c-19.456-19.456-19.456-51.2 0-70.656 19.456-19.456 51.2-19.456 70.656 0l403.456 390.144c19.456 25.6 19.456 51.2 0 76.8-26.112 19.968-51.712 19.968-77.312.512zm-564.224-63.488c0-3.584 0-7.68.512-11.264h-.512v-714.24h.512c-.512-3.584-.512-7.168-.512-11.264 0-43.008 21.504-78.336 48.128-78.336s48.128 34.816 48.128 78.336c0 3.584 0 7.68-.512 11.264h.512v714.24h-.512c.512 3.584.512 7.168.512 11.264 0 43.008-21.504 78.336-48.128 78.336s-48.128-35.328-48.128-78.336z"/></svg>\n \t\t</li>\n \t\t<li class="joe_video__pagination-item" data-pg="${i.pg-1}">${i.pg-1}</li>\n \t`),t+=`<li class="joe_video__pagination-item active">${i.pg}</li>`,i.pg!=a&&(t+=`\n \t\t<li class="joe_video__pagination-item" data-pg="${i.pg+1}">${i.pg+1}</li>\n \t\t<li class="joe_video__pagination-item" data-pg="${i.pg+1}">\n <svg class="next" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="12" height="12"><path d="M822.272 146.944l-396.8 396.8c-19.456 19.456-51.2 19.456-70.656 0-18.944-19.456-18.944-51.2 0-70.656l396.8-396.8c19.456-19.456 51.2-19.456 70.656 0 18.944 19.456 18.944 45.056 0 70.656z"/><path d="M745.472 940.544l-396.8-396.8c-19.456-19.456-19.456-51.2 0-70.656 19.456-19.456 51.2-19.456 70.656 0l403.456 390.144c19.456 25.6 19.456 51.2 0 76.8-26.112 19.968-51.712 19.968-77.312.512zm-564.224-63.488c0-3.584 0-7.68.512-11.264h-.512v-714.24h.512c-.512-3.584-.512-7.168-.512-11.264 0-43.008 21.504-78.336 48.128-78.336s48.128 34.816 48.128 78.336c0 3.584 0 7.68-.512 11.264h.512v714.24h-.512c.512 3.584.512 7.168.512 11.264 0 43.008-21.504 78.336-48.128 78.336s-48.128-35.328-48.128-78.336z"/></svg>\n \t\t</li>\n \t`),i.pg<a&&(t+=`<li class="joe_video__pagination-item" data-pg="${a}">末页</li>`),$(".joe_video__pagination").html(t)}let i={pg:"",t:"",wd:""},a="",o=!1;$.ajax({url:Joe.BASE_API,type:"POST",dataType:"json",data:{routeType:"maccms_list"},success(t){if(1!==t.code)return $(".joe_video__type-list").html(`<li class="error">${t.data}</li>`);if(!t.data.class.length)return $(".joe_video__type-list").html('<li class="error">暂无数据!</li>');let e='<li class="item" data-t="">全部</li>';t.data.class.