index.js 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473
  1. $(document).ready(function () {
  2. let back = localStorage.getItem('back');
  3. if(back) {
  4. location.reload(true);
  5. localStorage.removeItem('back');
  6. }
  7. var languageParameter = localStorage.getItem("language") || "CN";
  8. var uid = localStorage.getItem("uid") || 0;
  9. var url = window.location.search;
  10. var theRequest = new Object();
  11. if (url.indexOf("?") != -1) {
  12. var str = url.substr(1);
  13. strs = str.split("&");
  14. for (var i = 0; i < strs.length; i++) {
  15. theRequest[strs[i].split("=")[0]] = unescape(
  16. decodeURIComponent(strs[i].split("=")[1])
  17. );
  18. }
  19. }
  20. var filterStarTime = 0;
  21. var filterEndTime = 99999999;
  22. var filterLabel = "";
  23. var filterType = "tuijian";
  24. var labelname = "";
  25. var dataArray = [];
  26. var allDataArray = [];
  27. var videotype = "Asian";
  28. var currentPage = theRequest.page ? Number(theRequest.page) : 1;
  29. var homePageText = "";
  30. var endPageText = "";
  31. var prevPageText = "";
  32. var nextPageText = "";
  33. var showVideoNum = 12;
  34. var ispage = true;
  35. var isOpen = false;
  36. var filterTypeArray = ["zuixin", "remen", "dianzan", "shichang"];
  37. var isFilteringModules = false;
  38. var starFilterIsShow = false;
  39. var isSelectLabel = true;
  40. var languageIsLong = false;
  41. var bannerArr = new Array();
  42. if (languageParameter == "CN") {
  43. homePageText = "首頁";
  44. endPageText = "尾頁";
  45. prevPageText = "上一頁";
  46. nextPageText = "下一頁";
  47. $("#chinese").addClass(" isSelectLanguage");
  48. $("#chinese").siblings().removeClass(" isSelectLanguage");
  49. } else {
  50. homePageText = "One";
  51. endPageText = "Prev";
  52. prevPageText = "Next";
  53. nextPageText = "Last";
  54. $("#english").addClass(" isSelectLanguage");
  55. $("#english").siblings().removeClass(" isSelectLanguage");
  56. }
  57. // let logo = localStorage.getItem('logo');
  58. // console.log(logo);
  59. // if(logo) {
  60. // $(".ageTipPage").hide();
  61. // localStorage.removeItem('logo');
  62. // }else{
  63. // $(".ageTipPage").show();
  64. // }
  65. if(sessionStorage.getItem('isReload')) {
  66. // 页面被刷新
  67. }else {
  68. // 第一次被刷新
  69. $(".ageTipPage").show();
  70. sessionStorage.setItem('isReload', true);
  71. }
  72. $('.addressImg').on('click', function() {
  73. $(".addressBox").show();
  74. })
  75. $(".confirmBtn").on("click", function () {
  76. $(".ageTipPage").hide();
  77. $(".addressBox").show();
  78. });
  79. $(".logo").on("click", function () {
  80. localStorage.setItem('logo', true);
  81. $(location).attr("href", "index.html?logo=true");
  82. });
  83. if (uid) {
  84. let uname = localStorage.getItem("username");
  85. $(".userContent").show();
  86. $(".userName").text(uname);
  87. $(".myCollection").show();
  88. $(".loginOut").show();
  89. $(".userLogin").hide();
  90. } else {
  91. $(".userContent").hide();
  92. $(".myCollection").hide();
  93. $(".loginOut").hide();
  94. $(".userBtn").show();
  95. }
  96. // 判断中英文
  97. LanguageSwitching();
  98. // 获取标签数据
  99. function getlabelData(videopage) {
  100. let languageParameter = localStorage.getItem("language") || "CN";
  101. $("#tip").hide();
  102. $.ajax({
  103. type: "post",
  104. url: "https://www.bibidd.com/bibidd/Mediasix/shouye_resou_img_video",
  105. dataType: "json",
  106. data: {
  107. type: "video",
  108. page: videopage,
  109. LNG: languageParameter,
  110. },
  111. success: function (res) {
  112. let labelDataArray = res.data;
  113. let labelHtml = "";
  114. labelHtml += '<div class="hotLabel">';
  115. $.each(labelDataArray, function (index, data) {
  116. labelHtml += '<div class="label">';
  117. labelHtml += `<p >${languageParameter == "CN" ? data.china_name : data.name
  118. }</p>`;
  119. labelHtml += "<p >" + data.num + "</p>";
  120. labelHtml += "</div>";
  121. });
  122. labelHtml += "</div>";
  123. $(".labelpage").html(labelHtml);
  124. },
  125. complete: function (res) {
  126. // 分页
  127. $(".bottomLoadContent").hide();
  128. let dataNum = res.responseJSON.all_num;
  129. $(function () {
  130. $("#pagination3").pagination({
  131. currentPage: currentPage,
  132. totalPage: Math.ceil(dataNum / 30),
  133. isShow: true,
  134. count: 7,
  135. homePageText: homePageText,
  136. endPageText: endPageText,
  137. prevPageText: prevPageText,
  138. nextPageText: nextPageText,
  139. callback: function (current) {
  140. $(location).attr(
  141. "href",
  142. "index.html?type=label" + "&page=" + current
  143. );
  144. },
  145. });
  146. Math.ceil(dataNum / 30) < 2
  147. ? $(".firstPage").show()
  148. : $(".firstPage").hide();
  149. });
  150. // 标签检索视频
  151. $(".label").on("click", function () {
  152. let nn = $(this).find("p").eq(0).text();
  153. $(location).attr("href", "index.html?labelname=" + nn);
  154. });
  155. },
  156. });
  157. }
  158. // 获取视频数据
  159. function getData(videopage) {
  160. $("#tip").hide();
  161. clearScroll();
  162. $(".bottomLoadContent").show();
  163. $.ajax({
  164. type: "post",
  165. url: "https://www.bibidd.com/bibidd/Mediasix/video_info_list",
  166. dataType: "json",
  167. data: {
  168. uid,
  169. type: videotype,
  170. page: videopage,
  171. },
  172. success: function (res) {
  173. allDataArray = res.data;
  174. dataArray = [];
  175. if (allDataArray.length > 0) {
  176. // let showDataNum =
  177. // allDataArray.length % 12 === 0 ? 12 : allDataArray.length % 12;
  178. let showDataNum = allDataArray.length >= 12 ? 12 : allDataArray.length;
  179. for (let i = 0; i < showDataNum; i++) {
  180. dataArray.push(allDataArray[i]);
  181. }
  182. }
  183. },
  184. complete: function (res) {
  185. ispage = true;
  186. // 分页
  187. let dataNum = res.responseJSON.all_num;
  188. $(function () {
  189. $("#pagination3").pagination({
  190. currentPage: currentPage,
  191. totalPage: Math.ceil(dataNum / 60),
  192. isShow: true,
  193. count: 7,
  194. homePageText: homePageText,
  195. endPageText: endPageText,
  196. prevPageText: prevPageText,
  197. nextPageText: nextPageText,
  198. callback: function (current) {
  199. $(location).attr(
  200. "href",
  201. "index.html?type=video" +
  202. "&name=" +
  203. videotype +
  204. "&page=" +
  205. current
  206. );
  207. },
  208. });
  209. Math.ceil(dataNum / 60) < 2
  210. ? $(".firstPage").show()
  211. : $(".firstPage").hide();
  212. });
  213. getBannerData();
  214. $("html, body").animate(
  215. {
  216. scrollTop: 0,
  217. },
  218. 50
  219. );
  220. },
  221. });
  222. }
  223. if (!$(".titleHead").text()) {
  224. $(".titleHead").text("Aisa");
  225. }
  226. if (theRequest.labelname) {
  227. console.log(1);
  228. console.log(theRequest);
  229. labelname = theRequest.labelname;
  230. $(".titleHead").text(theRequest.labelname);
  231. getLabelVideoData(1);
  232. } else if (theRequest.type) {
  233. if (theRequest.type === "video") {
  234. // 获取首页视频
  235. videotype = theRequest.name;
  236. $("#newest").show();
  237. $("#hot").show();
  238. let titleNum = 0;
  239. if (theRequest.name == "tuijian") {
  240. titleNum = 0;
  241. $(".titleHead").text("Recommend");
  242. } else if (theRequest.name === "Asian") {
  243. titleNum = 1;
  244. $(".titleHead").text("Asia");
  245. } else if (theRequest.name === "Anime") {
  246. titleNum = 2;
  247. $(".titleHead").text("Animation");
  248. }
  249. getData(currentPage);
  250. let titleArr = [];
  251. if (languageParameter == "CN") {
  252. titleArr = ["推薦", "亞洲", "動畫"];
  253. } else {
  254. titleArr = ["Recommend", "Asia", "Animation"];
  255. }
  256. $(".titleHead").text(titleArr[titleNum]);
  257. } else if (theRequest.type === "labelvideo") {
  258. // 获取标签视频
  259. labelname = theRequest.name;
  260. getLabelVideoData(currentPage);
  261. } else if (theRequest.type === "search") {
  262. // 获取搜索栏视频
  263. var searchInputVal = theRequest.name;
  264. searchVideo(currentPage);
  265. $(".titleHead").text(searchInputVal);
  266. } else if (theRequest.type === "filter") {
  267. // 获取筛选视频
  268. filterType = theRequest.filterType;
  269. filterStarTime = theRequest.filterStarTime;
  270. filterEndTime = theRequest.filterEndTime;
  271. filterLabel = theRequest.filterLabel;
  272. getFilterData(currentPage);
  273. // 筛选视频
  274. } else if (theRequest.type === "label") {
  275. // 标签展示
  276. $(".videopage").hide();
  277. $(".labelpage").show();
  278. $(".box").show();
  279. getlabelData(currentPage);
  280. }
  281. } else {
  282. console.log(33);
  283. if (languageParameter == "CN") {
  284. $(".titleHead").text("亞洲");
  285. } else {
  286. $(".titleHead").text("Asia");
  287. }
  288. // 进入首页
  289. videotype = "Asian";
  290. getData(1);
  291. }
  292. var typeBtnIsSelect = false;
  293. // 热门tag分类
  294. $(".nav li").on("click", function () {
  295. typeBtnIsSelect = false;
  296. clearScroll();
  297. $(".bottomLoadContent").show();
  298. const pname = $(this).find("p").eq(0).text();
  299. const arr = ["tuijian", "Asian", "Anime", ""];
  300. $(".titleHead").text(pname);
  301. if (
  302. $(this).index() === 0 ||
  303. $(this).index() === 1 ||
  304. $(this).index() === 2
  305. ) {
  306. $(".videopage").show();
  307. $(".labelpage").hide();
  308. loadVideoBackground();
  309. videotype = arr[$(this).index()];
  310. $(location).attr(
  311. "href",
  312. "index.html?type=video" + "&name=" + videotype + "&page=" + 1
  313. );
  314. } else {
  315. getlabelData(1);
  316. $(".videopage").hide();
  317. $(".labelpage").show();
  318. $(".box").show();
  319. typeBtnIsSelect = true;
  320. }
  321. });
  322. // 註冊/登录
  323. $(".userImg").on("click", function () {
  324. $(".mine").animate(
  325. {
  326. width: "100%",
  327. },
  328. 100
  329. );
  330. });
  331. // 进入搜索视频页面
  332. $(".searchImg").on("click", function () {
  333. $(location).attr("href", "search.html");
  334. });
  335. // 返回顶部
  336. $(".backToTop").on("click", function () {
  337. $("html, body").animate(
  338. {
  339. scrollTop: 0,
  340. },
  341. 500
  342. );
  343. });
  344. // 获取标签视频
  345. function getLabelVideoData(lpage) {
  346. let languageParameter = localStorage.getItem("language") || "CN";
  347. clearScroll();
  348. $(".bottomLoadContent").show();
  349. $.ajax({
  350. type: "post",
  351. url: "https://www.bibidd.com/bibidd/Mediasix/select_type_detail",
  352. dataType: "json",
  353. data: {
  354. LNG: languageParameter,
  355. type_name: labelname,
  356. type: "video",
  357. page: lpage,
  358. },
  359. success: function (res) {
  360. allDataArray = res.data;
  361. if (allDataArray.length == 0) {
  362. $("#tip").show();
  363. if (languageParameter == "CN") {
  364. tip("暫無數據");
  365. } else {
  366. tip("The data you need is not found.");
  367. }
  368. $(".bottomLoadContent").hide();
  369. $(".box").hide();
  370. } else {
  371. $("#tip").hide();
  372. }
  373. dataArray = [];
  374. if (allDataArray.length > 0) {
  375. // let showDataNum =
  376. // allDataArray.length % 12 === 0 ? 12 : allDataArray.length % 12;
  377. let showDataNum = allDataArray.length >= 12 ? 12 : allDataArray.length;
  378. for (let i = 0; i < showDataNum; i++) {
  379. dataArray.push(allDataArray[i]);
  380. }
  381. }
  382. },
  383. complete: function (res) {
  384. $(".bottomLoadContent").hide();
  385. ispage = true;
  386. $("html, body").animate(
  387. {
  388. scrollTop: 0,
  389. },
  390. 50
  391. );
  392. // 分页
  393. let dataNum = res.responseJSON.all_num;
  394. $(function () {
  395. $("#pagination3").pagination({
  396. currentPage: currentPage,
  397. totalPage: Math.ceil(dataNum / 60),
  398. isShow: true,
  399. count: 7,
  400. homePageText: homePageText,
  401. endPageText: endPageText,
  402. prevPageText: prevPageText,
  403. nextPageText: nextPageText,
  404. callback: function (current) {
  405. $(location).attr(
  406. "href",
  407. "index.html?type=labelvideo" +
  408. "&name=" +
  409. labelname +
  410. "&page=" +
  411. current
  412. );
  413. },
  414. });
  415. Math.ceil(dataNum / 60) < 2
  416. ? $(".firstPage").show()
  417. : $(".firstPage").hide();
  418. });
  419. getBannerData();
  420. },
  421. });
  422. }
  423. // 视频加载背景
  424. function loadVideoBackground() { }
  425. // 视频搜索
  426. function searchVideo(videopage) {
  427. clearScroll();
  428. $(".bottomLoadContent").show();
  429. $.ajax({
  430. type: "post",
  431. url: "https://www.bibidd.com/bibidd/Mediasix/sousuo_img_video",
  432. dataType: "json",
  433. data: {
  434. type_name: searchInputVal,
  435. type: "video",
  436. page: videopage,
  437. },
  438. success: function (res) {
  439. console.log(res)
  440. allDataArray = res.data;
  441. if (allDataArray.length == 0) {
  442. $("#tip").show();
  443. if (languageParameter == "CN") {
  444. tip('暫無數據');
  445. } else {
  446. tip('The data you need is not found.');
  447. }
  448. $(".bottomLoadContent").hide();
  449. $(".box").hide();
  450. } else {
  451. $("#tip").hide();
  452. }
  453. dataArray = [];
  454. if (allDataArray.length > 0) {
  455. // let showDataNum =
  456. // allDataArray.length % 12 === 0 ? 12 : allDataArray.length % 12;
  457. let showDataNum = allDataArray.length >= 12 ? 12 : allDataArray.length;
  458. for (let i = 0; i < showDataNum; i++) {
  459. dataArray.push(allDataArray[i]);
  460. }
  461. }
  462. },
  463. complete: function (res) {
  464. ispage = true;
  465. // 分页
  466. let dataNum = res.responseJSON.all_num;
  467. $(function () {
  468. $("#pagination3").pagination({
  469. currentPage: currentPage,
  470. totalPage: Math.ceil(dataNum / 60),
  471. isShow: true,
  472. count: 7,
  473. homePageText: homePageText,
  474. endPageText: endPageText,
  475. prevPageText: prevPageText,
  476. nextPageText: nextPageText,
  477. callback: function (current) {
  478. $(location).attr(
  479. "href",
  480. "index.html?type=search" +
  481. "&name=" +
  482. searchInputVal +
  483. "&page=" +
  484. current
  485. );
  486. },
  487. });
  488. Math.ceil(dataNum / 60) < 2
  489. ? $(".firstPage").show()
  490. : $(".firstPage").hide();
  491. });
  492. console.log(dataArray);
  493. getBannerData();
  494. $("html, body").animate(
  495. {
  496. scrollTop: 0,
  497. },
  498. 50
  499. );
  500. },
  501. });
  502. }
  503. function tip(text) {
  504. $("#tip").show();
  505. $(".tiptext").text(text);
  506. if (text != "暫無數據" && text != "The data you need is not found.") {
  507. setTimeout(() => {
  508. $("#tip").hide();
  509. }, 1000);
  510. }
  511. }
  512. // 上拉加载更多
  513. $(window).scroll(function () {
  514. var scrollT = $(document).scrollTop();
  515. var offsetT = $(".main").offset().top;
  516. if (scrollT >= offsetT) {
  517. $(".backToTop").show();
  518. } else {
  519. $(".backToTop").hide();
  520. }
  521. let windowHeight = $(window).height();
  522. let windowScrollTop = $(window).scrollTop();
  523. let loadingHeight = $(".bottomLoadContent").height();
  524. if (
  525. windowHeight + windowScrollTop + loadingHeight + 220 >=
  526. $(document).height()
  527. ) {
  528. if (ispage && allDataArray.length > 0) {
  529. ispage = false;
  530. if (showVideoNum < allDataArray.length) {
  531. $(".bottomLoadContent").show();
  532. $(".box").hide();
  533. showVideoNum += 12;
  534. showVideoNum =
  535. showVideoNum >= allDataArray.length
  536. ? allDataArray.length
  537. : showVideoNum;
  538. dataArray = [];
  539. console.log(showVideoNum);
  540. let forIndex = showVideoNum >= allDataArray.length ? allDataArray.length%12 : 12
  541. for (let i = 0; i < forIndex; i++) {
  542. dataArray.push(allDataArray[showVideoNum - forIndex + i]);
  543. }
  544. console.log(dataArray);
  545. let videoHtml = "";
  546. $.each(dataArray, function (index, data) {
  547. if (data.jump_link) {
  548. let headBannerHtml = `
  549. <div class="banner">
  550. <div class="lazy bannerImg" data-original="${data.img}"></div>
  551. </div>
  552. `;
  553. videoHtml += headBannerHtml;
  554. } else {
  555. if(data.top_img != 'https://www.bibidd.com/bibidd_testtest/A.jpg') {
  556. videoHtml += `
  557. <div id="videoContent${showVideoNum - 12 + index
  558. }" class="videoContent">
  559. <div class="lazy videoPhoto" data-original="${data.top_img}">
  560. <div class="videoTime">${videoTime(data.time_chuo)}</div>
  561. </div>
  562. <div class="videoTitle">${data.title}</div>
  563. </div>
  564. `;
  565. }
  566. }
  567. });
  568. setTimeout(() => {
  569. $(".video").append(videoHtml);
  570. $(".bottomLoadContent").hide();
  571. var loadingUrl = "/Public/bibidd/images/loading.png";
  572. $(".lazy").lazyload({
  573. effect: "show",
  574. placeholder: loadingUrl,
  575. failurelimit: 10,
  576. skip_invisible: false,
  577. });
  578. $(".videoContent").on("click", function () {
  579. let thisId = $(this).attr("id");
  580. let thisIdLength = $(this).attr("id").length;
  581. let thisIndex = Number(thisId.substring(12, thisIdLength));
  582. let labelname = theRequest.labelname || '';
  583. let type = theRequest.type || '';
  584. let name = theRequest.name || 'Asia';
  585. $(location).attr(
  586. "href",
  587. "videodetails.html?videoid=" +
  588. allDataArray[thisIndex].id +
  589. "&fabulous=" +
  590. allDataArray[thisIndex].thumbs_up +
  591. "&favorite=" +
  592. allDataArray[thisIndex].favorite +
  593. "&videoname=" +
  594. allDataArray[thisIndex].title +
  595. "&labelname=" +
  596. labelname +
  597. "&type=" +
  598. type +
  599. "&videotype=" +
  600. videotype +
  601. "&name=" +
  602. name
  603. );
  604. });
  605. ispage = true;
  606. // 广告详情
  607. $(".banner").on("click", function () {
  608. window.location.href = allDataArray[$(this).index()].jump_link;
  609. });
  610. }, 500);
  611. } else {
  612. $(".bottomLoadContent").hide();
  613. $(".box").show();
  614. ispage = true;
  615. }
  616. }
  617. }
  618. });
  619. // 创建视频dom元素
  620. function createDomHtml(dataArray) {
  621. let videoHtml = "";
  622. $.each(dataArray, function (index, data) {
  623. if (data.jump_link) {
  624. let headBannerHtml = `
  625. <div class="banner">
  626. <div class="lazy bannerImg" data-original=""></div>
  627. </div>
  628. `;
  629. $(".headBanner").html(headBannerHtml);
  630. videoHtml += headBannerHtml;
  631. } else {
  632. if(data.top_img != 'https://www.bibidd.com/bibidd_testtest/A.jpg') {
  633. videoHtml += `
  634. <div id="videoContent${showVideoNum - 12 + index}" class="videoContent">
  635. <div class="lazy videoPhoto" data-original="${data.top_img}">
  636. <div class="videoTime">${videoTime(data.time_chuo)}</div>
  637. </div>
  638. <div class="videoTitle">${data.title}</div>
  639. </div>`;
  640. }
  641. }
  642. });
  643. $(".video").html(videoHtml);
  644. $(".headBanner .banner .bannerImg").attr("data-original", bannerArr[0].img);
  645. $(".video .banner .bannerImg").attr("data-original", bannerArr[1].img);
  646. var loadingUrl = "/Public/bibidd/images/loading.png";
  647. $(".lazy").lazyload({
  648. effect: "show",
  649. placeholder: loadingUrl,
  650. failurelimit: 10,
  651. skip_invisible: false,
  652. });
  653. $(".videoContent").on("click", function () {
  654. let thisId = $(this).attr("id");
  655. let thisIdLength = $(this).attr("id").length;
  656. let thisIndex = Number(thisId.substring(12, thisIdLength));
  657. let labelname = theRequest.labelname || '';
  658. let type = theRequest.type || '';
  659. let name = theRequest.name || 'Asia';
  660. $(location).attr(
  661. "href",
  662. "videodetails.html?videoid=" +
  663. allDataArray[thisIndex].id +
  664. "&fabulous=" +
  665. allDataArray[thisIndex].thumbs_up +
  666. "&favorite=" +
  667. allDataArray[thisIndex].favorite +
  668. "&videoname=" +
  669. allDataArray[thisIndex].title +
  670. "&labelname=" +
  671. labelname +
  672. "&type=" +
  673. type +
  674. "&videotype=" +
  675. videotype +
  676. "&name=" +
  677. name
  678. );
  679. });
  680. // 广告详情
  681. $(".banner").on("click", function () {
  682. let bannerParent = $(this).parent().attr("class");
  683. if (bannerParent == "headBanner") {
  684. window.location.href = bannerArr[0].jump_link;
  685. } else {
  686. window.location.href = allDataArray[$(this).index()].jump_link;
  687. }
  688. });
  689. }
  690. function clearScroll() {
  691. showVideoNum = 12;
  692. ispage = false;
  693. scrollT = 0;
  694. offsetT = 0;
  695. $(".bottomLoadContent").show();
  696. $(".box").hide();
  697. }
  698. // 收起筛选列表
  699. $(".filterAddLabel").on("click", function () {
  700. if (isOpen) {
  701. // 收起
  702. $(".filterAddLabelImg").attr("src", "/Public/bibidd/images/shang.png");
  703. $(".filterLabelListContent").hide();
  704. } else {
  705. // 展开
  706. $(".filterAddLabelImg").attr("src", "/Public/bibidd/images/xia.png");
  707. $(".filterLabelListContent").show();
  708. }
  709. isOpen = !isOpen;
  710. });
  711. // 关闭筛选界面
  712. $(".cancelFilter").on("click", function () {
  713. isFilteringModules = false;
  714. $(".FilteringModules").hide();
  715. starFilterIsShow = false;
  716. $(".filterTimeContent").html("");
  717. $(".filterSwitch").hide();
  718. });
  719. // 选择筛选分类
  720. $(".screenHeaderContentLi").on("click", function () {
  721. if ($(this).index() == 0) {
  722. isFilteringModules = !isFilteringModules;
  723. if (isFilteringModules) {
  724. $(".FilteringModules").show();
  725. $(".filterTimeContent").html(`<input id="range_44" />`);
  726. var $range = $("#range_44");
  727. var track = function (data) {
  728. if (data.from != 0 || data.to != 40) {
  729. starFilterIsShow = true;
  730. }
  731. filterStarTime = filterTime(data.from);
  732. filterEndTime = filterTime(data.to);
  733. if (starFilterIsShow) {
  734. $(".filterSwitch").show();
  735. }
  736. };
  737. $range.ionRangeSlider({
  738. type: "double",
  739. min: 0,
  740. max: 40,
  741. from: 0,
  742. to: 40,
  743. step: 10,
  744. grid: true,
  745. onStart: track,
  746. onChange: track,
  747. onFinish: track,
  748. onUpdate: track,
  749. });
  750. } else {
  751. $(".FilteringModules").hide();
  752. starFilterIsShow = false;
  753. $(".filterTimeContent").html("");
  754. $(".filterSwitch").hide();
  755. }
  756. } else {
  757. filterType = filterTypeArray[$(this).index() - 1];
  758. $(".titleHead").text(`${$(this).text()}`);
  759. $(this).addClass(" isscreenHeaderContentLi");
  760. $(this).siblings().removeClass(" isscreenHeaderContentLi");
  761. $(".FilteringModules").hide();
  762. starFilterIsShow = false;
  763. $(".filterTimeContent").html("");
  764. $(".filterSwitch").hide();
  765. $("#tip").hide();
  766. clearScroll();
  767. $(".bottomLoadContent").show();
  768. getFilterData(1);
  769. }
  770. });
  771. // 清空筛选项
  772. $(".filterClear").on("click", function () {
  773. $(".FilterLabelGroupContent").html("");
  774. isSelectLabel = true;
  775. filterLabel = "";
  776. $(".filterLabelAdd").show();
  777. $(".filterLabelList").css("background-color", "#1C1A1B");
  778. getLabelListData();
  779. filterLabel = "";
  780. filterType = "zuixin";
  781. filterStarTime = 0;
  782. filterEndTime = 99999999;
  783. $(".filterTimeContent").html(`<input id="range_44" />`);
  784. var $range = $("#range_44");
  785. var track = function (data) {
  786. filterStarTime = filterTime(data.from);
  787. filterEndTime = filterTime(data.to);
  788. };
  789. $range.ionRangeSlider({
  790. type: "double",
  791. min: 0,
  792. max: 40,
  793. from: 0,
  794. to: 40,
  795. step: 10,
  796. grid: true,
  797. onStart: track,
  798. onChange: track,
  799. onFinish: track,
  800. onUpdate: track,
  801. });
  802. getData(1);
  803. $(".screenHeaderContentLi").removeClass(" isscreenHeaderContentLi");
  804. $(".filterLabelGroupText").removeClass(" isscreenHeaderContentLi");
  805. });
  806. // 确定筛选
  807. $(".starFilter").on("click", function () {
  808. isFilteringModules = false;
  809. $(".FilteringModules").hide();
  810. starFilterIsShow = false;
  811. $(".filterTimeContent").html("");
  812. $(".filterSwitch").hide();
  813. $("#tip").hide();
  814. clearScroll();
  815. $(".bottomLoadContent").show();
  816. getFilterData(1);
  817. });
  818. // 获取筛选数据
  819. function getFilterData(FilterDataVideopage) {
  820. languageParameter = localStorage.getItem("language") || "CN";
  821. $.ajax({
  822. type: "post",
  823. url: "https://www.bibidd.com/bibidd/Mediasix/video_shaixuan",
  824. dataType: "json",
  825. data: {
  826. LNG: languageParameter,
  827. jiben_type: filterType,
  828. time_kaishi: filterStarTime,
  829. time_jeishu: filterEndTime,
  830. leixing_shaixuan: filterLabel,
  831. page: FilterDataVideopage,
  832. },
  833. success: function (res) {
  834. allDataArray = res.data;
  835. if (allDataArray.length == 0) {
  836. $("#tip").show();
  837. if (languageParameter == "CN") {
  838. tip("暫無數據");
  839. } else {
  840. tip("The data you need is not found.");
  841. }
  842. $(".bottomLoadContent").hide();
  843. $(".box").hide();
  844. } else {
  845. $("#tip").hide();
  846. }
  847. dataArray = [];
  848. if (allDataArray.length > 0) {
  849. // let showDataNum =
  850. // allDataArray.length % 12 === 0 ? 12 : allDataArray.length % 12;
  851. let showDataNum = allDataArray.length >= 12 ? 12 : allDataArray.length;
  852. for (let i = 0; i < showDataNum; i++) {
  853. dataArray.push(allDataArray[i]);
  854. }
  855. }
  856. },
  857. complete: function (res) {
  858. $(".bottomLoadContent").hide();
  859. ispage = true;
  860. // 分页
  861. let dataNum = res.responseJSON.all_num;
  862. $(function () {
  863. $("#pagination3").pagination({
  864. currentPage: currentPage,
  865. totalPage: Math.ceil(dataNum / 60),
  866. isShow: true,
  867. count: 7,
  868. homePageText: homePageText,
  869. endPageText: endPageText,
  870. prevPageText: prevPageText,
  871. nextPageText: nextPageText,
  872. callback: function (current) {
  873. $(location).attr(
  874. "href",
  875. "index.html?type=filter" +
  876. "&name=" +
  877. filterType +
  878. "&page=" +
  879. current +
  880. "&filterType=" +
  881. filterType +
  882. "&filterStarTime=" +
  883. filterStarTime +
  884. "&filterEndTime=" +
  885. filterEndTime +
  886. "&filterLabel=" +
  887. filterLabel
  888. );
  889. },
  890. });
  891. Math.ceil(dataNum / 60) < 2
  892. ? $(".firstPage").show()
  893. : $(".firstPage").hide();
  894. });
  895. getBannerData();
  896. $("html, body").animate(
  897. {
  898. scrollTop: 0,
  899. },
  900. 50
  901. );
  902. },
  903. });
  904. }
  905. function filterTime(time) {
  906. let timer = 0;
  907. if (time == 0) {
  908. timer = 0;
  909. } else if (time > 0 && time < 15) {
  910. timer = 600;
  911. } else if (time >= 15 && time < 25) {
  912. timer = 1200;
  913. } else if (time >= 25 && time < 35) {
  914. timer = 1800;
  915. } else {
  916. timer = 99999999;
  917. }
  918. return timer;
  919. }
  920. function videoTime(time) {
  921. let timeStr = "";
  922. let h =
  923. Math.floor(time / 60 / 60) < 10
  924. ? "0" + Math.floor(time / 60 / 60)
  925. : Math.floor(time / 60 / 60);
  926. let m =
  927. Math.floor(Math.floor(time / 60) % 60) < 10
  928. ? "0" + Math.floor(Math.floor(time / 60) % 60)
  929. : Math.floor(Math.floor(time / 60) % 60);
  930. let s =
  931. Math.floor(time % 60) < 10
  932. ? "0" + Math.floor(time % 60)
  933. : Math.floor(time % 60);
  934. timeStr = h + ":" + m + ":" + s;
  935. return timeStr;
  936. }
  937. // 获取筛选标签
  938. function getLabelListData() {
  939. languageParameter = localStorage.getItem("language") || "CN";
  940. $.ajax({
  941. type: "post",
  942. url: "https://www.bibidd.com/bibidd/Mediasix/shaixuan_type_list",
  943. dataType: "json",
  944. data: {
  945. LNG: languageParameter,
  946. },
  947. success: function (res) {
  948. let labelListDataArray = res.data;
  949. let labelListHtml = "";
  950. $.each(labelListDataArray, function (index, data) {
  951. labelListHtml += '<li class="filterLabelList">';
  952. labelListHtml += ' <p class="filterLabelText">' + data.name + "</p>";
  953. labelListHtml +=
  954. ' <img class="filterLabelAdd" src="/Public/bibidd/images/add.png" alt="">';
  955. labelListHtml += "</li>";
  956. });
  957. $(".filterLabelListContent").html(labelListHtml);
  958. },
  959. complete: function (res) {
  960. let labelListDataArray = res.responseJSON.data;
  961. // 添加筛选标签
  962. $(".filterLabelList").on("click", function () {
  963. if (isSelectLabel) {
  964. $(".filterLabelList").css("background-color", "#222");
  965. filterLabel = labelListDataArray[$(this).index()].name;
  966. $(this).hide();
  967. $(".filterLabelAdd").hide();
  968. var filterLabelGroupTextHtmlList = "";
  969. filterLabelGroupTextHtmlList +=
  970. '<li class="filterLabelGroupText">' +
  971. labelListDataArray[$(this).index()].name +
  972. "</li>";
  973. $(".FilterLabelGroupContent").append(filterLabelGroupTextHtmlList);
  974. $(".filterSwitch").show();
  975. $(".filterLabelGroupText").on("click", function () {
  976. $(".FilterLabelGroupContent").html("");
  977. isSelectLabel = true;
  978. filterLabel = "";
  979. $(".filterLabelAdd").show();
  980. $(".filterLabelList").css("background-color", "#1C1A1B");
  981. getLabelListData();
  982. });
  983. isSelectLabel = false;
  984. }
  985. });
  986. },
  987. });
  988. }
  989. getLabelListData();
  990. $(".language").on("click", function () {
  991. if (languageIsLong) {
  992. $(".language img").attr("src", "/Public/bibidd/images/shang.png");
  993. $(".languageWrap").css('height','50px');
  994. } else {
  995. $(".language img").attr("src", "/Public/bibidd/images/xia.png");
  996. $(".languageWrap").css('height','150px');
  997. window.scrollTo(0, 99999999999);
  998. }
  999. languageIsLong = !languageIsLong;
  1000. });
  1001. // 页面底部切换语言
  1002. $(".languageText").on("click", function () {
  1003. switchLanguage($(this).attr("id"));
  1004. });
  1005. // 切换语言
  1006. function switchLanguage(id) {
  1007. languageIsLong = !languageIsLong;
  1008. $(".language img").attr("src", "/Public/bibidd/images/shang.png");
  1009. $(".languageWrap").css('height','50px');
  1010. if (id == "CN" || id == "chinese") {
  1011. // 切换中文
  1012. localStorage.setItem("language", "CN");
  1013. $("#chinese").addClass(" isSelectLanguage");
  1014. $("#chinese").siblings().removeClass(" isSelectLanguage");
  1015. } else {
  1016. // 切换英文
  1017. localStorage.setItem("language", "EN");
  1018. $("#english").addClass(" isSelectLanguage");
  1019. $("#english").siblings().removeClass(" isSelectLanguage");
  1020. }
  1021. LanguageSwitching();
  1022. }
  1023. function LanguageSwitching() {
  1024. var languageParameter = localStorage.getItem("language") || "CN";
  1025. let navtextArr = [];
  1026. let asiatextArr = [];
  1027. let screentextArr = [];
  1028. if (languageParameter == "CN") {
  1029. // 切换中文语言
  1030. navtextArr = ["推薦", "亞洲", "動畫", "分類"];
  1031. asiatextArr = ["日本AV", "日韓", "香港", "臺灣", "大陸資源"];
  1032. screentextArr = ["", "最新", "最熱", "最多人觀看", "最長時間"];
  1033. if ($(".ui-pagination-container").find("a").eq(0).text() == "1") {
  1034. $(".ui-pagination-container")
  1035. .find("a")
  1036. .eq($(".ui-pagination-container").length - 3)
  1037. .text("下一頁");
  1038. $(".ui-pagination-container")
  1039. .find("a")
  1040. .eq($(".ui-pagination-container").length - 2)
  1041. .text("尾頁");
  1042. } else {
  1043. $(".ui-pagination-container").find("a").eq(0).text("首頁");
  1044. $(".ui-pagination-container").find("a").eq(1).text("上一頁");
  1045. $(".ui-pagination-container")
  1046. .find("a")
  1047. .eq($(".ui-pagination-container").length - 3)
  1048. .text("下一頁");
  1049. $(".ui-pagination-container")
  1050. .find("a")
  1051. .eq($(".ui-pagination-container").length - 2)
  1052. .text("尾頁");
  1053. }
  1054. let titleHeadTxt = $(".titleHead").text();
  1055. switch (titleHeadTxt) {
  1056. case "Recommend":
  1057. titleHeadTxt = "推薦";
  1058. break;
  1059. case "Asia":
  1060. titleHeadTxt = "亞洲";
  1061. break;
  1062. case "Animation":
  1063. titleHeadTxt = "動畫";
  1064. break;
  1065. }
  1066. $(".titleHead").text(titleHeadTxt);
  1067. $(".filterClearText").text("重置所有過濾條件");
  1068. $("#filterLabelTextTime").text("時長");
  1069. $("#filterLabelTextLabel").text("標籤");
  1070. $(".filterAddLabel").find("p").eq(0).text("添加標籤");
  1071. $(".quanWrap").text("加載中……");
  1072. $(".cancelFilter").text("取消");
  1073. $(".starFilter").text("開始篩選");
  1074. $(".language").find("p").eq(0).text("語言");
  1075. $(".footerTitle").text("世界上最大的色情網站");
  1076. $(".footerText").text(
  1077. "9169團隊每天都在更新和添加更多的色情視頻。 我們提供流媒體色情視頻、XXX相册和網絡上排名第一的免費性愛社區。 我們一直在努力新增更多的功能,讓你對色情的熱愛一直保持下去。"
  1078. );
  1079. $('.ageTipPageTitle').text('年齡證明');
  1080. $('.ageTipPageText').text('你超過18歲了嗎');
  1081. $('#ageTipPageTip1').text('警告 裡面有成人內容。如果您未滿18歲, 請勿進入!');
  1082. $('#ageTipPageTip2').text('盜版是非法的,請不要觸犯法律!!');
  1083. $('.confirmBtn').text('18歲以上');
  1084. $('#addressTitle').text('1、很榮幸您能訪問我們網站!');
  1085. $('#addressTitleb').text('我們目前免費提供多種類目的資源瀏覽服務,截圖保存我們的地址,永遠不迷路');
  1086. $('#address1').find('span').eq(0).text('>>> 網址: ');
  1087. $('#addressTitlec').text('2、當前地址不排除被屏蔽的可能, 請收藏下方備用網址。');
  1088. $('#address2').find('span').eq(0).text('>>> 備用網址01: ');
  1089. $('#address3').find('span').eq(0).text('>>> 備用網址02: ');
  1090. $('#h1txt').text('請務必截圖保存');
  1091. $('#iSee').text('我記住了');
  1092. $(".currentTab").text("視頻");
  1093. $("#register").find("p").eq(0).text("註冊");
  1094. $("#login").find("p").eq(0).text("登錄");
  1095. $(".myCollectionTxt").text("我的收藏");
  1096. $(".mineLanguage").find("p").eq(0).text("語言切換");
  1097. $(".loginOut").text("退出登錄");
  1098. } else {
  1099. // 切换英文语言
  1100. if ($(".ui-pagination-container").find("a").eq(0).text() == "1") {
  1101. $(".ui-pagination-container")
  1102. .find("a")
  1103. .eq($(".ui-pagination-container").length - 3)
  1104. .text("Next");
  1105. $(".ui-pagination-container")
  1106. .find("a")
  1107. .eq($(".ui-pagination-container").length - 2)
  1108. .text("Last");
  1109. } else {
  1110. $(".ui-pagination-container").find("a").eq(0).text("One");
  1111. $(".ui-pagination-container").find("a").eq(1).text("Prev");
  1112. $(".ui-pagination-container")
  1113. .find("a")
  1114. .eq($(".ui-pagination-container").length - 3)
  1115. .text("Next");
  1116. $(".ui-pagination-container")
  1117. .find("a")
  1118. .eq($(".ui-pagination-container").length - 2)
  1119. .text("Last");
  1120. }
  1121. navtextArr = ["Recommend", "Asia", "Animation", "Classify"];
  1122. asiatextArr = [
  1123. "Japan AV",
  1124. "Japan and South Korea",
  1125. "Hong Kong",
  1126. "Taiwan",
  1127. "Mainland",
  1128. ];
  1129. screentextArr = ["", "Newest", "Hottest", "Like most", "Longest"];
  1130. let titleHeadTxt = $(".titleHead").text();
  1131. switch (titleHeadTxt) {
  1132. case "推薦":
  1133. titleHeadTxt = "Recommend";
  1134. break;
  1135. case "亞洲":
  1136. titleHeadTxt = "Asia";
  1137. break;
  1138. case "動畫":
  1139. titleHeadTxt = "Animation";
  1140. break;
  1141. case "最新":
  1142. titleHeadTxt = "Newest";
  1143. break;
  1144. }
  1145. $(".titleHead").text(titleHeadTxt);
  1146. $(".filterClearText").text("Reset all filtered conditions");
  1147. $("#filterLabelTextTime").text("Time");
  1148. $("#filterLabelTextLabel").text("Label");
  1149. $(".filterAddLabel").find("p").eq(0).text("Add Label");
  1150. $(".quanWrap").text("Loading……");
  1151. $(".cancelFilter").text("Cancel");
  1152. $(".starFilter").text("Start filtering");
  1153. $(".footerTitle").text("The world's largest pornographic website");
  1154. $(".footerText").text(
  1155. "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."
  1156. );
  1157. $('.ageTipPageTitle').text('proof of age');
  1158. $('.ageTipPageText').text('are you over 18');
  1159. $('#ageTipPageTip1').text('Warning Contains adult content. If you are under 18, please do not enter!');
  1160. $('#ageTipPageTip2').text("Piracy is illegal, please don't break the law! !");
  1161. $('.confirmBtn').text('over 18 years old');
  1162. $('#addressTitle').text('1. It is an honor for you to visit our website!');
  1163. $('#addressTitleb').text('We currently provide a variety of resource browsing services for free, take screenshots to save our address, and never get lost');
  1164. $('#address1').find('span').eq(0).text('>>> URL:');
  1165. $('#addressTitlec').text('2. The current address does not rule out the possibility of being blocked, please bookmark the alternate URL below.');
  1166. $('#address2').find('span').eq(0).text('>>> Alternate URL 01: ');
  1167. $('#address3').find('span').eq(0).text('>>> Alternate URL 02: ');
  1168. $('#h1txt').text('Be sure to save the screenshot');
  1169. $('#iSee').text('I remember');
  1170. $(".currentTab").text("Video");
  1171. $(".language").find("p").eq(0).text("Language");
  1172. $("#register").find("p").eq(0).text("Sign Up");
  1173. $("#login").find("p").eq(0).text("Sign In");
  1174. $(".myCollectionTxt").text("My collection");
  1175. $(".mineLanguage").find("p").eq(0).text("Language");
  1176. $(".loginOut").text("sign out");
  1177. }
  1178. if (typeBtnIsSelect) {
  1179. getlabelData(currentPage);
  1180. }
  1181. if(isFilteringModules){
  1182. getLabelListData();
  1183. }
  1184. // 顶部导航文字
  1185. $.each($(".navText"), function (index) {
  1186. $(this).text(navtextArr[index]);
  1187. });
  1188. // 亚洲筛选
  1189. $.each($(".asiaScreenContentUlLi"), function (index) {
  1190. $(this).find("p").eq(0).text(asiatextArr[index]);
  1191. });
  1192. // 条件筛选
  1193. $.each($(".screenHeaderContentLi"), function (index) {
  1194. if (index > 0) {
  1195. $(this).text(screentextArr[index]);
  1196. }
  1197. });
  1198. }
  1199. $(".mine").on("click", function (e) {
  1200. e.preventDefault();
  1201. $(this).animate(
  1202. {
  1203. width: 0,
  1204. },
  1205. 100
  1206. );
  1207. });
  1208. // 前往我的收藏
  1209. $(".myCollection").on("click", function () {
  1210. console.log(theRequest.labelname);
  1211. let labelname = theRequest.labelname || '';
  1212. let type = theRequest.type || '';
  1213. let name = theRequest.name || 'Asia';
  1214. console.log(labelname);
  1215. $(location).attr(
  1216. "href",
  1217. "collection.html?labelname=" +
  1218. labelname +
  1219. "&type=" +
  1220. type +
  1221. "&videotype=" +
  1222. videotype +
  1223. "&name=" +
  1224. name
  1225. );
  1226. });
  1227. // 前往註冊
  1228. $("#login").on("click", function () {
  1229. $(location).attr("href", "blogin.html");
  1230. });
  1231. // 前往登录
  1232. $("#register").on("click", function () {
  1233. $(location).attr("href", "register.html");
  1234. });
  1235. // 退出登录
  1236. $(".loginOut").on("click", function () {
  1237. localStorage.removeItem("uid");
  1238. location.reload();
  1239. });
  1240. // 个人中心切换语言
  1241. $(".languageType div").on("click", function () {
  1242. $(this).addClass(" isSelectLanguage");
  1243. $(this).siblings().removeClass(" isSelectLanguage");
  1244. switchLanguage($(this).attr("id"));
  1245. languageIsLong = false;
  1246. });
  1247. $(".iSee").on("click", function () {
  1248. $(".addressBox").fadeOut(500);
  1249. $.cookie("the_cookie", encodeURI("the_value"), { expires: 1, path: "../index.html" });
  1250. });
  1251. $(".addressBoxClose").on("click", function () {
  1252. $(".addressBox").fadeOut(500);
  1253. $.cookie("the_cookie", encodeURI("the_value"), { expires: 1, path: "../index.html" });
  1254. });
  1255. // 获取弹窗链接
  1256. $(
  1257. (function () {
  1258. $.ajax({
  1259. type: "post",
  1260. url: "https://www.bibidd.com/bibidd/Mediasix/shouye_lianjei",
  1261. dataType: "json",
  1262. data: {},
  1263. success: function (res) {
  1264. let data = res.data;
  1265. $("#address1").find('span').eq(1).text(data[0].url);
  1266. $("#address2").find('span').eq(1).text(data[1].url);
  1267. $("#address3").find('span').eq(1).text(data[2].url);
  1268. },
  1269. });
  1270. })()
  1271. );
  1272. function getBannerData() {
  1273. $.ajax({
  1274. type: "post",
  1275. url: "https://www.bibidd.com/bibidd/Mediasix/Return_to_ads",
  1276. dataType: "json",
  1277. data: {
  1278. adv_type: "list_detail",
  1279. },
  1280. success: function (res) {
  1281. bannerArr = res.data;
  1282. },
  1283. complete: function (res) {
  1284. createDomHtml(dataArray);
  1285. },
  1286. });
  1287. }
  1288. });