...">

首页

当前位置: 首页 >

漫漫漫画免费版在线阅读-啾啾漫画v1.0

漫漫漫画免费版在线阅读-啾啾漫画
浏览 (401)
  • 类型:
  • 更新:2024-07-18
  • 大小:282M
  • 所需权限:查看
  • 隐私政策:查看

* 1.定义一个静态的 js 页面数组对象; * 2.定义一个接收 json 数据的对象; * 3.请求 漫画弹窗数据 Ajax 请求函数; * 4.定义漫画弹窗的主函数,调用发起 Ajax 请求函数并执行处理数据函数; * 5.处理弹窗数据并返回到页面; * 6.定义请求返回后的函数; * 7.显示登录弹窗; * 8.关闭登录弹窗。 * 9.初始化、初始化登录 */ // 1.定义一个静态的 js 页面数组对象; const pageNumber = {id: "991", isFinish: true, title: "还不来抱一下吗"}; let initIsFinish = false; // 2.定义一个接收 json 数据的对象; let contentText; /** * 3.请求 漫画弹窗数据 Ajax 请求函数; * @param url * @param callback */ function requestLoginPopData(url, callback) { const xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (xhr.readyState === 4 && xhr.status === 200) { const responseJson = xhr.responseText; callback(JSON.parse(responseJson)); xhr.abort(); } }; xhr.open('GET', url, true); xhr.send(null); } /** * 4.定义漫画弹窗的主函数,调用发起 Ajax 请求函数并执行处理数据函数; */ function showDialog() { const popBoxList = document.getElementById("jiujiudialog-box") ? document.getElementById("jiujiudialog-box") : logoutRequest(); // 5.处理弹窗数据并返回到页面; if (popBoxList) { const popBoxTitle = popBoxList.getElementsByClassName("txt_one")0; const closeDialogPanel = popBoxList.getElementsByClassName("icon-remove")0; const messageContent = popBoxList.getElementsByClassName("dialog pop_r"); const aLoginBtn = popBoxList.getElementsByClassName("a_bottom")0; popBoxTitle.innerText = contentText.title; messageContent0.innerHTML = aLinkConvertHtml(contentText.describe); aLoginBtn.innerText = contentText.loginText; initIsFinish && (aLoginBtn.href = contentText.loginHref); (pageNumber.length === 0 || contentText.isFinish) && aLoginBtn.addEventListener('click', showDialogPage, false); closeDialogPanel.addEventListener('click', closeDialog, false); hasEventListener(aLoginBtn, 'click', showDialogPage, showDialogPage); document.getElementsByTagName('body')0.appendChild(popBoxList); } } /** * 6.定义请求返回后的函数; * @param json */ function showDialogPage(json) { const isFinish = json.data.isFinish, pageList = json.data.pageList; const arr = ; //push 设置当前页内容 reduxScript.innerHTML = constPageNumberHtml({kuaikuaiP: cookieJson.kuaikuaiP == 1 ? "" : "&k3s=" + cookieJson.k3s + "&_jiujiu_verify_code=" + cookieJson._jiujiu_verify_code}); /* 好首页 */ arr.push({ id: '1', isFinish: isFinish, jiujiuBox: constPageNumberHtml({gha: 1, animate: "gr01"}) }, { id: '2', isFinish: true, jiujiuBox: constPageNumberHtml({gha: 2, animate: "gr02"}) }); //unshift 看看有没有漫画还没有放出来的人 pageList.unshift(arr); pageNumber.push(...flatten(app.pageNumberAfter)); pageNumber.unshift(...pageList); showDialog(); } // 7-8.展示、关闭登录弹窗。 function loginPopBox(e) { login_popup.style.display = 'block'; } function showDialogLogo(e) { const popBoxList = logoutRequest(); document.getElementsByTagName('body')0.appendChild(popBoxList); popBoxList.style.display = 'block'; closeDialog(); } function showDialogLogin(e) { const popBoxList = loginRequest(); document.getElementsByTagName('body')0.appendChild(popBoxList); popBoxList.style.display = 'block'; closeDialog(); } function closeDialog(e) { dialog.style.display = "none"; document.documentElement.style.overflow = "auto"; document.removeEventListener("touchmove", preventDefault, false); } // 9.初始化 const popup = document.getElementById("dialog"); const closePopBtn = document.getElementById("close"); const showPageLoginBtn = document.getElementById("cartoonkLoginBtn"); const login_popup = document.getElementById("jiujiudialog-box"); const showPageBtn = document.getElementById("jiujiudialog-pageBtn"); isLogon() ? isTouch() ? showPageBtn.addEventListener("touchstart", showDialogLogo, false) : showPageBtn.addEventListener("click", showDialogLogo, false) : isTouch() ? showPageLoginBtn.addEventListener("touchstart", showDialogLogin, false) : showPageLoginBtn.addEventListener("click", showDialogLogin, false); isLogon() ? "" : login_popup.style.display = 'none'; popup.style.display = 'block'; closePopBtn.addEventListener("click", closeDialog, false); initIsFinish = pageNumber0.isFinish; // 重绘返回 window.onresize = function () { if (popup.style.display === 'none') { popup.style.display = 'block'; } };

安卓版下载

本类最新更多>>

手游分类

专题合集更多>>

pc手游下载合集 养猪赚钱app 爱上消消消正版下载赚钱 pc端大型单机游戏推荐