123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473 |
- $(document).ready(function () {
-
- let back = localStorage.getItem('back');
- if(back) {
- location.reload(true);
- localStorage.removeItem('back');
- }
- var languageParameter = localStorage.getItem("language") || "CN";
- var uid = localStorage.getItem("uid") || 0;
- var url = window.location.search;
- var theRequest = new Object();
- if (url.indexOf("?") != -1) {
- var str = url.substr(1);
- strs = str.split("&");
- for (var i = 0; i < strs.length; i++) {
- theRequest[strs[i].split("=")[0]] = unescape(
- decodeURIComponent(strs[i].split("=")[1])
- );
- }
- }
- var filterStarTime = 0;
- var filterEndTime = 99999999;
- var filterLabel = "";
- var filterType = "tuijian";
- var labelname = "";
- var dataArray = [];
- var allDataArray = [];
- var videotype = "Asian";
- var currentPage = theRequest.page ? Number(theRequest.page) : 1;
- var homePageText = "";
- var endPageText = "";
- var prevPageText = "";
- var nextPageText = "";
- var showVideoNum = 12;
- var ispage = true;
- var isOpen = false;
- var filterTypeArray = ["zuixin", "remen", "dianzan", "shichang"];
- var isFilteringModules = false;
- var starFilterIsShow = false;
- var isSelectLabel = true;
- var languageIsLong = false;
- var bannerArr = new Array();
- if (languageParameter == "CN") {
- homePageText = "首頁";
- endPageText = "尾頁";
- prevPageText = "上一頁";
- nextPageText = "下一頁";
- $("#chinese").addClass(" isSelectLanguage");
- $("#chinese").siblings().removeClass(" isSelectLanguage");
- } else {
- homePageText = "One";
- endPageText = "Prev";
- prevPageText = "Next";
- nextPageText = "Last";
- $("#english").addClass(" isSelectLanguage");
- $("#english").siblings().removeClass(" isSelectLanguage");
- }
- // let logo = localStorage.getItem('logo');
- // console.log(logo);
- // if(logo) {
- // $(".ageTipPage").hide();
- // localStorage.removeItem('logo');
- // }else{
- // $(".ageTipPage").show();
- // }
-
- if(sessionStorage.getItem('isReload')) {
- // 页面被刷新
- }else {
- // 第一次被刷新
- $(".ageTipPage").show();
- sessionStorage.setItem('isReload', true);
- }
- $('.addressImg').on('click', function() {
- $(".addressBox").show();
- })
- $(".confirmBtn").on("click", function () {
- $(".ageTipPage").hide();
- $(".addressBox").show();
- });
- $(".logo").on("click", function () {
- localStorage.setItem('logo', true);
- $(location).attr("href", "index.html?logo=true");
- });
- if (uid) {
- let uname = localStorage.getItem("username");
- $(".userContent").show();
- $(".userName").text(uname);
- $(".myCollection").show();
- $(".loginOut").show();
- $(".userLogin").hide();
- } else {
- $(".userContent").hide();
- $(".myCollection").hide();
- $(".loginOut").hide();
- $(".userBtn").show();
- }
- // 判断中英文
- LanguageSwitching();
- // 获取标签数据
- function getlabelData(videopage) {
- let languageParameter = localStorage.getItem("language") || "CN";
- $("#tip").hide();
- $.ajax({
- type: "post",
- url: "https://www.bibidd.com/bibidd/Mediasix/shouye_resou_img_video",
- dataType: "json",
- data: {
- type: "video",
- page: videopage,
- LNG: languageParameter,
- },
- success: function (res) {
- let labelDataArray = res.data;
- let labelHtml = "";
- labelHtml += '<div class="hotLabel">';
- $.each(labelDataArray, function (index, data) {
- labelHtml += '<div class="label">';
- labelHtml += `<p >${languageParameter == "CN" ? data.china_name : data.name
- }</p>`;
- labelHtml += "<p >" + data.num + "</p>";
- labelHtml += "</div>";
- });
- labelHtml += "</div>";
- $(".labelpage").html(labelHtml);
- },
- complete: function (res) {
- // 分页
- $(".bottomLoadContent").hide();
- let dataNum = res.responseJSON.all_num;
- $(function () {
- $("#pagination3").pagination({
- currentPage: currentPage,
- totalPage: Math.ceil(dataNum / 30),
- isShow: true,
- count: 7,
- homePageText: homePageText,
- endPageText: endPageText,
- prevPageText: prevPageText,
- nextPageText: nextPageText,
- callback: function (current) {
- $(location).attr(
- "href",
- "index.html?type=label" + "&page=" + current
- );
- },
- });
- Math.ceil(dataNum / 30) < 2
- ? $(".firstPage").show()
- : $(".firstPage").hide();
- });
-
- // 标签检索视频
- $(".label").on("click", function () {
- let nn = $(this).find("p").eq(0).text();
- $(location).attr("href", "index.html?labelname=" + nn);
- });
- },
- });
- }
- // 获取视频数据
- function getData(videopage) {
- $("#tip").hide();
- clearScroll();
- $(".bottomLoadContent").show();
- $.ajax({
- type: "post",
- url: "https://www.bibidd.com/bibidd/Mediasix/video_info_list",
- dataType: "json",
- data: {
- uid,
- type: videotype,
- page: videopage,
- },
- success: function (res) {
- allDataArray = res.data;
- dataArray = [];
- if (allDataArray.length > 0) {
- // let showDataNum =
- // allDataArray.length % 12 === 0 ? 12 : allDataArray.length % 12;
- let showDataNum = allDataArray.length >= 12 ? 12 : allDataArray.length;
- for (let i = 0; i < showDataNum; i++) {
- dataArray.push(allDataArray[i]);
- }
- }
- },
- complete: function (res) {
- ispage = true;
- // 分页
- let dataNum = res.responseJSON.all_num;
- $(function () {
- $("#pagination3").pagination({
- currentPage: currentPage,
- totalPage: Math.ceil(dataNum / 60),
- isShow: true,
- count: 7,
- homePageText: homePageText,
- endPageText: endPageText,
- prevPageText: prevPageText,
- nextPageText: nextPageText,
- callback: function (current) {
- $(location).attr(
- "href",
- "index.html?type=video" +
- "&name=" +
- videotype +
- "&page=" +
- current
- );
- },
- });
- Math.ceil(dataNum / 60) < 2
- ? $(".firstPage").show()
- : $(".firstPage").hide();
- });
- getBannerData();
- $("html, body").animate(
- {
- scrollTop: 0,
- },
- 50
- );
- },
- });
- }
- if (!$(".titleHead").text()) {
- $(".titleHead").text("Aisa");
- }
- if (theRequest.labelname) {
- console.log(1);
- console.log(theRequest);
- labelname = theRequest.labelname;
- $(".titleHead").text(theRequest.labelname);
- getLabelVideoData(1);
- } else if (theRequest.type) {
- if (theRequest.type === "video") {
- // 获取首页视频
- videotype = theRequest.name;
- $("#newest").show();
- $("#hot").show();
- let titleNum = 0;
- if (theRequest.name == "tuijian") {
- titleNum = 0;
- $(".titleHead").text("Recommend");
- } else if (theRequest.name === "Asian") {
- titleNum = 1;
- $(".titleHead").text("Asia");
- } else if (theRequest.name === "Anime") {
- titleNum = 2;
- $(".titleHead").text("Animation");
- }
- getData(currentPage);
- let titleArr = [];
- if (languageParameter == "CN") {
- titleArr = ["推薦", "亞洲", "動畫"];
- } else {
- titleArr = ["Recommend", "Asia", "Animation"];
- }
- $(".titleHead").text(titleArr[titleNum]);
- } else if (theRequest.type === "labelvideo") {
- // 获取标签视频
- labelname = theRequest.name;
- getLabelVideoData(currentPage);
- } else if (theRequest.type === "search") {
- // 获取搜索栏视频
- var searchInputVal = theRequest.name;
- searchVideo(currentPage);
- $(".titleHead").text(searchInputVal);
- } else if (theRequest.type === "filter") {
- // 获取筛选视频
- filterType = theRequest.filterType;
- filterStarTime = theRequest.filterStarTime;
- filterEndTime = theRequest.filterEndTime;
- filterLabel = theRequest.filterLabel;
- getFilterData(currentPage);
- // 筛选视频
- } else if (theRequest.type === "label") {
- // 标签展示
- $(".videopage").hide();
- $(".labelpage").show();
- $(".box").show();
- getlabelData(currentPage);
- }
- } else {
- console.log(33);
- if (languageParameter == "CN") {
- $(".titleHead").text("亞洲");
- } else {
- $(".titleHead").text("Asia");
- }
- // 进入首页
- videotype = "Asian";
- getData(1);
- }
- var typeBtnIsSelect = false;
- // 热门tag分类
- $(".nav li").on("click", function () {
- typeBtnIsSelect = false;
- clearScroll();
- $(".bottomLoadContent").show();
- const pname = $(this).find("p").eq(0).text();
- const arr = ["tuijian", "Asian", "Anime", ""];
- $(".titleHead").text(pname);
- if (
- $(this).index() === 0 ||
- $(this).index() === 1 ||
- $(this).index() === 2
- ) {
- $(".videopage").show();
- $(".labelpage").hide();
- loadVideoBackground();
- videotype = arr[$(this).index()];
- $(location).attr(
- "href",
- "index.html?type=video" + "&name=" + videotype + "&page=" + 1
- );
- } else {
- getlabelData(1);
- $(".videopage").hide();
- $(".labelpage").show();
- $(".box").show();
- typeBtnIsSelect = true;
- }
- });
- // 註冊/登录
- $(".userImg").on("click", function () {
- $(".mine").animate(
- {
- width: "100%",
- },
- 100
- );
- });
- // 进入搜索视频页面
- $(".searchImg").on("click", function () {
- $(location).attr("href", "search.html");
- });
- // 返回顶部
- $(".backToTop").on("click", function () {
- $("html, body").animate(
- {
- scrollTop: 0,
- },
- 500
- );
- });
- // 获取标签视频
- function getLabelVideoData(lpage) {
- let languageParameter = localStorage.getItem("language") || "CN";
- clearScroll();
- $(".bottomLoadContent").show();
- $.ajax({
- type: "post",
- url: "https://www.bibidd.com/bibidd/Mediasix/select_type_detail",
- dataType: "json",
- data: {
- LNG: languageParameter,
- type_name: labelname,
- type: "video",
- page: lpage,
- },
- success: function (res) {
- allDataArray = res.data;
- if (allDataArray.length == 0) {
- $("#tip").show();
- if (languageParameter == "CN") {
- tip("暫無數據");
- } else {
- tip("The data you need is not found.");
- }
- $(".bottomLoadContent").hide();
- $(".box").hide();
- } else {
- $("#tip").hide();
- }
- dataArray = [];
- if (allDataArray.length > 0) {
- // let showDataNum =
- // allDataArray.length % 12 === 0 ? 12 : allDataArray.length % 12;
- let showDataNum = allDataArray.length >= 12 ? 12 : allDataArray.length;
- for (let i = 0; i < showDataNum; i++) {
- dataArray.push(allDataArray[i]);
- }
- }
- },
- complete: function (res) {
- $(".bottomLoadContent").hide();
- ispage = true;
- $("html, body").animate(
- {
- scrollTop: 0,
- },
- 50
- );
- // 分页
- let dataNum = res.responseJSON.all_num;
- $(function () {
- $("#pagination3").pagination({
- currentPage: currentPage,
- totalPage: Math.ceil(dataNum / 60),
- isShow: true,
- count: 7,
- homePageText: homePageText,
- endPageText: endPageText,
- prevPageText: prevPageText,
- nextPageText: nextPageText,
- callback: function (current) {
- $(location).attr(
- "href",
- "index.html?type=labelvideo" +
- "&name=" +
- labelname +
- "&page=" +
- current
- );
- },
- });
- Math.ceil(dataNum / 60) < 2
- ? $(".firstPage").show()
- : $(".firstPage").hide();
- });
- getBannerData();
- },
- });
- }
- // 视频加载背景
- function loadVideoBackground() { }
- // 视频搜索
- function searchVideo(videopage) {
-
- clearScroll();
- $(".bottomLoadContent").show();
- $.ajax({
- type: "post",
- url: "https://www.bibidd.com/bibidd/Mediasix/sousuo_img_video",
- dataType: "json",
- data: {
- type_name: searchInputVal,
- type: "video",
- page: videopage,
- },
- success: function (res) {
- console.log(res)
- allDataArray = res.data;
- if (allDataArray.length == 0) {
- $("#tip").show();
- if (languageParameter == "CN") {
- tip('暫無數據');
- } else {
- tip('The data you need is not found.');
- }
- $(".bottomLoadContent").hide();
- $(".box").hide();
- } else {
- $("#tip").hide();
- }
- dataArray = [];
- if (allDataArray.length > 0) {
- // let showDataNum =
- // allDataArray.length % 12 === 0 ? 12 : allDataArray.length % 12;
-
- let showDataNum = allDataArray.length >= 12 ? 12 : allDataArray.length;
- for (let i = 0; i < showDataNum; i++) {
- dataArray.push(allDataArray[i]);
- }
- }
- },
- complete: function (res) {
- ispage = true;
- // 分页
- let dataNum = res.responseJSON.all_num;
- $(function () {
- $("#pagination3").pagination({
- currentPage: currentPage,
- totalPage: Math.ceil(dataNum / 60),
- isShow: true,
- count: 7,
- homePageText: homePageText,
- endPageText: endPageText,
- prevPageText: prevPageText,
- nextPageText: nextPageText,
- callback: function (current) {
- $(location).attr(
- "href",
- "index.html?type=search" +
- "&name=" +
- searchInputVal +
- "&page=" +
- current
- );
- },
- });
- Math.ceil(dataNum / 60) < 2
- ? $(".firstPage").show()
- : $(".firstPage").hide();
- });
- console.log(dataArray);
- getBannerData();
- $("html, body").animate(
- {
- scrollTop: 0,
- },
- 50
- );
- },
- });
- }
- function tip(text) {
- $("#tip").show();
- $(".tiptext").text(text);
- if (text != "暫無數據" && text != "The data you need is not found.") {
- setTimeout(() => {
- $("#tip").hide();
- }, 1000);
- }
- }
- // 上拉加载更多
- $(window).scroll(function () {
- var scrollT = $(document).scrollTop();
- var offsetT = $(".main").offset().top;
- if (scrollT >= offsetT) {
- $(".backToTop").show();
- } else {
- $(".backToTop").hide();
- }
- let windowHeight = $(window).height();
- let windowScrollTop = $(window).scrollTop();
- let loadingHeight = $(".bottomLoadContent").height();
- if (
- windowHeight + windowScrollTop + loadingHeight + 220 >=
- $(document).height()
- ) {
- if (ispage && allDataArray.length > 0) {
- ispage = false;
- if (showVideoNum < allDataArray.length) {
- $(".bottomLoadContent").show();
- $(".box").hide();
- showVideoNum += 12;
- showVideoNum =
- showVideoNum >= allDataArray.length
- ? allDataArray.length
- : showVideoNum;
- dataArray = [];
- console.log(showVideoNum);
- let forIndex = showVideoNum >= allDataArray.length ? allDataArray.length%12 : 12
- for (let i = 0; i < forIndex; i++) {
- dataArray.push(allDataArray[showVideoNum - forIndex + i]);
- }
-
- console.log(dataArray);
- let videoHtml = "";
- $.each(dataArray, function (index, data) {
- if (data.jump_link) {
- let headBannerHtml = `
- <div class="banner">
- <div class="lazy bannerImg" data-original="${data.img}"></div>
- </div>
- `;
- videoHtml += headBannerHtml;
- } else {
- if(data.top_img != 'https://www.bibidd.com/bibidd_testtest/A.jpg') {
- videoHtml += `
- <div id="videoContent${showVideoNum - 12 + index
- }" class="videoContent">
- <div class="lazy videoPhoto" data-original="${data.top_img}">
- <div class="videoTime">${videoTime(data.time_chuo)}</div>
- </div>
- <div class="videoTitle">${data.title}</div>
- </div>
- `;
- }
- }
- });
- setTimeout(() => {
- $(".video").append(videoHtml);
- $(".bottomLoadContent").hide();
- var loadingUrl = "/Public/bibidd/images/loading.png";
- $(".lazy").lazyload({
- effect: "show",
- placeholder: loadingUrl,
- failurelimit: 10,
- skip_invisible: false,
- });
- $(".videoContent").on("click", function () {
- let thisId = $(this).attr("id");
- let thisIdLength = $(this).attr("id").length;
- let thisIndex = Number(thisId.substring(12, thisIdLength));
- let labelname = theRequest.labelname || '';
- let type = theRequest.type || '';
- let name = theRequest.name || 'Asia';
-
- $(location).attr(
- "href",
- "videodetails.html?videoid=" +
- allDataArray[thisIndex].id +
- "&fabulous=" +
- allDataArray[thisIndex].thumbs_up +
- "&favorite=" +
- allDataArray[thisIndex].favorite +
- "&videoname=" +
- allDataArray[thisIndex].title +
- "&labelname=" +
- labelname +
- "&type=" +
- type +
- "&videotype=" +
- videotype +
- "&name=" +
- name
- );
- });
- ispage = true;
- // 广告详情
- $(".banner").on("click", function () {
- window.location.href = allDataArray[$(this).index()].jump_link;
- });
- }, 500);
- } else {
- $(".bottomLoadContent").hide();
- $(".box").show();
- ispage = true;
- }
- }
- }
- });
- // 创建视频dom元素
- function createDomHtml(dataArray) {
- let videoHtml = "";
- $.each(dataArray, function (index, data) {
- if (data.jump_link) {
- let headBannerHtml = `
- <div class="banner">
- <div class="lazy bannerImg" data-original=""></div>
- </div>
- `;
- $(".headBanner").html(headBannerHtml);
- videoHtml += headBannerHtml;
- } else {
- if(data.top_img != 'https://www.bibidd.com/bibidd_testtest/A.jpg') {
- videoHtml += `
- <div id="videoContent${showVideoNum - 12 + index}" class="videoContent">
- <div class="lazy videoPhoto" data-original="${data.top_img}">
- <div class="videoTime">${videoTime(data.time_chuo)}</div>
- </div>
- <div class="videoTitle">${data.title}</div>
- </div>`;
- }
- }
- });
- $(".video").html(videoHtml);
- $(".headBanner .banner .bannerImg").attr("data-original", bannerArr[0].img);
- $(".video .banner .bannerImg").attr("data-original", bannerArr[1].img);
- var loadingUrl = "/Public/bibidd/images/loading.png";
- $(".lazy").lazyload({
- effect: "show",
- placeholder: loadingUrl,
- failurelimit: 10,
- skip_invisible: false,
- });
-
- $(".videoContent").on("click", function () {
- let thisId = $(this).attr("id");
- let thisIdLength = $(this).attr("id").length;
- let thisIndex = Number(thisId.substring(12, thisIdLength));
-
- let labelname = theRequest.labelname || '';
- let type = theRequest.type || '';
- let name = theRequest.name || 'Asia';
-
- $(location).attr(
- "href",
- "videodetails.html?videoid=" +
- allDataArray[thisIndex].id +
- "&fabulous=" +
- allDataArray[thisIndex].thumbs_up +
- "&favorite=" +
- allDataArray[thisIndex].favorite +
- "&videoname=" +
- allDataArray[thisIndex].title +
- "&labelname=" +
- labelname +
- "&type=" +
- type +
- "&videotype=" +
- videotype +
- "&name=" +
- name
- );
- });
- // 广告详情
- $(".banner").on("click", function () {
- let bannerParent = $(this).parent().attr("class");
- if (bannerParent == "headBanner") {
- window.location.href = bannerArr[0].jump_link;
- } else {
- window.location.href = allDataArray[$(this).index()].jump_link;
- }
- });
- }
- function clearScroll() {
- showVideoNum = 12;
- ispage = false;
- scrollT = 0;
- offsetT = 0;
- $(".bottomLoadContent").show();
- $(".box").hide();
- }
- // 收起筛选列表
- $(".filterAddLabel").on("click", function () {
- if (isOpen) {
- // 收起
- $(".filterAddLabelImg").attr("src", "/Public/bibidd/images/shang.png");
- $(".filterLabelListContent").hide();
- } else {
- // 展开
- $(".filterAddLabelImg").attr("src", "/Public/bibidd/images/xia.png");
- $(".filterLabelListContent").show();
- }
- isOpen = !isOpen;
- });
- // 关闭筛选界面
- $(".cancelFilter").on("click", function () {
- isFilteringModules = false;
- $(".FilteringModules").hide();
- starFilterIsShow = false;
- $(".filterTimeContent").html("");
- $(".filterSwitch").hide();
- });
- // 选择筛选分类
- $(".screenHeaderContentLi").on("click", function () {
- if ($(this).index() == 0) {
- isFilteringModules = !isFilteringModules;
- if (isFilteringModules) {
- $(".FilteringModules").show();
- $(".filterTimeContent").html(`<input id="range_44" />`);
- var $range = $("#range_44");
- var track = function (data) {
- if (data.from != 0 || data.to != 40) {
- starFilterIsShow = true;
- }
- filterStarTime = filterTime(data.from);
- filterEndTime = filterTime(data.to);
- if (starFilterIsShow) {
- $(".filterSwitch").show();
- }
- };
- $range.ionRangeSlider({
- type: "double",
- min: 0,
- max: 40,
- from: 0,
- to: 40,
- step: 10,
- grid: true,
- onStart: track,
- onChange: track,
- onFinish: track,
- onUpdate: track,
- });
- } else {
- $(".FilteringModules").hide();
- starFilterIsShow = false;
- $(".filterTimeContent").html("");
- $(".filterSwitch").hide();
- }
- } else {
- filterType = filterTypeArray[$(this).index() - 1];
- $(".titleHead").text(`${$(this).text()}`);
- $(this).addClass(" isscreenHeaderContentLi");
- $(this).siblings().removeClass(" isscreenHeaderContentLi");
- $(".FilteringModules").hide();
- starFilterIsShow = false;
- $(".filterTimeContent").html("");
- $(".filterSwitch").hide();
- $("#tip").hide();
- clearScroll();
- $(".bottomLoadContent").show();
- getFilterData(1);
- }
- });
- // 清空筛选项
- $(".filterClear").on("click", function () {
- $(".FilterLabelGroupContent").html("");
- isSelectLabel = true;
- filterLabel = "";
- $(".filterLabelAdd").show();
- $(".filterLabelList").css("background-color", "#1C1A1B");
- getLabelListData();
- filterLabel = "";
- filterType = "zuixin";
- filterStarTime = 0;
- filterEndTime = 99999999;
- $(".filterTimeContent").html(`<input id="range_44" />`);
- var $range = $("#range_44");
- var track = function (data) {
- filterStarTime = filterTime(data.from);
- filterEndTime = filterTime(data.to);
- };
- $range.ionRangeSlider({
- type: "double",
- min: 0,
- max: 40,
- from: 0,
- to: 40,
- step: 10,
- grid: true,
- onStart: track,
- onChange: track,
- onFinish: track,
- onUpdate: track,
- });
- getData(1);
- $(".screenHeaderContentLi").removeClass(" isscreenHeaderContentLi");
- $(".filterLabelGroupText").removeClass(" isscreenHeaderContentLi");
- });
- // 确定筛选
- $(".starFilter").on("click", function () {
- isFilteringModules = false;
- $(".FilteringModules").hide();
- starFilterIsShow = false;
- $(".filterTimeContent").html("");
- $(".filterSwitch").hide();
- $("#tip").hide();
- clearScroll();
- $(".bottomLoadContent").show();
- getFilterData(1);
- });
- // 获取筛选数据
- function getFilterData(FilterDataVideopage) {
- languageParameter = localStorage.getItem("language") || "CN";
- $.ajax({
- type: "post",
- url: "https://www.bibidd.com/bibidd/Mediasix/video_shaixuan",
- dataType: "json",
- data: {
- LNG: languageParameter,
- jiben_type: filterType,
- time_kaishi: filterStarTime,
- time_jeishu: filterEndTime,
- leixing_shaixuan: filterLabel,
- page: FilterDataVideopage,
- },
- success: function (res) {
- allDataArray = res.data;
- if (allDataArray.length == 0) {
- $("#tip").show();
- if (languageParameter == "CN") {
- tip("暫無數據");
- } else {
- tip("The data you need is not found.");
- }
- $(".bottomLoadContent").hide();
- $(".box").hide();
- } else {
- $("#tip").hide();
- }
- dataArray = [];
- if (allDataArray.length > 0) {
- // let showDataNum =
- // allDataArray.length % 12 === 0 ? 12 : allDataArray.length % 12;
- let showDataNum = allDataArray.length >= 12 ? 12 : allDataArray.length;
- for (let i = 0; i < showDataNum; i++) {
- dataArray.push(allDataArray[i]);
- }
- }
- },
- complete: function (res) {
- $(".bottomLoadContent").hide();
- ispage = true;
- // 分页
- let dataNum = res.responseJSON.all_num;
- $(function () {
- $("#pagination3").pagination({
- currentPage: currentPage,
- totalPage: Math.ceil(dataNum / 60),
- isShow: true,
- count: 7,
- homePageText: homePageText,
- endPageText: endPageText,
- prevPageText: prevPageText,
- nextPageText: nextPageText,
- callback: function (current) {
- $(location).attr(
- "href",
- "index.html?type=filter" +
- "&name=" +
- filterType +
- "&page=" +
- current +
- "&filterType=" +
- filterType +
- "&filterStarTime=" +
- filterStarTime +
- "&filterEndTime=" +
- filterEndTime +
- "&filterLabel=" +
- filterLabel
- );
- },
- });
- Math.ceil(dataNum / 60) < 2
- ? $(".firstPage").show()
- : $(".firstPage").hide();
- });
- getBannerData();
- $("html, body").animate(
- {
- scrollTop: 0,
- },
- 50
- );
- },
- });
- }
- function filterTime(time) {
- let timer = 0;
- if (time == 0) {
- timer = 0;
- } else if (time > 0 && time < 15) {
- timer = 600;
- } else if (time >= 15 && time < 25) {
- timer = 1200;
- } else if (time >= 25 && time < 35) {
- timer = 1800;
- } else {
- timer = 99999999;
- }
- return timer;
- }
- function videoTime(time) {
- let timeStr = "";
- let h =
- Math.floor(time / 60 / 60) < 10
- ? "0" + Math.floor(time / 60 / 60)
- : Math.floor(time / 60 / 60);
- let m =
- Math.floor(Math.floor(time / 60) % 60) < 10
- ? "0" + Math.floor(Math.floor(time / 60) % 60)
- : Math.floor(Math.floor(time / 60) % 60);
- let s =
- Math.floor(time % 60) < 10
- ? "0" + Math.floor(time % 60)
- : Math.floor(time % 60);
- timeStr = h + ":" + m + ":" + s;
- return timeStr;
- }
- // 获取筛选标签
- function getLabelListData() {
- languageParameter = localStorage.getItem("language") || "CN";
- $.ajax({
- type: "post",
- url: "https://www.bibidd.com/bibidd/Mediasix/shaixuan_type_list",
- dataType: "json",
- data: {
- LNG: languageParameter,
- },
- success: function (res) {
- let labelListDataArray = res.data;
- let labelListHtml = "";
- $.each(labelListDataArray, function (index, data) {
- labelListHtml += '<li class="filterLabelList">';
- labelListHtml += ' <p class="filterLabelText">' + data.name + "</p>";
- labelListHtml +=
- ' <img class="filterLabelAdd" src="/Public/bibidd/images/add.png" alt="">';
- labelListHtml += "</li>";
- });
- $(".filterLabelListContent").html(labelListHtml);
- },
- complete: function (res) {
- let labelListDataArray = res.responseJSON.data;
- // 添加筛选标签
- $(".filterLabelList").on("click", function () {
- if (isSelectLabel) {
- $(".filterLabelList").css("background-color", "#222");
- filterLabel = labelListDataArray[$(this).index()].name;
- $(this).hide();
- $(".filterLabelAdd").hide();
- var filterLabelGroupTextHtmlList = "";
- filterLabelGroupTextHtmlList +=
- '<li class="filterLabelGroupText">' +
- labelListDataArray[$(this).index()].name +
- "</li>";
- $(".FilterLabelGroupContent").append(filterLabelGroupTextHtmlList);
- $(".filterSwitch").show();
- $(".filterLabelGroupText").on("click", function () {
- $(".FilterLabelGroupContent").html("");
- isSelectLabel = true;
- filterLabel = "";
- $(".filterLabelAdd").show();
- $(".filterLabelList").css("background-color", "#1C1A1B");
- getLabelListData();
- });
- isSelectLabel = false;
- }
- });
- },
- });
- }
- getLabelListData();
- $(".language").on("click", function () {
- if (languageIsLong) {
- $(".language img").attr("src", "/Public/bibidd/images/shang.png");
- $(".languageWrap").css('height','50px');
- } else {
- $(".language img").attr("src", "/Public/bibidd/images/xia.png");
- $(".languageWrap").css('height','150px');
- window.scrollTo(0, 99999999999);
-
- }
- languageIsLong = !languageIsLong;
- });
- // 页面底部切换语言
- $(".languageText").on("click", function () {
- switchLanguage($(this).attr("id"));
- });
- // 切换语言
- function switchLanguage(id) {
- languageIsLong = !languageIsLong;
- $(".language img").attr("src", "/Public/bibidd/images/shang.png");
- $(".languageWrap").css('height','50px');
- if (id == "CN" || id == "chinese") {
- // 切换中文
- localStorage.setItem("language", "CN");
- $("#chinese").addClass(" isSelectLanguage");
- $("#chinese").siblings().removeClass(" isSelectLanguage");
- } else {
- // 切换英文
- localStorage.setItem("language", "EN");
- $("#english").addClass(" isSelectLanguage");
- $("#english").siblings().removeClass(" isSelectLanguage");
- }
- LanguageSwitching();
- }
- function LanguageSwitching() {
- var languageParameter = localStorage.getItem("language") || "CN";
- let navtextArr = [];
- let asiatextArr = [];
- let screentextArr = [];
- if (languageParameter == "CN") {
- // 切换中文语言
- navtextArr = ["推薦", "亞洲", "動畫", "分類"];
- asiatextArr = ["日本AV", "日韓", "香港", "臺灣", "大陸資源"];
- screentextArr = ["", "最新", "最熱", "最多人觀看", "最長時間"];
- if ($(".ui-pagination-container").find("a").eq(0).text() == "1") {
- $(".ui-pagination-container")
- .find("a")
- .eq($(".ui-pagination-container").length - 3)
- .text("下一頁");
- $(".ui-pagination-container")
- .find("a")
- .eq($(".ui-pagination-container").length - 2)
- .text("尾頁");
- } else {
- $(".ui-pagination-container").find("a").eq(0).text("首頁");
- $(".ui-pagination-container").find("a").eq(1).text("上一頁");
- $(".ui-pagination-container")
- .find("a")
- .eq($(".ui-pagination-container").length - 3)
- .text("下一頁");
- $(".ui-pagination-container")
- .find("a")
- .eq($(".ui-pagination-container").length - 2)
- .text("尾頁");
- }
- let titleHeadTxt = $(".titleHead").text();
- switch (titleHeadTxt) {
- case "Recommend":
- titleHeadTxt = "推薦";
- break;
- case "Asia":
- titleHeadTxt = "亞洲";
- break;
- case "Animation":
- titleHeadTxt = "動畫";
- break;
- }
- $(".titleHead").text(titleHeadTxt);
- $(".filterClearText").text("重置所有過濾條件");
- $("#filterLabelTextTime").text("時長");
- $("#filterLabelTextLabel").text("標籤");
- $(".filterAddLabel").find("p").eq(0).text("添加標籤");
- $(".quanWrap").text("加載中……");
- $(".cancelFilter").text("取消");
- $(".starFilter").text("開始篩選");
- $(".language").find("p").eq(0).text("語言");
- $(".footerTitle").text("世界上最大的色情網站");
- $(".footerText").text(
- "9169團隊每天都在更新和添加更多的色情視頻。 我們提供流媒體色情視頻、XXX相册和網絡上排名第一的免費性愛社區。 我們一直在努力新增更多的功能,讓你對色情的熱愛一直保持下去。"
- );
- $('.ageTipPageTitle').text('年齡證明');
- $('.ageTipPageText').text('你超過18歲了嗎');
- $('#ageTipPageTip1').text('警告 裡面有成人內容。如果您未滿18歲, 請勿進入!');
- $('#ageTipPageTip2').text('盜版是非法的,請不要觸犯法律!!');
- $('.confirmBtn').text('18歲以上');
- $('#addressTitle').text('1、很榮幸您能訪問我們網站!');
- $('#addressTitleb').text('我們目前免費提供多種類目的資源瀏覽服務,截圖保存我們的地址,永遠不迷路');
- $('#address1').find('span').eq(0).text('>>> 網址: ');
- $('#addressTitlec').text('2、當前地址不排除被屏蔽的可能, 請收藏下方備用網址。');
- $('#address2').find('span').eq(0).text('>>> 備用網址01: ');
- $('#address3').find('span').eq(0).text('>>> 備用網址02: ');
- $('#h1txt').text('請務必截圖保存');
- $('#iSee').text('我記住了');
- $(".currentTab").text("視頻");
- $("#register").find("p").eq(0).text("註冊");
- $("#login").find("p").eq(0).text("登錄");
- $(".myCollectionTxt").text("我的收藏");
- $(".mineLanguage").find("p").eq(0).text("語言切換");
- $(".loginOut").text("退出登錄");
- } else {
- // 切换英文语言
- if ($(".ui-pagination-container").find("a").eq(0).text() == "1") {
- $(".ui-pagination-container")
- .find("a")
- .eq($(".ui-pagination-container").length - 3)
- .text("Next");
- $(".ui-pagination-container")
- .find("a")
- .eq($(".ui-pagination-container").length - 2)
- .text("Last");
- } else {
- $(".ui-pagination-container").find("a").eq(0).text("One");
- $(".ui-pagination-container").find("a").eq(1).text("Prev");
- $(".ui-pagination-container")
- .find("a")
- .eq($(".ui-pagination-container").length - 3)
- .text("Next");
- $(".ui-pagination-container")
- .find("a")
- .eq($(".ui-pagination-container").length - 2)
- .text("Last");
- }
- navtextArr = ["Recommend", "Asia", "Animation", "Classify"];
- asiatextArr = [
- "Japan AV",
- "Japan and South Korea",
- "Hong Kong",
- "Taiwan",
- "Mainland",
- ];
- screentextArr = ["", "Newest", "Hottest", "Like most", "Longest"];
- let titleHeadTxt = $(".titleHead").text();
- switch (titleHeadTxt) {
- case "推薦":
- titleHeadTxt = "Recommend";
- break;
- case "亞洲":
- titleHeadTxt = "Asia";
- break;
- case "動畫":
- titleHeadTxt = "Animation";
- break;
- case "最新":
- titleHeadTxt = "Newest";
- break;
- }
- $(".titleHead").text(titleHeadTxt);
- $(".filterClearText").text("Reset all filtered conditions");
- $("#filterLabelTextTime").text("Time");
- $("#filterLabelTextLabel").text("Label");
- $(".filterAddLabel").find("p").eq(0).text("Add Label");
- $(".quanWrap").text("Loading……");
- $(".cancelFilter").text("Cancel");
- $(".starFilter").text("Start filtering");
- $(".footerTitle").text("The world's largest pornographic website");
- $(".footerText").text(
- "The 9169 team is always updating and adding more porn videos every day.We offer streaming porn videos, XXX photo albums, and the number 1 free sex community on the net. We’re always working towards adding more features that will keep your love for porno alive and well."
- );
- $('.ageTipPageTitle').text('proof of age');
- $('.ageTipPageText').text('are you over 18');
- $('#ageTipPageTip1').text('Warning Contains adult content. If you are under 18, please do not enter!');
- $('#ageTipPageTip2').text("Piracy is illegal, please don't break the law! !");
- $('.confirmBtn').text('over 18 years old');
- $('#addressTitle').text('1. It is an honor for you to visit our website!');
- $('#addressTitleb').text('We currently provide a variety of resource browsing services for free, take screenshots to save our address, and never get lost');
- $('#address1').find('span').eq(0).text('>>> URL:');
- $('#addressTitlec').text('2. The current address does not rule out the possibility of being blocked, please bookmark the alternate URL below.');
- $('#address2').find('span').eq(0).text('>>> Alternate URL 01: ');
- $('#address3').find('span').eq(0).text('>>> Alternate URL 02: ');
- $('#h1txt').text('Be sure to save the screenshot');
- $('#iSee').text('I remember');
- $(".currentTab").text("Video");
- $(".language").find("p").eq(0).text("Language");
- $("#register").find("p").eq(0).text("Sign Up");
- $("#login").find("p").eq(0).text("Sign In");
- $(".myCollectionTxt").text("My collection");
- $(".mineLanguage").find("p").eq(0).text("Language");
- $(".loginOut").text("sign out");
- }
- if (typeBtnIsSelect) {
- getlabelData(currentPage);
- }
- if(isFilteringModules){
- getLabelListData();
- }
- // 顶部导航文字
- $.each($(".navText"), function (index) {
- $(this).text(navtextArr[index]);
- });
- // 亚洲筛选
- $.each($(".asiaScreenContentUlLi"), function (index) {
- $(this).find("p").eq(0).text(asiatextArr[index]);
- });
- // 条件筛选
- $.each($(".screenHeaderContentLi"), function (index) {
- if (index > 0) {
- $(this).text(screentextArr[index]);
- }
- });
- }
- $(".mine").on("click", function (e) {
- e.preventDefault();
- $(this).animate(
- {
- width: 0,
- },
- 100
- );
- });
- // 前往我的收藏
- $(".myCollection").on("click", function () {
- console.log(theRequest.labelname);
- let labelname = theRequest.labelname || '';
- let type = theRequest.type || '';
- let name = theRequest.name || 'Asia';
- console.log(labelname);
- $(location).attr(
- "href",
- "collection.html?labelname=" +
- labelname +
- "&type=" +
- type +
- "&videotype=" +
- videotype +
- "&name=" +
- name
- );
- });
- // 前往註冊
- $("#login").on("click", function () {
- $(location).attr("href", "blogin.html");
- });
- // 前往登录
- $("#register").on("click", function () {
- $(location).attr("href", "register.html");
- });
- // 退出登录
- $(".loginOut").on("click", function () {
- localStorage.removeItem("uid");
- location.reload();
- });
- // 个人中心切换语言
- $(".languageType div").on("click", function () {
- $(this).addClass(" isSelectLanguage");
- $(this).siblings().removeClass(" isSelectLanguage");
- switchLanguage($(this).attr("id"));
- languageIsLong = false;
- });
- $(".iSee").on("click", function () {
- $(".addressBox").fadeOut(500);
- $.cookie("the_cookie", encodeURI("the_value"), { expires: 1, path: "../index.html" });
- });
-
- $(".addressBoxClose").on("click", function () {
- $(".addressBox").fadeOut(500);
- $.cookie("the_cookie", encodeURI("the_value"), { expires: 1, path: "../index.html" });
- });
- // 获取弹窗链接
- $(
- (function () {
- $.ajax({
- type: "post",
- url: "https://www.bibidd.com/bibidd/Mediasix/shouye_lianjei",
- dataType: "json",
- data: {},
- success: function (res) {
- let data = res.data;
- $("#address1").find('span').eq(1).text(data[0].url);
- $("#address2").find('span').eq(1).text(data[1].url);
- $("#address3").find('span').eq(1).text(data[2].url);
- },
- });
- })()
- );
- function getBannerData() {
- $.ajax({
- type: "post",
- url: "https://www.bibidd.com/bibidd/Mediasix/Return_to_ads",
- dataType: "json",
- data: {
- adv_type: "list_detail",
- },
- success: function (res) {
- bannerArr = res.data;
- },
- complete: function (res) {
- createDomHtml(dataArray);
- },
- });
- }
- });
|