1 line
19 KiB
Plaintext
1 line
19 KiB
Plaintext
var passport=passport||window.passport||{};passport.err=passport.err||{},function(e){var t=null,n="",a=new RegExp("(^|&)lang=([^&]*)(&|$)","i"),o=window.location.search.substr(1).match(a);null!=o&&(n=unescape(o[2])),t="function"===(typeof e.getCurrent).toLowerCase()?e.getCurrent():{errMsg:{},labelText:{}};var i={"zh-CN":{title:"密保工具",mobileName:"验证手机",mobileTip:"检测到您有待验证的手机号,验证成功后即可成为绑定手机号码",mobileGFooterText1:"一个手机号可以绑定5个百度账号,但该手机号只能登录其中一个账号",mobileGFooterText2:"您可以使用此手机号进行找回密码等敏感操作",mobileGFooterText3:"请勿随意泄露手机号,以防被不法分子利用,骗取账号信息",mobileGFooterText4:"您可用使用此密保邮箱找回密码及登录",mobileGFooterText5:" 请勿随意泄露邮箱地址,以防被不法分子利用,骗取账号信息",emailName:"绑定邮箱",emailCode:"邮箱验证码",emailMsg:"请输入您要绑定的邮箱地址,绑定后即可用该邮箱登录所有百度产品",emailVli1:"请输入邮箱地址",emailVli2:"邮箱格式不正确",emailVli3:"请绑定qq邮箱、163邮箱等主流邮箱",emailVli4:"已被其他账号绑定",emailVli5:"建议更换邮箱或直接用此邮箱登录",emailVli6:"请输入邮箱验证码",emailVli7:"验证码为六位数字",emailVli8:"验证码已过期",emailVli9:"请输入有效邮箱地址",bindPhone:"绑定手机",pBindPhone:"请绑定手机",smsCode:"短信验证码",bindPhoneMsg:"请输入您要绑定的手机号码",phoneVali1:"请输入手机号码",phoneVali2:"号码格式不正确",phoneVali3:"已被其他账号绑定",phoneVali4:"建议更换号码或直接用此号码登录",phoneVali5:"请输入短信验证码",changeEmail:"更换密保邮箱",changePhone:"更换手机号",phoneCode:"手机验证码",unBindPhone:"解绑手机",unBindEmail:"解绑邮箱",sendCode:"发送验证码",confirm:"确定",cancel:"取消",riskTip:"您当前的操作存在安全风险,请稍后再试",tipTitle:"提示",feedback:"意见反馈",moreHint1:"您可使用该手机号+密码的方式登录当前账号",moreHint2:"您可使用该用户名/邮箱+密码的方式登录当前账号",bindEmailSuccess:"邮箱绑定成功",bindsuccessMsg:"您可使用该邮箱+密码登录百度所有产品",bindPhoneSuccess:"手机绑定成功",changEmailSuccess:"密保邮箱换绑成功",bindEmail:"换绑邮箱",changPhone:"换绑手机",unbindES:"邮箱解绑成功",undinbPS:"手机解绑成功",verifySuccess:"验证手机成功",specialTip:"特别提醒:",phone:"手机号",bindNew:"已绑定新账号",oldAccount:"将不能用于登录原账号",useInfo:"感谢您的使用。",success:"成功",usefail:"操作失败,",faliMsg:"操作失败,5秒钟后窗口关闭……",closeTip:"秒钟后窗口关闭……",wait:"请稍等",sending:"正在发送",sendSucc:"发送成功",inEmail:"进入邮箱",nowInEmail:"立即进入邮箱",resend:"重新发送",intTip:"请勿使用物联网手机号",useMore:"操作频繁,请稍候再试",fillMsg:"该手机号已被其它账号设置为登录手机,将不能用于登录当前账号,请先为当前账号设置一个用户名用于登录",setName:"设置用户名",secMobileTip:"已绑定并用于登录账号",secMobileTip1:"是否是您的账号?若非本人账号,将为您解除绑定",sureAccount:",请确认账号",notMe:"不是我的",isMe:"是我的",authTip:"为了保障您的账号安全,变更信息前需验证身份"},en:{title:"Security Tool",mobileName:"Verify phone",mobileTip:"Phone number has not been verify. Once verify success, it can be bind",mobileGFooterText1:"One phone number can be bind 5 accounts but phone number can only log in one of accounts",mobileGFooterText2:"You can use the phone number to retrieve passwords, etc",mobileGFooterText3:"Please do not disclose your phone number at will to avoid be scammed",mobileGFooterText4:"You can use the email to retrieve password and log in",mobileGFooterText5:"Please do not disclose your email at will to avoid be cheated",emailName:"Bind email",emailCode:"Email verify code",emailMsg:"Please enter email you want to bind, and you can log in use email after bind",emailVli1:"Please enter your email",emailVli2:"The email format is incorrect",emailVli3:"Please bind mainstream email",emailVli4:"Already bound to other account",emailVli5:"Suggest chang email or log in with the email",emailVli6:"Please enter email verify code",emailVli7:"The verify code is six digits",emailVli8:"Verify code has expired",emailVli9:"Please enter valid email",bindPhone:"Bind phone",pBindPhone:"Please bind phone",smsCode:"Verify code",bindPhoneMsg:"Please enter phone number you want to bind",phoneVali1:"Please enter phone number",phoneVali2:"The number format is incorrect",phoneVali3:"Already bound to other account",phoneVali4:"Suggest chang the number or log in with the number",phoneVali5:"Please enter code",changeEmail:"Change email",changePhone:"Change phone",phoneCode:"Verify code",unBindPhone:"Unbind phone",unBindEmail:"Unbind email",sendCode:"Send code",confirm:"Confirm",cancel:"Cancel",riskTip:"There is a risk, please try again later",tipTitle:"Tips",feedback:"Feedback",moreHint1:"You can log in use your phone number and password",moreHint2:"You can log in use username/email and password",bindEmailSuccess:"Email bind success",bindsuccessMsg:"You can use the email and password log in",bindPhoneSuccess:"Phone bind success",changEmailSuccess:"Email bind changed success",bindEmail:"Change email",changPhone:"Change phone",unbindES:"Email unbind success",undinbPS:"Phone unbind success",verifySuccess:"Verify phone success",specialTip:"Tips:",phone:"Phone",bindNew:"New account has been bound",oldAccount:"Cannot be used to log in the original account",useInfo:"Thanks for your use",success:"Success",usefail:"The operation failed.",faliMsg:"The operation failed,the window will close in 5 seconds...",closeTip:"s, The window will close",wait:"Please wait",sending:"Sending",sendSucc:"Send success",inEmail:"Open your email",nowInEmail:"Open your email",resend:"Resend",intTip:"Do not use IoT phone number",useMore:"Operation is frequent, please try again later",fillMsg:"The phone number has been set as the login phone number for other account and cannot be used to log in to the current account,please set a username for the current account first",setName:"Set username",secMobileTip:"Already bound and used to log in the account",secMobileTip1:"Is this your account? If not, it will be unbound",sureAccount:",Please confirm your account",notMe:"Not mine",isMe:"Be mine",authTip:"To ensure security, identity verify is required"}};e.getCurrent=function(){var e="en"===n?"en":"zh-CN",a=passport.passLang?passport.passLang:e;return t.labelText.armorwidget=i[a],t}}(passport.err);var passport=passport||window.passport||{};!function(e){window.Array&&!Array.prototype.includes&&(Array.prototype.includes=function(e,t){function n(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}if(null==this)throw new TypeError('"this" is null or not defined');var a=Object(this),o=a.length>>>0;if(0===o)return!1;for(var i=0|t,s=Math.max(i>=0?i:o-Math.abs(i),0);o>s;){if(n(a[s],e))return!0;s++}return!1});var t=["yiyan_intl"];e.enTpls=t;var n=function(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)","i"),n=window.location.search.substr(1).match(t);return null!=n?unescape(n[2]):""};e.queryTpl=n("tpl")}(passport);var passport=passport||window.passport||{};!function(e){var t="https://ufosdk.baidu.com/bailing/getEntryPath/eG8Bo9LKhwNaa+UzF4RrYeKgloEGHe8h40KVmAE9l3E=",n="https://ufosdk.baidu.com/bailingPC/getEntryPath/eG8Bo9LKhwNaa+UzF4RrYU-3KF8SAV35kX+Zqjzyp8U=";e.MobileDukeUrl=t,e.PcDukeUrl=n}(passport);var passport=passport||window.passport||{};passport._modulePool=passport._modulePool||{},passport._define=passport._define||function(e,t){passport._modulePool[e]=t&&t()},passport._getModule=passport._getModule||function(e){return passport._modulePool[e]},window.upsmsStore={reg_upsms:"106929130003000002",verify_upsms:"106929130003000004",verify_text_upsms:"1069 2913 0003 000 004"},window.YY_TPL_CONFIG="yylive,yyliveserver,yyanchor,pcyy,yyudbsec,bdgameassist,yoyuyin,yygac,yy_game,yy_gth,";try{if(window.localStorage&&window.localStorage.getItem("upsms-pcApi"))try{window.upsmsStore=JSON.parse(window.localStorage.getItem("upsms-pcApi"))}catch(e){}}catch(e){}passport.pop=passport.pop||{},passport.pop.insertScript=passport.pop.insertScript||function(e,t){var n=document,a=n.createElement("SCRIPT");a.type="text/javascript",a.charset="UTF-8",a.readyState?a.onreadystatechange=function(){("loaded"==a.readyState||"complete"==a.readyState)&&(a.onreadystatechange=null,t&&t())}:a.onload=function(){t&&t()},a.src=e,n.getElementsByTagName("head")[0].appendChild(a)},passport.pop.initForceverify=passport.pop.initForceverify||function(e){var t,n={"http:":"http://passport.baidu.com","https:":"https://passport.baidu.com"},a=n[window.location.protocol.toLowerCase()],o={uni_forceverify:"/passApi/js/uni_forceverify_bc920d3.js",lib_rsa:"/passApi/js/lib/rsa_34eb2cc.js",idcard_validate:"/passApi/js/lib/idcard_validate.min_6738f5b.js"},i="/passApi/css/uni_forceverify_064a5ef.css",e=e||{},s=document,e=e||{},r=("_PassUni"+(new Date).getTime(),a+i);return e.cssUrlWrapper&&(r=cssUrlWrapper.join("uni_forceverify.css")),t={show:function(){return t.loadPass(),t},loadPass:function(){var e=s.createElement("link");e.rel="stylesheet",e.type="text/css",e.href=r,e.disabled=!1,e.setAttribute("data-for","result"),s.getElementsByTagName("head")[0].appendChild(e),t.passCallback(),delete t.loadPass},passCallback:function(){if(t.components.length>0)passport.pop.insertScript(t.components.shift(),t.passCallback);else{var n=passport.pop.Forceverify;new n(e,!0,t),delete t.passCallback,delete t.components}},components:[]},t.components.push(a+o.uni_forceverify),t.components.push(a+o.lib_rsa),t.components.push(a+o.idcard_validate),e.cache&&t.loadPass(),t},passport.pop=passport.pop||{},passport.pop.insertScript||(passport.pop.insertScript=function(e,t){var n=document.createElement("SCRIPT");n.type="text/javascript",n.charset="UTF-8",n.readyState?n.onreadystatechange=function(){("loaded"===n.readyState||"complete"===n.readyState)&&(n.onreadystatechange=null,t&&t())}:n.onload=function(){t&&t()},n.src=e,document.getElementsByTagName("head")[0].appendChild(n)}),passport._load||(passport._load=passport._load||function(e,t,n){var a=document,o=a.createElement("SCRIPT");if(t){o.type="text/javascript",o.charset="UTF-8";var i=e.split("?")[0],s=Math.round(1e3*Math.random()),r=(new Date).getTime();o.readyState?o.onreadystatechange=function(){if("loaded"===o.readyState||"complete"===o.readyState){if(o.onreadystatechange=null,100===s){var e=(new Date).getTime()-r;(new Image).src=document.location.protocol+"//nsclick.baidu.com/v.gif?pid=111&type=1023&url="+encodeURIComponent(i)+"&time="+e}n&&n()}}:o.onload=function(){if(100===s){var e=(new Date).getTime()-r;(new Image).src=document.location.protocol+"//nsclick.baidu.com/v.gif?pid=111&type=1023&url="+encodeURIComponent(i)+"&time="+e}n&&n()},o.src=100===s?i+"?t="+Math.random():e,a.getElementsByTagName("head")[0].appendChild(o)}else o.type="text/javascript",o.charset="UTF-8",o.src=e,a.getElementsByTagName("head")[0].appendChild(o),o.readyState?o.onreadystatechange=function(){("loaded"===o.readyState||"complete"===o.readyState)&&(o.onreadystatechange=null,n&&n())}:o.onload=function(){n&&n()}}),passport.pop.ArmorWidget||(passport.pop.ArmorWidget=function(e,t){if(window.passport_pop_ArmorWidget_instance)return{show:function(){}};window.passport_pop_ArmorWidget_instance=!0;var n={"http:":"http://passport.baidu.com","https:":"https://passport.baidu.com"}[window.location.protocol.toLowerCase()],a={uni_wrapper:[n,"/passApi/js/uni_wrapper.js?cdnversion=8082d1"].join(""),md5:[n,"/passApi/js/lib/md5.min_8c25c62.js"].join(""),uni_armorwidget:[n,"/passApi/js/uni/armorwidget_2dc156b.js"].join("")},o=null,t=t||{};o=t.cssDir?t.cssDir+"/uni_armorwidget.css?tt="+(new Date).getTime():[n,"/passApi/css/uni_armorwidget_e67ba8d.css"].join("");var i={show:function(){i.loadStyle(),i.loadScript()},loadStyle:function(){var e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.href=o,e.disabled=!1,e.setAttribute("data-for","result"),document.getElementsByTagName("head")[0].appendChild(e),delete i.loadStyle},resouses:[a.uni_wrapper,a.md5,a.uni_armorwidget,"https://passport.baidu.com/static/passpc-base/js/ld.min.js","https://wappass.baidu.com/static/waplib/moonshad.js"],loadScript:function(){i.resouses.length>0?passport.pop.insertScript(i.resouses.shift(),i.loadScript):(i.callImp(),delete i.loadScript,delete i.resouses)},callImp:function(){t.onAfterClose=function(){window.passport_pop_ArmorWidget_instance=!1};var n=passport.pop.ArmorWidgetImp;new n(e,t,!0,this)}};return t.cache&&i.loadStyle(),i}),!function(){var e=window.passport||{};window.upSmsDialog_afterRender=0,e.upSmsDialog=function(t){var n=this;this.domain={"http:":"http://passport.baidu.com","https:":"https://passport.baidu.com"}[window.location.protocol.toLowerCase()],this.conf=this.asyncOptions({el:"",dymicNum:"222222",dymicPhone:"1069 1661 4912 0000 06",sigin:"9999"},t),this.dataStore={sigin:"",dymicNum:"111111",dymicPhone:"1069 1661 4912 0000 06"},this.httpStore={setChannelUrl:e.requestDomain||this.domain.https+"/v3/login/getChannel",createChannelUrl:e.requestDomain||this.domain.https+"/channel/unicast"},this.eleprefix="baidu_upsms_"+Date.now(),this.base={setId:function(e){return n.eleprefix+"_"+e},getEleById:function(e){return document.getElementById(this.setId(e))},show:function(e){document.getElementById(this.setId(e))&&(document.getElementById(this.setId(e)).style.display="block")},hide:function(e){document.getElementById(this.setId(e))&&(document.getElementById(this.setId(e)).style.display="none")},addEvent:function(e,t,n){return e?void(e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n):!1},unEvent:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null}},this.parentBoxEle=document.getElementById(this.conf.el||"")||document.body,this.init=function(){window.upSmsDialog_afterRender++,e.upSmsDialog_afterRender>=2||(this.inertCss(),this.inertHTMLBody(this.setEvent))},this.inertHTMLBody=function(e){var t=['<div class="upsms-dialog-wrapper" id="',this.base.setId("upsms-dialog-wrapper"),'"><div class="upsms-dialog-body" id="',this.base.setId("upsms-dialog-body"),'"><h3 class="upsms-dialog-title">安全提示</h3>','<p class="upsms-dialog-content">您当前的操作存在风险,请用该手机号发送短信<b class="color-b" id="',this.base.setId("upsms-dialog-dymicNum"),'">',this.dataStore.dymicNum,'</b>到<b class="color-b" id="',this.base.setId("upsms-dialog-dymicPhone"),'">',this.dataStore.dymicPhone,'</b>继续验证</p><button class="upsms-dialog-btn" id="',this.base.setId("upsms-dialog-btn"),,'">确定</button></div></div>'];window.upSmsDialog_afterRender<2&&(this.parentBoxEle.insertAdjacentHTML("beforeend",t.join("")),e&&"function"==typeof e&&e())},this.inertCss=function(){var e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.href=[this.domain.https,"/passApi/css/upsms_dialog_8ca74a5.css"].join(""),e.disabled=!1,document.getElementsByTagName("head")[0].appendChild(e)},this.setEvent=function(){n.base.addEvent(n.base.getEleById("upsms-dialog-btn"),"click",function(){n.base.hide("upsms-dialog-wrapper"),n.conf.closeDialogFn&&"function"==typeof n.conf.closeDialogFn&&n.conf.closeDialogFn()})},this.showUpSmsDialog=function(e){var t={from:e.from||"init_sence",phoneVal:e.phoneVal||""};n._setChannel(t)},this.upSmsDone=function(e){n.conf.upSmsSuccessFn&&"function"==typeof n.conf.upSmsSuccessFn&&n.conf.upSmsSuccessFn(e,n.dataStore),n._stopChannel()},this.upSmsFail=function(e){n.conf.upSmsFailFn&&"function"==typeof n.conf.upSmsFailFn&&n.conf.upSmsFailFn(e),n._stopChannel()},this.hideUpSmsDialogFn=function(){n.base.hide("upsms-dialog-wrapper")},this.init()};var t=e.upSmsDialog;t.prototype={asyncOptions:function(e,t){var n={};if("[object Object]"!==Object.prototype.toString.call(e)&&(n={conf:e}),"[object Object]"!==Object.prototype.toString.call(t))n[t]=t;else{n=e;for(var a in t)if(t.hasOwnProperty(a)){var o=!1;for(var i in n)a===i&&t[a]!==n[i]&&(n[i]=t[a],o=!0);o||n[a]||(n[a]=t[a])}}return n},_SBCtoDBC:function(e){var t="";if(e){for(var n=e.length,a=0;n>a;a++){var o=e.charCodeAt(a);o=o>=65281&&65374>=o?o-65248:o,o=12288===o?32:o,t+=String.fromCharCode(o)}return t}},guideRandom:function(){return"xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,n="x"===e?t:3&t|8;return n.toString(16)}).toUpperCase()},_setChannel:function(e){function t(){n.base.getEleById("upsms-dialog-dymicNum")&&(n.base.getEleById("upsms-dialog-dymicNum").innerText=n.dataStore.dymicNum),n.base.getEleById("upsms-dialog-dymicPhone")&&(n.base.getEleById("upsms-dialog-dymicPhone").innerText=n.dataStore.dymicPhone),n.base.show("upsms-dialog-wrapper"),n.dataStore.sigin&&n._createChannel(n.dataStore.sigin,e)}var n=this;if(n._stopChannel(),n.conf.ajaxFn&&"function"==typeof n.conf.ajaxFn){var a={from:e.from,data:n._SBCtoDBC(e.phoneVal),typenode:"_setChannel"};n.conf.ajaxFn(n.httpStore.setChannelUrl,a,function(e){var a=e;a.captcha&&(n.dataStore.dymicNum=a.captcha),a.channelCode&&(n.dataStore.dymicPhone=(a.channelCode+"").replace(/\s/g,"").replace(/(.{4})/g,"$1 ")),a.channelId&&(n.dataStore.sigin=n.dataStore.upsms_id=a.channelId),t()},function(e){n.upSmsFail({errcode:e.errno||503,errType:"_setChannel_ajaxFn_err",msg:"上行短信失败(503)",type:"_setChannel_fail"})})}else n.dataStore.dymicNum=n.conf.dymicNum,n.dataStore.dymicPhone=n.conf.dymicPhone,n.dataStore.sigin=n.dataStore.upsms_id=n.conf.sigin,t()},_stopChannel:function(){this.dataStore.sigin&&(this.dataStore.sigin="")},_createChannel:function(e,t){var n=this;if(!n.dataStore.sigin)return!1;var a=e||n.dataStore.sigin,o=t.product||"pp",i=n.httpStore.createChannelUrl+"?channel_id="+a+"&gid="+(n.guideRandom()||"")+"&tpl="+o+"&_sdkFrom=1";if(n.conf.ajaxFn&&"function"==typeof n.conf.ajaxFn){var s={apiver:"v3",tt:(new Date).getTime(),typenode:"_createChannel"};n.conf.ajaxFn(i,s,function(e){function a(e){e.channel_v&&e.channel_v.u&&(e.channel_v.u=decodeURIComponent(e.channel_v.u)),0===+e.errno&&1===+e.channel_v?n.upSmsDone(e):n.dataStore.sigin&&n._createChannel(n.dataStore.sigin,t)}e?a(e):n.upSmsFail({errcode:502,errType:"_createChannel request err",msg:"上行短信失败(502)",type:"_createChannel_fail"})},function(){n.upSmsFail({errcode:501,errType:"ajaxFn_err_2",msg:"上行短信失败(501)",type:"_createChannel_fail2"})})}else n._stopChannel()}},t.instance=null,t.createInstance=function(e){return t.instance||(t.instance=new t(e)),t.instance}}(); |