{"code":200,"message":"success","data":"\u003c!doctype html\u003e\n\u003chtml lang=\"en\"\u003e\n \u003chead\u003e\n \u003cmeta charset=\"UTF-8\" /\u003e\n \u003cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" /\u003e\n \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /\u003e\n \u003ctitle\u003eMac 滑块验证\u003c/title\u003e\n \u003cstyle\u003e\n .weui-toast {\n position: fixed;\n z-index: 5500;\n font-size: 10px;\n width: 13.6em;\n height: 13.6em;\n top: 40%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n text-align: center;\n border-radius: 12px;\n color: hsla(0, 0%, 100%, 0.9);\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -webkit-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n background-color: #4c4c4c;\n background-color: #4c4c4c;\n box-sizing: border-box;\n line-height: 1.4;\n }\n\n .weui-loading {\n font-size: 16px;\n width: 1em;\n height: 1em;\n display: inline-block;\n vertical-align: middle;\n background: transparent\n url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='80px' height='80px' viewBox='0 0 80 80' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3Eloading%3C/title%3E%3Cdefs%3E%3ClinearGradient x1='94.0869141%25' y1='0%25' x2='94.0869141%25' y2='90.559082%25' id='linearGradient-1'%3E%3Cstop stop-color='%23606060' stop-opacity='0' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23606060' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3ClinearGradient x1='100%25' y1='8.67370605%25' x2='100%25' y2='90.6286621%25' id='linearGradient-2'%3E%3Cstop stop-color='%23606060' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23606060' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3C/defs%3E%3Cg stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' opacity='0.9'%3E%3Cg%3E%3Cpath d='M40,0 C62.09139,0 80,17.90861 80,40 C80,62.09139 62.09139,80 40,80 L40,73 C58.2253967,73 73,58.2253967 73,40 C73,21.7746033 58.2253967,7 40,7 L40,0 Z' fill='url(%23linearGradient-1)'%3E%3C/path%3E%3Cpath d='M40,0 L40,7 C21.7746033,7 7,21.7746033 7,40 C7,58.2253967 21.7746033,73 40,73 L40,80 C17.90861,80 0,62.09139 0,40 C0,17.90861 17.90861,0 40,0 Z' fill='url(%23linearGradient-2)'%3E%3C/path%3E%3Ccircle id='Oval' fill='%23606060' cx='40.5' cy='3.5' r='3.5'%3E%3C/circle%3E%3C/g%3E%3CanimateTransform attributeName='transform' begin='0s' dur='1s' type='rotate' values='0 40 40;360 40 40' repeatCount='indefinite'/%3E%3C/g%3E%3C/svg%3E%0A\")\n no-repeat;\n background-size: 100%;\n }\n\n .weui-btn_loading.weui-btn_primary .weui-loading,\n .weui-loading.weui-icon_toast,\n .weui-loading.weui-loading_transparent {\n background-image: url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='80px' height='80px' viewBox='0 0 80 80' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3Eloading%3C/title%3E%3Cdefs%3E%3ClinearGradient x1='94.0869141%25' y1='0%25' x2='94.0869141%25' y2='90.559082%25' id='linearGradient-1'%3E%3Cstop stop-color='%23ededed' stop-opacity='0' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23ededed' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3ClinearGradient x1='100%25' y1='8.67370605%25' x2='100%25' y2='90.6286621%25' id='linearGradient-2'%3E%3Cstop stop-color='%23ededed' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23ededed' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3C/defs%3E%3Cg stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' opacity='0.9'%3E%3Cg%3E%3Cpath d='M40,0 C62.09139,0 80,17.90861 80,40 C80,62.09139 62.09139,80 40,80 L40,73 C58.2253967,73 73,58.2253967 73,40 C73,21.7746033 58.2253967,7 40,7 L40,0 Z' fill='url(%23linearGradient-1)'%3E%3C/path%3E%3Cpath d='M40,0 L40,7 C21.7746033,7 7,21.7746033 7,40 C7,58.2253967 21.7746033,73 40,73 L40,80 C17.90861,80 0,62.09139 0,40 C0,17.90861 17.90861,0 40,0 Z' fill='url(%23linearGradient-2)'%3E%3C/path%3E%3Ccircle id='Oval' fill='%23ededed' cx='40.5' cy='3.5' r='3.5'%3E%3C/circle%3E%3C/g%3E%3CanimateTransform attributeName='transform' begin='0s' dur='1s' type='rotate' values='0 40 40;360 40 40' repeatCount='indefinite'/%3E%3C/g%3E%3C/svg%3E%0A\");\n }\n\n .weui-mask-loading {\n display: inline-block;\n vertical-align: middle;\n font-size: 16px;\n width: 1em;\n height: 1em;\n -webkit-mask: url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='80px' height='80px' viewBox='0 0 80 80' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3Eloading%3C/title%3E%3Cdefs%3E%3ClinearGradient x1='94.0869141%25' y1='0%25' x2='94.0869141%25' y2='90.559082%25' id='linearGradient-1'%3E%3Cstop stop-color='%23606060' stop-opacity='0' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23606060' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3ClinearGradient x1='100%25' y1='8.67370605%25' x2='100%25' y2='90.6286621%25' id='linearGradient-2'%3E%3Cstop stop-color='%23606060' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23606060' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3C/defs%3E%3Cg stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' opacity='0.9'%3E%3Cg%3E%3Cpath d='M40,0 C62.09139,0 80,17.90861 80,40 C80,62.09139 62.09139,80 40,80 L40,73 C58.2253967,73 73,58.2253967 73,40 C73,21.7746033 58.2253967,7 40,7 L40,0 Z' fill='url(%23linearGradient-1)'%3E%3C/path%3E%3Cpath d='M40,0 L40,7 C21.7746033,7 7,21.7746033 7,40 C7,58.2253967 21.7746033,73 40,73 L40,80 C17.90861,80 0,62.09139 0,40 C0,17.90861 17.90861,0 40,0 Z' fill='url(%23linearGradient-2)'%3E%3C/path%3E%3Ccircle id='Oval' fill='%23606060' cx='40.5' cy='3.5' r='3.5'%3E%3C/circle%3E%3C/g%3E%3CanimateTransform attributeName='transform' begin='0s' dur='1s' type='rotate' values='0 40 40;360 40 40' repeatCount='indefinite'/%3E%3C/g%3E%3C/svg%3E%0A\")\n 0 0 no-repeat;\n mask: url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='80px' height='80px' viewBox='0 0 80 80' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3Eloading%3C/title%3E%3Cdefs%3E%3ClinearGradient x1='94.0869141%25' y1='0%25' x2='94.0869141%25' y2='90.559082%25' id='linearGradient-1'%3E%3Cstop stop-color='%23606060' stop-opacity='0' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23606060' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3ClinearGradient x1='100%25' y1='8.67370605%25' x2='100%25' y2='90.6286621%25' id='linearGradient-2'%3E%3Cstop stop-color='%23606060' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23606060' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3C/defs%3E%3Cg stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' opacity='0.9'%3E%3Cg%3E%3Cpath d='M40,0 C62.09139,0 80,17.90861 80,40 C80,62.09139 62.09139,80 40,80 L40,73 C58.2253967,73 73,58.2253967 73,40 C73,21.7746033 58.2253967,7 40,7 L40,0 Z' fill='url(%23linearGradient-1)'%3E%3C/path%3E%3Cpath d='M40,0 L40,7 C21.7746033,7 7,21.7746033 7,40 C7,58.2253967 21.7746033,73 40,73 L40,80 C17.90861,80 0,62.09139 0,40 C0,17.90861 17.90861,0 40,0 Z' fill='url(%23linearGradient-2)'%3E%3C/path%3E%3Ccircle id='Oval' fill='%23606060' cx='40.5' cy='3.5' r='3.5'%3E%3C/circle%3E%3C/g%3E%3CanimateTransform attributeName='transform' begin='0s' dur='1s' type='rotate' values='0 40 40;360 40 40' repeatCount='indefinite'/%3E%3C/g%3E%3C/svg%3E%0A\")\n 0 0 no-repeat;\n -webkit-mask-size: cover;\n mask-size: cover;\n background-color: currentColor;\n color: #606060;\n }\n \u003c/style\u003e\n \u003c/head\u003e\n\n \u003cbody\u003e\n \u003cdiv id=\"loadingToast\" style=\"display: none\"\u003e\n \u003cdiv class=\"weui-mask_transparent\"\u003e\u003c/div\u003e\n \u003cdiv class=\"weui-toast\"\u003e\n \u003ci class=\"weui-loading weui-icon_toast\"\u003e\u003c/i\u003e\n \u003cp class=\"weui-toast__content\"\u003e正在加载\u003c/p\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003cbutton id=\"CaptchaId\" type=\"button\"\u003e测试\u003c/button\u003e\n \u003c/body\u003e\n\n \u003cscript\u003e\n var userAgent = \"Mozilla/5.0 (iPhone; CPU iPhone OS 18_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.62(0x18003e2f) NetType/WIFI Language/zh_CN\";\n var base64UA = btoa(unescape(encodeURIComponent(userAgent)));\n\n function queryToObj(query) {\n if (query.startsWith(\"?\")) query = query.slice(1);\n const obj = {};\n query.split(\"\u0026\").forEach((pair) =\u003e {\n if (!pair) return;\n const [key, value] = pair.split(\"=\");\n obj[decodeURIComponent(key)] = decodeURIComponent(value || \"\");\n });\n return obj;\n }\n\n function objToQuery(obj) {\n return Object.keys(obj)\n .map(\n (key) =\u003e encodeURIComponent(key) + \"=\" + encodeURIComponent(obj[key]),\n )\n .join(\"\u0026\");\n }\n\n function cap_union_conver(url) {\n if (url.includes(\"cap_union_prehandle\")) {\n // 取 query\n var tem0 = url.split(\"?\")[0];\n var tem1 = url.split(\"?\")[1];\n // 转 对象\n var tem1Obj = queryToObj(tem1);\n // 修改 ua\n tem1Obj.ua = base64UA;\n // 修改 entry_url\n tem1Obj[\"entry_url\"] =\n \"https://shminorshort.weixin.qq.com/security/readtemplate\";\n // 还原回 query\n url = tem0 + \"?\" + objToQuery(tem1Obj);\n }\n return url;\n }\n\n // 初始化\n (function () {\n var Bridge = {\n invoke: function (apiName, conf, callback) {\n var result = {\n err_msg: apiName + \":ok\",\n };\n if (apiName === \"mmsf0001\") {\n result.securityInfo = \"\";\n }\n if (apiName === \"getSystemInfo\") {\n result.brand = \"xiaomi\";\n }\n if (callback) {\n callback(result);\n }\n },\n };\n window.WeixinJSBridge = Bridge;\n console.log(\"初始化 WeixinJSBridge\");\n })();\n\n var originalCreateElement = document.createElement;\n document.createElement = function (tagName, ...args) {\n const element = originalCreateElement.call(this, tagName, ...args);\n if (tagName.toLowerCase() === \"script\") {\n // 兼容直接赋值 src\n Object.defineProperty(element, \"src\", {\n set(val) {\n if (val.includes(\"cap_union_prehandle\")) {\n val = cap_union_conver(val);\n }\n this.setAttribute(\"src\", val);\n },\n get() {\n return this.getAttribute(\"src\");\n },\n });\n }\n return element;\n };\n\n // 获取验证码\n function getCaptcha() {\n document.getElementById(\"loadingToast\").style.display = \"flex\";\n var script = null;\n try {\n var src = \"https://ssl.captcha.qq.com/template/TCapIframeApi.js?rand=\" + Math.random();\n script = document.createElement(\"script\");\n src = src + \"\u0026aid=2078688116\u0026clientype=1\u0026lang=2052\u0026apptype=null\u0026captype=7\u0026disturblevel=1\";\n script.onerror = function () {\n document.body.removeChild(script);\n document.getElementById(\"loadingToast\").style.display = \"none\";\n };\n script.onload = function () {\n WeixinJSBridge.invoke(\"getUserConfig\", {}, (resp) =\u003e {\n var isAccessibilityMode = resp.isAccessibilityMode === true;\n var isGray = true;\n capInit(document, {\n enableAged: !isGray ? false : isAccessibilityMode ? \"force\" : true,\n showHeader: false,\n enableDarkMode: window.matchMedia \u0026\u0026 window.matchMedia(\"(prefers-color-scheme: dark)\").matches,\n userLanguage: \"zh_CN\",\n readyCallback: function () {\n document.getElementById(\"loadingToast\").style.display = \"none\";\n },\n themeColor: \"1AAD19\",\n callback: function (data) {\n var __device_type__ = \"\";\n var __client_version__ = \"0\";\n var __data__ = \"62706c6973743030d4010203040506090a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a2070855246e756c6c5f10203439623132313439353164313364393834643031343461656331353466635f100f4e534b657965644172636869766572d10b0c54726f6f74800108111a232d32373a406375787d0000000000000101000000000000000d0000000000000000000000000000007f\";\n var __ticket__ = \"1_e142711a8b36d0f5a0c38ce7d1a875e3\";\n var __verifyid__ = \"4d2126be-8d02-4533-9148-6903039d3f36\";\n if (__device_type__[0] == \"{\") {\n __device_type__ = \"\";\n }\n if (__client_version__[0] == \"{\") {\n __client_version__ = \"\";\n }\n if (__data__[0] == \"{\") {\n __data__ = \"\";\n }\n if (__ticket__[0] == \"{\") {\n __ticket__ = \"\";\n }\n if (__verifyid__[0] == \"{\") {\n __verifyid__ = \"\";\n }\n console.log(\"callback\", data);\n\n // 最终请求是此项目中的/security-verify接口\n var getUrl = \"/api/v1/robot/login/slider-verify-submit?t=login_verify_entrances/w_tcaptcha_ret\u0026wechat_real_lang=zh_CN\u0026aid=2078688116\u0026clientype=1\u0026lang=2052\u0026apptype=undefined\u0026captype=7\u0026disturblevel=1\";\n getUrl = getUrl + \"\u0026\" + objToQuery(data);\n getUrl = getUrl + \"\u0026\" + \"data\" + \"=\" + __data__;\n getUrl = getUrl + \"\u0026\" + \"secticket\" + \"=\" + __ticket__;\n getUrl = getUrl + \"\u0026\" + \"verifyid\" + \"=\" + __verifyid__;\n getUrl = getUrl + \"\u0026\" + \"device_type\" + \"=\" + __device_type__;\n getUrl = getUrl + \"\u0026\" + \"client_version\" + \"=\" + __client_version__;\n var decodeUrl = decodeURIComponent(getUrl);\n // 发送 GET 请求(兼容所有浏览器)\n function sendGet(url, callback) {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status \u003e= 200 \u0026\u0026 xhr.status \u003c 300) {\n try {\n var jsonResponse = JSON.parse(xhr.responseText);\n if (jsonResponse.code !== 200) {\n callback(new Error(jsonResponse.message), \"\");\n } else {\n callback(null, xhr.responseText);\n }\n } catch (ex) {\n callback(ex, \"\");\n }\n } else {\n callback(new Error(xhr.statusText), \"\");\n }\n }\n };\n xhr.send();\n }\n\n // 使用示例\n sendGet(decodeUrl, function (err, resp) {\n console.log(\"提交滑块验证结果: \", err, resp);\n const onComplete = (type, data) =\u003e {\n if (window.parent \u0026\u0026 window.parent !== window) {\n // 通知主页面 (iframe 模式)\n window.parent.postMessage({ type, data }, \"*\");\n } else if (window.opener) {\n // 通知主页面 (弹窗模式)\n window.opener.postMessage({ type, data }, \"*\");\n // 关闭自己\n window.close();\n }\n };\n if (err) {\n onComplete(\"sliderResult\", {\n success: false,\n message: err.message,\n });\n } else {\n onComplete(\"sliderResult\", { success: true, message: \"\" });\n }\n });\n },\n });\n });\n };\n script.src = src;\n document.body.appendChild(script);\n } catch (error) {\n if (script) {\n document.body.appendChild(script);\n }\n }\n }\n\n // 定义验证码触发事件\n window.onload = function () {\n var __ticket__ = \"1_e142711a8b36d0f5a0c38ce7d1a875e3\";\n if (__ticket__[0] == \"{\") {\n __ticket__ = \"\";\n }\n document.getElementById(\"CaptchaId\").style.display = \"none\";\n if (!__ticket__) {\n document.getElementById(\"CaptchaId\").style.display = \"inline-block\";\n }\n document.getElementById(\"CaptchaId\").onclick = getCaptcha;\n if (__ticket__.length) {\n document.getElementById(\"CaptchaId\").click();\n }\n };\n \u003c/script\u003e\n\u003c/html\u003e\n"}