/* 未能缩小。正在返回未缩小的内容。 (1003,126-127): run-time error JS1003: Expected ':': } (3736,19785-19786): run-time error JS1195: Expected expression: ) (3736,19787-19788): run-time error JS1195: Expected expression: > (3736,19823-19824): run-time error JS1195: Expected expression: , (3736,20224-20225): run-time error JS1195: Expected expression: > (3736,20337-20338): run-time error JS1195: Expected expression: > (3736,20789-20790): run-time error JS1195: Expected expression: ) (3736,20802-20803): run-time error JS1195: Expected expression: > (3736,20867-20868): run-time error JS1195: Expected expression: ) (3736,20868-20869): run-time error JS1004: Expected ';': : (3736,20873-20874): run-time error JS1002: Syntax error: } (3736,20952-20953): run-time error JS1002: Syntax error: } (3736,20975-20976): run-time error JS1195: Expected expression: ) (3736,20976-20977): run-time error JS1004: Expected ';': { (3736,21026-21027): run-time error JS1195: Expected expression: ) (3736,21044-21045): run-time error JS1004: Expected ';': : (3736,21076-21077): run-time error JS1004: Expected ';': : (3736,21103-21104): run-time error JS1197: Too many errors. The file might not be a JavaScript file: ( */ var account = window.account || {}; //之前ssl生成的公钥,复制的时候要小心不要有空格 var pubKey = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmVpPYSZJNv38ssIQbf3o7Ea8iMr2QI1iT6MYDpZTKYIfxtRMbJIFNsez0fgFu9S0m732QOxswAObK/m1e0AKn7wtQXC+L7bG9ug2tlrnL7eO/vg22PfQZptqgbNP/yXq1McS2gEV1Yk9pmajsTlJBunaxgCyP7xlFaPTyQBhOiTm06vbNwrTQqKjAqhLz3ADz/Xzbx2UeBEJsZtmcurWdwt3oWo0/sO68B9D4kkt4Iycsd1gbpMGCJP4nLP5s/jS9E1j0OTWtNlNzlAHPdenjJzEjGwbeODKlVOaXFJLNzcerKPIG38oygETblIAhQYwm4xDAhFo9tuPEhoN3N78bQIDAQAB'; account.login = function () { var encryptor = new JSEncrypt(); // 创建加密对象实例 encryptor.setPublicKey(pubKey);//设置公钥 this.returnUrl = ""; //用于微信公众号绑定 this.open_key = ""; this.third_type = ""; var isShowImgCode = $("#div_ValidateCode:visible").length > 0; var initPage = function () { $('.form-tab .tab-item').click(function () { var formMark = $(this).data('bind'); $('.form-tab .tab-item').removeClass('tab-checked'); $(this).addClass('tab-checked'); var $target = $('.form-tab-wrap .form[data-bind=' + formMark + ']'); if ($target.length === 1) { $('.form-tab-wrap .form').addClass('form-hide'); $target.removeClass('form-hide'); $target.show(); } setTimeout(function () { $(".imgVerify:visible").click(); }, 100); }); $('.ele_header .ele_account').click(function () { var formMark = $(this).data('bind'); $('.ele_header .ele_account').removeClass('hide'); $(this).addClass('hide'); var $target = $('.ele_main .form[data-bind=' + formMark + ']'); if ($target.length === 1) { $('.ele_main .form').addClass('form-hide'); $target.removeClass('form-hide'); $target.show(); } setTimeout(function () { $(".imgVerify:visible").click(); }, 100); }); $(".ckdiv").click(function () { if ($(this).find("i.checked").length > 0) { $(this).find("i").removeClass("checked"); } else { $(this).find("i").addClass("checked"); } }) $("#txt_ValidateCode1,#txt_ValidateCode").blur(function () { var val = $.trim($(this).val()); if (val.length != 4) { openInfo("请填写4位验证码,看不清请点击图片刷新"); } else { } }); $("#txtMobileCode").blur(function () { var val = $.trim($(this).val()); if (val.length != 6) { openInfo("请填写您收到的6位手机验证码"); return; } }); $("#txt_Mobile").blur(function () { var val = $.trim($(this).val()); if (val == "") { openInfo("请填写您的手机号码"); return; } if (!isMobile(val)) { openInfo("请填写正确的手机号码"); return; } }); }; var doLogin = function () { $("div.ele_third_block a").click(function () { if ($(".js-checked-xy:checked").length == 0) { yb.error("请阅读并勾选页面协议"); return false; } }) $("#btn_Submit").on("click", function () { var $this = $(this); if ($this.data("isloading") == true) { return; } var postData = {}; var loginType = $(".js-form-default:visible").length > 0 ? 0 : 1; if (!checkInput(loginType)) { return; } if ($(".js-checked-xy:checked").length == 0) { openInfo("请阅读并勾选页面协议"); return; } if (loginType == 0) { var userName = $.trim($("#txt_AccountName").val()); var pwd = $.trim($("#txt_Password").val()); pwd = encryptor.encrypt(pwd); // 对密码进行加密 var imgCode = $.trim($("#txt_ValidateCode").val()); var isRemembered = $(".ckdiv i").hasClass("checked"); var ThirdAccountInfo = $("#hfThirdAccountInfo").val(); postData = { UserName: userName, Password: pwd, isRemembered: isRemembered, ImageCode: imgCode, LoginType: 0, open_key: account.login.open_key, third_type: account.login.third_type }; } else { var mobile = $.trim($("#txt_Mobile").val()); var smsCode = $.trim($("#txtMobileCode").val()); var imgCode = $.trim($("#txt_ValidateCode1").val()); postData = { Mobile: mobile, SMSCode: smsCode, ImageCode: imgCode, LoginType: 1, open_key: account.login.open_key, third_type: account.login.third_type}; } $this.data("isloading", true); postData["__RequestVerificationToken"] = $("[name=__RequestVerificationToken]").val(); $.ajax({ url: "/login.html", type: "post", dateType: "json", data: postData, success: function (d) { if (d.code < 0) { if (d.msg.indexOf("注销")>-1) { $("#dialog__islogout").show(); return; } else { openInfo(d.msg); $(".imgVerify:visible").click(); if (loginType == 0 && d.is_show_imgcode && isShowImgCode == false) { $(".js_div_validate").show(); isShowImgCode = true; } return; } } if (d.account_type == 2) {//admin if (account.login.returnUrl == '' || account.login.returnUrl.indexOf('admin.') == -1) { window.location.href = "//admin" + global_conf.domain; return; } } if (d.account_type == 3) {//store if (account.login.returnUrl == '' || account.login.returnUrl.indexOf('yaodian.') == -1) { window.location.href = "//yaodian" + global_conf.domain; return; } } if (d.account_type == 6) {//合伙人商家后台 if (account.login.returnUrl == '' || account.login.returnUrl.indexOf('partner.') == -1) { window.location.href = "//partner" + global_conf.domain; return; } } var returnUrl = account.login.returnUrl; var reg = /.html$/; if (returnUrl != undefined && returnUrl.indexOf("?") > 0) { var index = returnUrl.lastIndexOf("?"); returnUrl = returnUrl.substring(0, index); } if (returnUrl != undefined && returnUrl.indexOf('com/medicine/') > 0 && reg.test(returnUrl)) { $.cookie("MedicineDetailIsFromLogin", 'true', { expires: 1, path: "/", domain: $("#domain").val() }); $.cookie("MedicineDetailIsFromLoginTop", 'true', { expires: 1, path: "/", domain: $("#domain").val() }); } window.location.href = account.login.returnUrl; }, error: function () { openInfo("系统错误") }, complete: function () { $this.data("isloading", false); } }) }) }; var doLogin_geetest = function (captchaObj) { var encryptor = new JSEncrypt(); // 创建加密对象实例 encryptor.setPublicKey(pubKey);//设置公钥 captchaObj.onClose(function () { // 用户把验证关闭了,这时你可以提示用户需要把验证通过后才能进行后续流程 var loginType = $(".js-form-default:visible").length > 0 ? 0 : 1; if (loginType == 0) { return openInfo('验证通过才能进行登录'); } else { return openInfo('验证通过才能发送验证码'); } }); captchaObj.onReady(function () { $("#wait").hide(); }).onSuccess(function () { var result = captchaObj.getValidate(); if (!result) { return openInfo('请完成验证'); } var postData = {}; var loginType = $(".js-form-default:visible").length > 0 ? 0 : 1; var geetest_challenge = result.geetest_challenge; var geetest_validate = result.geetest_validate; var geetest_seccode = result.geetest_seccode; if (loginType == 0) {//账户登录 var userName = $.trim($("#txt_AccountName").val()); var pwd = $.trim($("#txt_Password").val()); pwd = encryptor.encrypt(pwd); // 对密码进行加密 var imgCode = $.trim($("#txt_ValidateCode").val()); var isRemembered = $(".ckdiv i").hasClass("checked"); var ThirdAccountInfo = $("#hfThirdAccountInfo").val(); postData = { UserName: userName, Password: pwd, isRemembered: isRemembered, ImageCode: imgCode, LoginType: 0, open_key: account.login.open_key, third_type: account.login.third_type, geetest_challenge: geetest_challenge, geetest_validate: geetest_validate, geetest_seccode: geetest_seccode }; $("#btn_Submit").data("isloading", true); postData["__RequestVerificationToken"] = $("[name=__RequestVerificationToken]").val(); $.ajax({ url: "/login.html", type: "post", dateType: "json", data: postData, success: function (d) { if (d.code < 0) { openInfo(d.msg); $(".imgVerify:visible").click(); if (loginType == 0 && d.is_show_imgcode && isShowImgCode == false) { $(".js_div_validate").show(); isShowImgCode = true; } $("#btn_Submit").data("isloading", false); captchaObj.reset(); //让验证回到初始状态 return; } if (d.account_type == 2) {//admin if (account.login.returnUrl == '' || account.login.returnUrl.indexOf('admin.') == -1) { window.location.href = "//admin" + global_conf.domain; return; } } if (d.account_type == 3) {//store if (account.login.returnUrl == '' || account.login.returnUrl.indexOf('yaodian.') == -1) { window.location.href = "//yaodian" + global_conf.domain; return; } } if (d.account_type == 6) {//合伙人商家后台 if (account.login.returnUrl == '' || account.login.returnUrl.indexOf('partner.') == -1) { window.location.href = "//partner" + global_conf.domain; return; } } var returnUrl = account.login.returnUrl; var reg = /.html$/; if (returnUrl != undefined && returnUrl.indexOf("?") > 0) { var index = returnUrl.lastIndexOf("?"); returnUrl = returnUrl.substring(0, index); } if (returnUrl != undefined && returnUrl.indexOf('com/medicine/') > 0 && reg.test(returnUrl)) { $.cookie("MedicineDetailIsFromLogin", 'true', { expires: 1, path: "/", domain: $("#domain").val() }); $.cookie("MedicineDetailIsFromLoginTop", 'true', { expires: 1, path: "/", domain: $("#domain").val() }); } window.location.href = account.login.returnUrl; }, error: function () { openInfo("系统错误"); $("#btn_Submit").data("isloading", false); captchaObj.reset(); //让验证回到初始状态 }, complete: function () { //$("#btn_Submit").data("isloading", false); } }) } else {//手机号登录需要验证码 var mobile = $.trim($("#txt_Mobile").val()); var isvoice = $("#valid_type").val(); postData = { mobile: mobile, imgCode: "", isVoice: isvoice, type: 1, account_type: 1, verify_type: 2, geetest_challenge: geetest_challenge, geetest_validate: geetest_validate, geetest_seccode: geetest_seccode }; $.ajax({ url: "/common/sendmsg", type: "post", dateType: "json", data: postData, success: function (d) { if (d.code > 0) { reduceNum(isvoice); return; } openInfo(d.msg); }, error: function () { openInfo("系统错误") $(".js-login-smscode").data("isloading", false); captchaObj.reset(); }, complete: function () { $(".js-login-smscode").data("isloading", false); } }) } }); window.gt = captchaObj; $("#btn_Submit").on("click", function () { var $this = $(this); if ($this.data("isloading") == true) { return; } var loginType = $(".js-form-default:visible").length > 0 ? 0 : 1; if (!checkInput_geetest(loginType)) { return; } if ($(".js-checked-xy:checked").length == 0) { openInfo("请阅读并勾选页面协议"); return; } if (loginType == 0) { captchaObj.verify(); } else { var postData = {}; var mobile = $.trim($("#txt_Mobile").val()); var smsCode = $.trim($("#txtMobileCode").val()); //var imgCode = $.trim($("#txt_ValidateCode1").val()); postData = { Mobile: mobile, SMSCode: smsCode, ImageCode: "", LoginType: 1, verify_type: 2, open_key: account.login.open_key, third_type: account.login.third_type }; $("#btn_Submit").data("isloading", true); postData["__RequestVerificationToken"] = $("[name=__RequestVerificationToken]").val(); $.ajax({ url: "/login.html", type: "post", dateType: "json", data: postData, success: function (d) { if (d.code < 0) { if (d.msg.indexOf("注销") > -1) { $("#dialog__islogout").show(); return; } else { openInfo(d.msg); return; } } if (d.account_type == 2) {//admin if (account.login.returnUrl == '' || account.login.returnUrl.indexOf('admin.') == -1) { window.location.href = "//admin" + global_conf.domain; return; } } if (d.account_type == 3) {//store if (account.login.returnUrl == '' || account.login.returnUrl.indexOf('yaodian.') == -1) { window.location.href = "//yaodian" + global_conf.domain; return; } } if (d.account_type == 6) {//合伙人商家后台 if (account.login.returnUrl == '' || account.login.returnUrl.indexOf('partner.') == -1) { window.location.href = "//partner" + global_conf.domain; return; } } var returnUrl = account.login.returnUrl; var reg = /.html$/; if (returnUrl != undefined && returnUrl.indexOf("?") > 0) { var index = returnUrl.lastIndexOf("?"); returnUrl = returnUrl.substring(0, index); } if (returnUrl != undefined && returnUrl.indexOf('com/medicine/') > 0 && reg.test(returnUrl)) { $.cookie("MedicineDetailIsFromLogin", 'true', { expires: 1, path: "/", domain: $("#domain").val() }); $.cookie("MedicineDetailIsFromLoginTop", 'true', { expires: 1, path: "/", domain: $("#domain").val() }); } window.location.href = account.login.returnUrl; }, error: function () { $this.data("isloading", false); openInfo("系统错误") }, complete: function () { $this.data("isloading", false); } }) } }) $(".js-send-msg,.js-send-voice").on("click touchstart", function () { var $this = $(this); var isvoice = $(this).data("isvoice"); var mobile = $.trim($("#txt_Mobile").val()); if ($this.data("isloading") == true) { return; } if (mobile == "") { openInfo("请填写您的手机号码"); $("#txt_Mobile").focus(); return; } if (!isMobile(mobile)) { openInfo("请填写正确的手机号码"); $("#txt_Mobile").focus(); return; } $this.siblings("#valid_type").val(isvoice); captchaObj.verify(); }) function reduceNum(is_voice) { var $send = $(".js-send-msg"); if (is_voice == 1) { $send = $(".js-send-voice"); } var $num = $send.next().find(".js-count-num"); $send.next().show(); $send.hide(); var num = parseInt($num.text()); if (num > 1) { $num.text(num - 1); setTimeout(function () { reduceNum(is_voice); }, 1000); } else { $num.parent().hide(); if (is_voice == 1) { $send.html("重发语音").show(); $(".js-send-msg").show(); } else { $send.html("重新获取").show(); $(".js-send-voice").show(); } $num.text(60); } } }; var doGeetestStart = function () { $.ajax({ url: "/account/getStartCaptch?t=" + (new Date()).getTime(), // 加随机数防止缓存 type: "get", dataType: "json", success: function (data) { // 调用 initGeetest 进行初始化 // 参数1:配置参数 // 参数2:回调,回调的第一个参数验证码对象,之后可以使用它调用相应的接口 if (data.result.success == 1) { initGeetest({ gt: data.result.gt, challenge: data.result.challenge, offline: !data.result.success, // 表示用户后台检测极验服务器是否宕机 product: "bind", // 产品形式,包括:bind,popup width: "300px", https: true, //area: '#geetest', }, doLogin_geetest); } else { initGeetest({ gt: data.result.gt, challenge: data.result.challenge, offline: !data.result.success, // 表示用户后台检测极验服务器是否宕机 new_captcha: data.result.new_captcha, // 用于宕机时表示是新验证码的宕机 product: "bind", // 产品形式,包括:bind,popup width: "300px", https: true, //area: '#geetest' }, doLogin_geetest); } } }); }; function hide_error() { // $("#div_error").hide(); } function checkInput(type) { if (type == 0) { var userName = $.trim($("#txt_AccountName").val()); var pwd = $.trim($("#txt_Password").val()); var imgCode = $.trim($("#txt_ValidateCode").val()); if (userName == "") { openInfo("请输入完整用户登录信息!") return false; } if (pwd == "") { openInfo("请输入完整用户登录信息!") return false; } if (isShowImgCode) { if (imgCode == "") { openInfo("请输入图形验证码!") return false; } } } else { var val = $.trim($("#txt_Mobile").val()); var imgCode = $.trim($("#txt_ValidateCode1").val()); var smsCode = $.trim($("#txtMobileCode").val()); if (val == "") { openInfo("请填写您的手机号码"); return false; } if (!isMobile(val)) { openInfo("请填写正确的手机号码"); return false; } if (imgCode == "") { openInfo("请输入图形验证码!") return false; } if (type != 2) { if (smsCode == "") { openInfo("请输入短信验证证码!") return false; } } } return true; } function checkInput_geetest(type) { if (type == 0) { var userName = $.trim($("#txt_AccountName").val()); var pwd = $.trim($("#txt_Password").val()); var imgCode = $.trim($("#txt_ValidateCode").val()); if (userName == "") { openInfo("请输入完整用户登录信息!") return false; } if (pwd == "") { openInfo("请输入完整用户登录信息!") return false; } if (isShowImgCode) { if (imgCode == "") { openInfo("请输入图形验证码!") return false; } } } else { var val = $.trim($("#txt_Mobile").val()); var smsCode = $.trim($("#txtMobileCode").val()); if (val == "") { openInfo("请填写您的手机号码"); return false; } if (!isMobile(val)) { openInfo("请填写正确的手机号码"); return false; } if (type != 2) { if (smsCode == "") { openInfo("请输入短信验证证码!") return false; } } } return true; } return { init: function () { initPage(); sendMsg.init(); doLogin(); }, geetest_init: function () { doGeetestStart(); initPage(); } } }(); account.mobileRegister = function () { function checkInput(type) { var val = $.trim($("#txt_Mobile").val()); var imgCode = $.trim($("#txt_ValidateCode1").val()); var smsCode = $.trim($("#txtMobileCode").val()); if (val == "") { openInfo("请填写您的手机号码"); return false; } if (!isMobile(val)) { openInfo("请填写正确的手机号码"); return false; } if (imgCode == "") { openInfo("请输入图形验证码!") return false; } if (type != 2) { if (smsCode == "") { openInfo("请输入短信验证证码!") return false; } } return true; } var doLogin = function () { $("#txt_ValidateCode1").blur(function () { var val = $.trim($(this).val()); if (val.length != 4) { openInfo("请填写4位验证码,看不清请点击图片刷新"); } else { } }); $("#txtMobileCode").blur(function () { var val = $.trim($(this).val()); if (val.length != 6) { openInfo("请填写您收到的6位手机验证码"); return; } }); $("#txt_Mobile").blur(function () { var val = $.trim($(this).val()); if (val == "") { openInfo("请填写您的手机号码"); return; } if (!isMobile(val)) { openInfo("请填写正确的手机号码"); return; } $.get("/common/isMobileExist", { mobile: val }, function (d) { if (d.code > 0 && d.result) { openInfo("手机号已注册,请更换"); } }); }); $(".js-login-submit").on("click", function () { var $this = $(this); if ($this.data("isloading") == true) { return; } var postData = {}; var loginType = 1; if (!checkInput(loginType)) { return; } var mobile = $.trim($("#txt_Mobile").val()); var smsCode = $.trim($("#txtMobileCode").val()); var imgCode = $.trim($("#txt_ValidateCode1").val()); postData = { Mobile: mobile, SMSCode: smsCode, ImageCode: imgCode, LoginType: 1 }; $this.data("isloading", true); postData["__RequestVerificationToken"] = $("[name=__RequestVerificationToken]").val(); $.ajax({ url: "/account/mobileregister", type: "post", dateType: "json", data: postData, success: function (d) { if (d.code < 0) { openInfo(d.msg); return; } window.location.href = "//m" + global_conf.domain +"/account/RegisterSuccess"; }, error: function () { openInfo("系统错误") }, complete: function () { $this.data("isloading", false); } }) }) }; return { init: function () { doLogin(); sendMsg.init(); } } }(); account.mobileForgetPsw = function () { var doSend = function () { $("#txt_ValidateCode1").blur(function () { var val = $.trim($(this).val()); if (val.length != 4) { openInfo("请填写4位验证码,看不清请点击图片刷新"); } else { } }); $("#txtMobileCode").blur(function () { var val = $.trim($(this).val()); if (val.length != 6) { openInfo("请填写您收到的6位手机验证码"); return; } }); $("#txt_Mobile").blur(function () { var val = $.trim($(this).val()); if (val == "") { openInfo("请填写您的手机号码"); return; } if (!isMobile(val)) { openInfo("请填写正确的手机号码"); return; } }); $("#txt_Email").blur(function () { var val = $.trim($(this).val()); if (val == "") { openInfo("请填写您注册的信箱"); return false; } if (!isEmail(val)) { openInfo("请填写正确的邮箱格式"); return; } }) } return { init: function () { doSend(); sendMsg.init(); }, init_geetest: function () { doSend(); sendMsg.init_geetest(); } } }(); account.venderLogin = function () { function checkInput(type) { var val = $.trim($("#txt_Mobile").val()); var imgCode = $.trim($("#txt_ValidateCode1").val()); var smsCode = $.trim($("#txtMobileCode").val()); if (val == "") { openInfo("请填写您的手机号码"); return false; } if (!isMobile(val)) { openInfo("请填写正确的手机号码"); return false; } if (imgCode == "") { openInfo("请输入图形验证码!") return false; } if (type != 2) { if (smsCode == "") { openInfo("请输入短信验证证码!") return false; } } return true; } var doLogin = function () { $("#txt_ValidateCode1").blur(function () { var val = $.trim($(this).val()); if (val.length != 4) { openInfo("请填写4位验证码,看不清请点击图片刷新"); } else { } }); $("#txtMobileCode").blur(function () { var val = $.trim($(this).val()); if (val.length != 6) { openInfo("请填写您收到的6位手机验证码"); return; } }); $("#txt_Mobile").blur(function () { var val = $.trim($(this).val()); if (val == "") { openInfo("请填写您的手机号码"); return; } if (!isMobile(val)) { openInfo("请填写正确的手机号码"); return; } }); $(".js-login-submit").on("click", function () { var $this = $(this); if ($this.data("isloading") == true) { return; } var postData = {}; var loginType = 1; if (!checkInput(loginType)) { return; } var mobile = $.trim($("#txt_Mobile").val()); var smsCode = $.trim($("#txtMobileCode").val()); var imgCode = $.trim($("#txt_ValidateCode1").val()); postData = { Mobile: mobile, SMSCode: smsCode, ImageCode: imgCode, LoginType: 1 }; $this.data("isloading", true); postData["__RequestVerificationToken"] = $("[name=__RequestVerificationToken]").val(); $.ajax({ url: "/vender/login", type: "post", dateType: "json", data: postData, success: function (d) { if (d.code < 0) { openInfo(d.msg); return; } window.location.href = "//m" + global_conf.domain; }, error: function () { openInfo("系统错误") }, complete: function () { $this.data("isloading", false); } }) }) }; return { init: function () { doLogin(); sendMsg.init(); } } }(); account.venderLogin_erp = function () { function checkInput(type) { var val = $.trim($("#txt_Mobile").val()); var imgCode = $.trim($("#txt_ValidateCode1").val()); var smsCode = $.trim($("#txtMobileCode").val()); if (val == "") { openInfo("请填写您的手机号码"); return false; } if (!isMobile(val)) { openInfo("请填写正确的手机号码"); return false; } if (imgCode == "") { openInfo("请输入图形验证码!") return false; } if (type != 2) { if (smsCode == "") { openInfo("请输入短信验证证码!") return false; } } return true; } var doLogin = function () { $("#txt_ValidateCode1").blur(function () { var val = $.trim($(this).val()); if (val.length != 4) { openInfo("请填写4位验证码,看不清请点击图片刷新"); } else { } }); /*$("#txtMobileCode").blur(function () { var val = $.trim($(this).val()); if (val.length != 6) { openInfo("请填写您收到的6位手机验证码"); return; } });*/ $("#txt_Mobile").blur(function () { var val = $.trim($(this).val()); if (val == "") { openInfo("请填写您的手机号码"); return; } if (!isMobile(val)) { openInfo("请填写正确的手机号码"); return; } }); $(".js-login-submit").on("click", function () { var $this = $(this); if ($this.data("isloading") == true) { return; } var postData = {}; var loginType = 1; if (!checkInput(loginType)) { return; } var mobile = $.trim($("#txt_Mobile").val()); var smsCode = $.trim($("#txtMobileCode").val()); var imgCode = $.trim($("#txt_ValidateCode1").val()); postData = { Mobile: mobile, SMSCode: smsCode, ImageCode: imgCode, LoginType: 1 }; $this.data("isloading", true); postData["__RequestVerificationToken"] = $("[name=__RequestVerificationToken]").val(); $.ajax({ url: "/vender/login", type: "post", dateType: "json", data: postData, success: function (d) { if (d.code < 0) { openInfo(d.msg); return; } window.location.href = "//m" + global_conf.domain; }, error: function () { openInfo("系统错误") }, complete: function () { $this.data("isloading", false); } }) }) }; return { init: function () { doLogin(); sendMsg.init(); } } }(); var sendMsg = function () { var initPage = function () { $(".js-send-msg,.js-send-voice").on("click", function () { var isvoice = $(this).data("isvoice"); var $mobile = $($(this).data("mobile")); var $imgCode = $($(this).data("imgcode")); var type = $(this).data("type"); var fromType = $(this).data("fromtype"); var account_type = $(this).data("account_type") || 1; if ($mobile.length == 0) { return; } var mobile = $mobile.val(); if ($.trim(mobile) == '') { openInfo("请输入手机号");; return; } var imgCode = $imgCode.val(); if ($.trim(imgCode) == '') { openInfo("请输入图形验证码");; return; } var postData = { mobile: mobile, imgCode: imgCode, type: type, isVoice: isvoice, fromType: fromType, account_type}; $.ajax({ url: "/common/sendmsg", type: "post", dateType: "json", data: postData, success: function (d) { if (d.code > 0) { reduceNum(isvoice); return; } openInfo(d.msg); }, error: function () { openInfo("系统错误"); }, complete: function () { } }) }) } var geetest_initPage = function (captchaObj) { $(".js-send-msg,.js-send-voice").on("click", function () { var $this = $(this); var isvoice = $(this).data("isvoice"); var $mobile = $($(this).data("mobile")); var $imgCode = $($(this).data("imgcode")); var type = $(this).data("type");//3:找回密码 var fromType = $(this).data("fromtype"); var account_type = $(this).data("account_type") || 1; if ($mobile.length == 0) { return; } var mobile = $mobile.val(); if ($.trim(mobile) == '') { openInfo("请输入手机号");; return; } //var imgCode = $imgCode.val(); //if ($.trim(imgCode) == '') { // openInfo("请输入图形验证码");; // return; //} captchaObj.verify(); captchaObj.onClose(function () { // 用户把验证关闭了,这时你可以提示用户需要把验证通过后才能进行后续流程 $(".js-send-msg,.js-send-voice").data("isloading", false); return yb.error('验证通过才能发送验证码'); }); captchaObj.onReady(function () { $("#wait").hide(); }).onSuccess(function () { $this.data("isloading", true); var result = captchaObj.getValidate(); if (!result) { return yb.error('请完成验证'); } var geetest_challenge = result.geetest_challenge; var geetest_validate = result.geetest_validate; var geetest_seccode = result.geetest_seccode; var postData = { mobile: mobile, imgCode: "", type: type, fromType: fromType, account_type: 1, verify_type: 2, geetest_challenge: geetest_challenge, geetest_validate: geetest_validate, geetest_seccode: geetest_seccode }; $.ajax({ url: "/common/sendmsg", type: "post", dateType: "json", data: postData, success: function (d) { if (d.code > 0) { reduceNum(isvoice); return; } openInfo(d.msg); }, error: function () { $this.data("isloading", false); openInfo("系统错误"); }, complete: function () { $this.data("isloading", false); } }) }); }) } var doGeetestStart = function () { $.ajax({ url: "/account/getStartCaptch?t=" + (new Date()).getTime(), // 加随机数防止缓存 type: "get", dataType: "json", success: function (data) { if (data.result.success == 1) { initGeetest({ gt: data.result.gt, challenge: data.result.challenge, offline: !data.result.success, // 表示用户后台检测极验服务器是否宕机 product: "bind", // 产品形式,包括:bind,popup,float width: "300px", https: true, //area: '#geetest', }, geetest_initPage); } else { initGeetest({ gt: data.result.gt, challenge: data.result.challenge, offline: !data.result.success, // 表示用户后台检测极验服务器是否宕机 new_captcha: data.result.new_captcha, // 用于宕机时表示是新验证码的宕机 product: "bind", // 产品形式,包括:bind,popup,float width: "300px", https: true, //area: '#geetest' }, geetest_initPage); } } }); }; function reduceNum(is_voice) { var $send = $(".js-send-msg"); if (is_voice == 1) { $send = $(".js-send-voice"); } var $num = $send.next().find(".js-count-num"); $send.next().show(); $send.hide(); var num = parseInt($num.text()); if (num > 1) { $num.text(num - 1); setTimeout(function () { reduceNum(is_voice); }, 1000); } else { $num.parent().hide(); if (is_voice == 1) { $send.html("重发语音").show(); $(".js-send-msg").show(); } else { $send.html("重新获取").show(); $(".js-send-voice").show(); } $num.text(60); } } return { init: function () { initPage(); }, init_geetest: function () { doGeetestStart(); } } }(); function isMobile(strMobile) { var reg1 = /^1\d{10}$/; var my = false; if (reg1.test(strMobile)) my = true; if (!my) { return false; } return true; } function isEmail(strEmail) { if (strEmail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1) return true; else return false; } account.shopRegister = function () { this.returnUrl = ""; var initPage = function () { //入驻须知 $("#a_rzxz_open").click(function () { $(".popup[para='rzxz']").removeClass('hide'); $(".popup[para='rzxz']").css('display', 'block'); }); $("#a_rzxz_close").click(function () { $(".popup[para='rzxz']").addClass('hide'); }); //照片示例 $('.js-chakan').on('click', function () { $('.zzsl').removeClass('hide'); $('.zzsl').css('display', 'block'); }); //数据校验 $(document).on("click", function (e) { if ($(".ifg_match:visible").length > 0 && $(e.target).parents(".form-select-wrap").length == 0) { $(".ifg_match").hide() } }) $("input[type='radio'][name='optionsRadios']").on('click', function () { var type = $("input[type='radio'][name='optionsRadios']:checked").val(); if (type != null) { var inp = $("#txtEntTitle")[0]; var text = inp.value; var cktext = ["药店", "药房", "连锁", "零售 "] for (var j = 0, len = cktext.length; j < len; j++) { if (text.indexOf(cktext[j]) > -1 && type == "1") { alert("请选择正确的企业类型!"); var btn = $(this)[0]; btn.checked = false; } } } else { alert("请选择正确的企业类型!"); } }) $(".form-group input:visible").focus(function () { var cur = $(this), p = cur.parent(); p.removeClass("has-error"); if (p.next().hasClass("err-msg")) { p.next().remove(); } }) $(".form-group input:visible").blur(function () { var cur = $(this), p = cur.parent(), minlength = parseInt(cur.attr("minlength"));//, rege = cur.attr("rege") minlength = minlength || 1; var val = $.trim(cur.val()); if (val == '') { if (cur.attr("check") != 'false') { p.addClass("has-error"); p.after("
" + $(this).attr("info") + "
"); return; } } else { var rege = $.trim($(this).attr("rege")); if (!(val.length >= minlength) || !eval(rege).test(val)) {//&& (rege == "" || eval(rege).test(val)) p.addClass("has-error"); p.after("
" + $(this).attr("errinfo") + "
"); return false; } var method = cur.attr("method"); if (method && method != '') { checkHelper[method].apply(this); } } }) var timeoutNum = 0; $(".js-txtEntTitle").keyup(function (event) { if (timeoutNum > 0) { clearTimeout(timeoutNum); } timeoutNum = setTimeout(function () { startToGetEntTitle(); timeoutNum = 0; }, 300); }); $(document).on('click', '.ifg_match .form-select-item', function () { var innerTxt = $(this).find('.sel_txt').html().replace('', '').replace('', ''); if ($(this).html().indexOf('已注册') < 0) { $(".js-txtEntTitle").val(innerTxt); $(".ifg_match").hide(); var p = $(".js-txtEntTitle").parent(); if (p.hasClass('has-error')) { p.next().remove(); p.removeClass("has-error"); } } }) //上传 $(".upload-img .item .img").on("click", function () { $(this).siblings('.file').click(); }); $(".upload-img .item .file").on("change", function () { var cur = $(this), size = 4 * 1024 * 1024; if (cur[0].files.length < 1) { return; } var file = cur[0].files[0]; if (file.size > size) { msg.error("图片须4M以内!"); return; } if (typeof FileReader === undefined) { return; } var reader = new FileReader(); reader.onload = function (re) { var html = $("#tmp_suc_info").html().format(re.target.result); cur.siblings('.img').empty().append(html) cur.parent().addClass('done'); } reader.readAsDataURL(file); var formData = new FormData(); var $this = $(this); formData.append('file', this.files[0]); $.ajax({ url: '/common/uploadfile', type: 'POST', cache: false, data: formData, processData: false, contentType: false, success: function (d) { if (d.code > 0) { $this.data("server-url", d.result); } } }) }); //资质图片上传 $(".js-upload").each(function () { var input = $(this).parent().find("input[type=file]"); var imgid = $(this).find(".js-preview-img").attr("id"); var analysis = $(this).data("analysis");//是否需要解析图片 var type = $(this).data("imgtype");//图片类型 var temp = $(this).data("temp");//模板类型 input.uploadPreview({ Img: imgid, Width: "100%", Height: "100%", Size: 4 * 1024 * 1024, NeedAnalysis: analysis, type: type, isLookBigImage: true, temp: temp }); }); //上传 $(".js-upload").click(function () { $(this).parent().find("input[type=file]").click(); }) $('.settle__formGroup .tipsBox').on('click', '.tips', function () { $(this).parent().find('.example').show() }) $('.settle__formGroup .tipsBox').on('mouseleave', function () { $(this).find('.example').hide() }) $(".js_submit_rediagnosisimg").on("click", function () { var $this = $(this); if ($this.data("isloading") == true) { return; } else { $this.removeClass("disabled"); } var rel_type = $this.attr('rel'); var ret = true; $this.parents('form').find('.js-verify').each(function (i, n) { if ($(this).attr("check") != "false" || ($(this).attr("check") == "false" && $.trim($(this).val()) != "")) { var r = check_all($(this)); if (r == false) { $(this).focus(); ret = false; return false; } } }) if (ret) { var rediagnosisimg = $("#rediagnosisimg").data("server-url"); if (rediagnosisimg == undefined || rediagnosisimg == "") { var src1 = $("#upimg1").attr("src"); if (src1 != "") { alert("图1还未传完,请稍等几秒再点提交!"); } else { alert("请您上传复诊凭证"); } return; } var rediagnosisimg2 = $("#rediagnosisimg2").data("server-url"); if (rediagnosisimg2 == undefined || rediagnosisimg2 == "") { var src2 = $("#upimg2").attr("src"); if (src2 != "") { alert("图2还未传完,请稍等几秒再点提交!"); return; } } else { rediagnosisimg = rediagnosisimg + "|" + rediagnosisimg2; } var rediagnosisimg3 = $("#rediagnosisimg3").data("server-url"); if (rediagnosisimg3 == undefined || rediagnosisimg3 == "") { var src3 = $("#upimg3").attr("src"); if (src3 != "") { alert("图3还未传完,请稍等几秒再点提交!"); return; } } else { rediagnosisimg = rediagnosisimg + "|" + rediagnosisimg3; } var rediagnosisimg4 = $("#rediagnosisimg4").data("server-url"); if (rediagnosisimg4 == undefined || rediagnosisimg4 == "") { var src4 = $("#upimg4").attr("src"); if (src4 != "") { alert("图4还未传完,请稍等几秒再点提交!"); return; } } else { rediagnosisimg = rediagnosisimg + "|" + rediagnosisimg4; } var rediagnosisimg5 = $("#rediagnosisimg5").data("server-url"); if (rediagnosisimg5 == undefined || rediagnosisimg5 == "") { var src5 = $("#upimg5").attr("src"); if (src5 != "") { alert("图5还未传完,请稍等几秒再点提交!"); return; } } else { rediagnosisimg = rediagnosisimg + "|" + rediagnosisimg5; } var accountid = $("#up_accountid").val(); if (accountid == undefined || accountid == "") { alert("用户id不能为空,请刷新页面后再试"); return; } $this.data("isloading", true); $this.addClass("disabled"); var postData = { accountid: accountid, rediagnosisimg: rediagnosisimg }; $.ajax({ url: "/account/UpReDiagnosisImg", type: "post", dateType: "json", data: postData, success: function (data) { if (data.code > 0) { $(".dialog__settleExamine_admininfo_success").show(); return; } alert(data.msg); return; }, error: function () { alert("系统错误") }, complete: function () { $this.removeClass("disabled"); $this.data("isloading", false); } }) } }) //管理员身份证 $(".js_submit_sfz").on("click", function () { var $this = $(this); if ($this.data("isloading") == true) { return; } else { $this.removeClass("disabled"); } var rel_type = $this.attr('rel'); var ret = true; $this.parents('form').find('.js-verify').each(function (i, n) { if ($(this).attr("check") != "false" || ($(this).attr("check") == "false" && $.trim($(this).val()) != "")) { var r = check_all($(this)); if (r == false) { $(this).focus(); ret = false; return false; } } }) if (ret) { var imgsfz1 = ""; var imgsfz2 = ""; const serverUrl1 = $("#fu_upload_imgsfz1").attr('server-url'); const serverUrl2 = $("#fu_upload_imgsfz2").attr('server-url'); if (!serverUrl1) { imgsfz1 = $("#imgsfz1").attr('src'); } else { imgsfz1 = serverUrl1; } if (!serverUrl2) { imgsfz2 = $("#imgsfz2").attr('src'); } else { imgsfz2 = serverUrl2; } if (imgsfz1 == undefined || imgsfz1 == "") { alert("请上传身份证国徽照"); return; } if (imgsfz2 == undefined || imgsfz2 == "") { alert("请上传身份证人像照"); return; } //if (!isreal) { // alert("无法识别姓名和身份证号,请上传清晰的身份证人像照"); // return; //} $this.data("isloading", true); $this.addClass("disabled"); var postData = { real_name: $("#admin_RealName").val(), real_idcard: $("#admin_Idcard").val(), admin_sfz_front: imgsfz1, admin_sfz_reverse: imgsfz2 }; $.ajax({ url: "/account/StoreRegister_AdminIdcard", type: "post", dateType: "json", data: postData, success: function (data) { if (data.code > 0) { $(".dialog__settleExamine_admininfo_success").show(); return; } alert(data.msg); }, error: function () { alert("系统错误") }, complete: function () { $this.removeClass("disabled"); $this.data("isloading", false); } }) } }) $(".js_legal_person_submit_sfz").on("click", function () { var $this = $(this); //if ($this.data("isloading") == true) { // return; //} else { // $this.removeClass("disabled"); //} var rel_type = $this.attr('rel'); var ret = true; $this.parents('form').find('.js-verify').each(function (i, n) { if ($(this).attr("check") != "false" || ($(this).attr("check") == "false" && $.trim($(this).val()) != "")) { var r = check_all($(this)); if (r == false) { $(this).focus(); ret = false; return false; } } }) if (ret) { var imgsfz1 = ""; var imgsfz2 = ""; const serverUrl1 = $("#fu_upload_imgsfz1").attr('server-url'); const serverUrl2 = $("#fu_upload_imgsfz2").attr('server-url'); if (!serverUrl1) { imgsfz1 = $("#imgsfz1").attr('src'); } else { imgsfz1 = serverUrl1; } if (!serverUrl2) { imgsfz2 = $("#imgsfz2").attr('src'); } else { imgsfz2 = serverUrl2; } if (imgsfz1 == undefined || imgsfz1 == "") { alert("请上传身份证国徽照"); return; } if (imgsfz2 == undefined || imgsfz2 == "") { alert("请上传身份证人像照"); return; } //if (!isreal) { //alert("无法识别姓名和身份证号,请上传清晰的身份证人像照"); //return; //} $this.data("isloading", true); $this.addClass("disabled"); var legal_name = $("#admin_RealName_new").val(); var idcardno = $("#admin_Idcard").val(); var admin_guanliyuan_RealName = $("#admin_guanliyuan_RealName").val(); var image_idcard_font_url = imgsfz2; var image_idcard_back_url = imgsfz1; var valid_end_time = $("#jyxkz_end_date").val(); var valid_start_time = $("#jyxkz_start_date").val(); var sfz_address = $("#sfz_address").val(); var storeid = $("#legal_storeid").text(); var dict_shop_type = $("#shengqingleixing").text(); var dict_bool_legal_person = $("#shengqingfangshi").text(); var mobile = $("#admin_legal_mobile").val(); var email = $("#admin_legal_email").val(); var store_bank_name_no = $("#store_bank_name_no").val(); if (dict_bool_legal_person == "0" && store_bank_name_no == "") { alert("请填写开户账号"); return; } if (dict_shop_type =='' || dict_bool_legal_person =='') { alert("请选择申请类型"); return; } $.post("/account/modify_store_idcard", { storeid: storeid, image_idcard_font_url: image_idcard_font_url, image_idcard_back_url: image_idcard_back_url, valid_end_time: valid_end_time, legal_name: legal_name, idcardno: idcardno, mobile: mobile, email: email, admin_guanliyuan_RealName: admin_guanliyuan_RealName, dict_shop_type: dict_shop_type, dict_bool_legal_person: dict_bool_legal_person, store_bank_name_no: store_bank_name_no, fu_upload_imgfarenbook: "", store_faren_alipay_number: "", type: 3, valid_start_time: valid_start_time, sfz_address: sfz_address }, function (data) { if (data.code == "1") { $(".part88").hide(); $(".part3").show(); } else { alert(data.msg) } }) } }) //商家信息提交 $(".js_next").click(function () { var that = $(this); if (that.data("isloading") == true) { return; } else { that.removeClass("disabled"); } var ret = true; that.parents('form').find('.js-verify').each(function (i, n) { if ($(this).attr("check") != "false" || ($(this).attr("check") == "false" && $.trim($(this).val()) != "")) { var r = check_all($(this)); if (r == false) { $(this).focus(); ret = false; return false; } } }) if (check_storeinfo_qua() && ret) { var licenseimage = $.trim($("#fu_upload_imgyyzz").data("server-url")); var social_code = $.trim($("#yyzz_social_code").val()); var shop_register_address = $.trim($("#yyzz_shop_register_address").val()); var yyzz_start_time = $.trim($("#yyzz_start_time").val()); var yyzz_end_time = $.trim($("#yyzz_end_time").val()); var shop_title = $.trim($("#yyzz_shop_title").val()); var temp = $.trim($(".js-upload").data("temp")); var shop_phone = $.trim($("#shop_phone").val()); var postData = { licenseimage: licenseimage, social_code: social_code, shop_register_address: shop_register_address, yyzz_start_time: yyzz_start_time, yyzz_end_time: yyzz_end_time, shop_phone: shop_phone, shop_title: shop_title, temp: temp }; that.data("isloading", true); that.addClass("disabled"); $.ajax({ url: window.location.href, type: "post", dateType: "json", data: postData, success: function (d) { if (d.code < 0) { alert(d.msg); return; } else { $(".dialog__settleVerify_yyzz").show(); return; } }, error: function () { show_error("系统错误") }, complete: function () { that.removeClass("disabled"); that.data("isloading", false); } }) } }) function check_storeinfo_qua() { if ($('#imgyyzz').attr('src') == '') { alert("请上传营业执照"); return false; } if ($('#legal_imgsfz1').attr('src') == '') { alert("请上传法定代表人身份证正面国徽照"); return false; } if ($('#legal_imgsfz2').attr('src') == '') { alert("请上传法定代表人身份证反面人像照"); return false; } return true; } //提交法定代表人授权书 $("#btn_sure").click(function () { var that = $(this); if (that.data("isloading") == true) { return; } if (check_qualificatiom()) { var fu_upload_imgfarenbook = $.trim($("#fu_upload_imgfarenbook").data("server-url")); var postData = { imgfarenbook: fu_upload_imgfarenbook }; that.data("isloading", true); $.ajax({ url: window.location.href, type: "post", dateType: "json", data: postData, success: function (d) { if (d.code < 0) { alert(d.msg); return; } else { $(".dialog__settleVerify_frsqs").show(); return; } }, error: function () { alert("系统错误") }, complete: function () { that.data("isloading", false); } }) } }) function check_qualificatiom() { if ($('#imgfarenbook').attr('src') == '') { show_error("请上传法定代表人授权书"); return false; } return true; } //药品经营许可证提交 $("#btn_ypjyxkz_submit").click(function () { var $this = $(this); if ($this.data("isloading") == true) { return; } else { $this.removeClass("disabled"); } var ret = true; $this.parents('form').find('.js-verify').each(function (i, n) { if ($(this).attr("check") != "false" || ($(this).attr("check") == "false" && $.trim($(this).val()) != "")) { var r = check_all($(this)); if (r == false) { if ($(this).attr("id").indexOf("date") == -1) { $(this).focus(); } ret = false; return false; } } }) var postData = {}; var image = $.trim($("#fu_upload_imgjyxkz").data("server-url")); var licence_code = $.trim($("#jyxkz_licence_code").val()); var legal_person = $.trim($("#jyxkz_legal_person").val()); var charge_person = $.trim($("#jyxkz_charge_person").val()); var quality_leader = $.trim($("#jyxkz_quality_leader").val()); var start_date = $.trim($("#jyxkz_start_date").val()); var end_date = $.trim($("#jyxkz_end_date").val()); var scope = $.trim($("#jyxkz_scope").val()); var license_issuer = $.trim($("#jyxkz_license_issuer").val()); var register_address = $.trim($("#jyxkz_register_address").val()); var warehouse_address = $.trim($("#jyxkz_warehouse_address").val()); var operate_address = $.trim($("#jyxkz_operate_address").val()); var shop_title = $.trim($("#jyxkz_shop_title").val()); postData = { image: image, licence_code: licence_code, legal_person: legal_person, charge_person: charge_person, quality_leader: quality_leader, start_date: start_date, end_date: end_date, scope: scope, license_issuer: license_issuer, register_address: register_address, warehouse_address: warehouse_address, operate_address: operate_address, shop_title: shop_title }; if (ret) { $this.data("isloading", true); $this.addClass("disabled"); $.ajax({ url: window.location.href, type: "post", dateType: "json", data: postData, success: function (d) { if (d.code < 0) { if (d.code == -3) { $("#dialog_automatic_error").show(); } else { alert(d.msg); } return; } else { $("#dialog__settleVerify_ypjyxkz").show(); $(".dialog__settleVerify_ypjyxkz").show(); return; } }, error: function () { alert("系统错误") }, complete: function () { $this.removeClass("disabled"); $this.data("isloading", false); } }) } }) //执业药师提交 $("#btn_zyyszcz_submit").click(function () { var $this = $(this); if ($this.data("isloading") == true) { return; } else { $this.removeClass("disabled"); } var ret = true; $this.parents('form').find('.js-verify').each(function (i, n) { if ($(this).attr("check") != "false" || ($(this).attr("check") == "false" && $.trim($(this).val()) != "")) { var r = check_all($(this)); if (r == false) { $(this).focus(); ret = false; return false; } } }) var postData = {}; var image = $.trim($("#fu_upload_imgzyys").data("server-url")); var pharmacist_name = $.trim($("#zyys_pharmacist_name").val()); var identification_code = $.trim($("#zyys_pharmacist_identification_code").val()); var register_code = $.trim($("#zyys_register_code").val()); var authorized_code = $.trim($("#zyys_authorized_code").val()); var address = $.trim($("#zyys_address").val()); var dict_practice_type = $.trim($("#zyys_dict_practice_type").val()); var pharmacist_range = $.trim($("#zyys_pharmacist_range").val()); var practice_unit = $.trim($("#zyys_practice_unit").val()); var register_time = $.trim($("#zyys_register_time").val()); var valid_time = $.trim($("#zyys_valid_time").val()); postData = { image: image, pharmacist_name: pharmacist_name, identification_code: identification_code,register_code: register_code, authorized_code: authorized_code, address: address, dict_practice_type: dict_practice_type, pharmacist_range: pharmacist_range, practice_unit: practice_unit, register_time: register_time, valid_time: valid_time }; if (ret) { $this.data("isloading", true); $this.addClass("disabled"); $.ajax({ url: window.location.href, type: "post", dateType: "json", data: postData, success: function (d) { if (d.code < 0) { alert(d.msg); return; } else { $("#dialog__settleVerify_zyys").show(); $(".dialog__settleVerify_zyys").show(); return; } }, error: function () { alert("系统错误") }, complete: function () { $this.removeClass("disabled"); $this.data("isloading", false); } }) } }) $("#btn_ypjyxkz_sure,#btn_zyys_sure,#btn_license_sure").click(function () { $(this).parents(".dialog").hide(); window.location.href = "//reg" + global_conf.domain + "/account/StoreRegister_guide/" }) $("#chakanshili").on("click", function () { $("#chakanshili").css("display", "none"); }) //地址信息js //var idpaths = []; //var accountAddress; //$("#accountProvince").click(function () { // if ($("#accountProvince option:selected").val() == "-1" && $("#accountProvince").attr("check") == "false") { // return; // } // $(this).parent().next().removeClass("err").removeClass("ok").addClass("focus").html("" + $("#accountProvince").attr("info")).show(); //}); //$("#accountProvince").change(function () { // var regionId = $("#accountProvince option:selected").val(); // if (regionId == "-1") { // $("#accoutCity").addClass("disp").removeClass("nodisp"); // $("#accountDistrict").addClass("disp").removeClass("nodisp"); // $("#txtAddress").val(""); // $("#accoutCity").empty(); // $("#accountDistrict").empty(); // $("#txtAddress").attr("disabled", "disabled"); // if ($("#accountProvince").attr("check") == "false") { // $(this).parent().nextAll(".oninfo").eq(0).removeClass("err").removeClass("ok").addClass("focus").html("").hide(); // $("#txtAddress").parent().nextAll(".oninfo").eq(0).removeClass("err").removeClass("ok").addClass("focus").html("").hide(); // $("#txtAddress").attr("disabled", "disabled").css("background", "#fbfbfb"); // return; // } // return false; // } // $.getJSON("/common/getRegionByParentid", { regionId: regionId }, function (json) { // if (json.code > 0 && json.result.length > 0) { // $("#accoutCity").removeClass("disp"); // $("#accountDistrict").removeClass("disp"); // $("#accoutCity").addClass("disp"); // $("#accountDistrict").addClass("disp"); // $("#accoutCity").empty(); // $("").text("-请选择-").attr("value", "-1").appendTo("#accoutCity"); // $.each(json.result, function (i, n) { // $("").text(n.region_name).attr("value", n.id).appendTo("#accoutCity"); // }) // if (idpaths.length > 2) { // $("#accoutCity").val(idpaths[2]); // $("#accoutCity").change(); // } // $("#accoutCity").removeClass("disp").addClass("nodisp"); // $("#accoutCity")[0].focus(); // $("#txtAddress").val($("#accountProvince option:selected").text()); // $("#txtAddress").attr("disabled", "disabled").css("background", "#fbfbfb"); // } else { // $("#accoutCity").addClass("disp"); // $("#accountDistrict").addClass("disp"); // } // }) //}) ////个人选择县 //$("#accoutCity").change(function () { // var regionId = $("#accoutCity option:selected").val(); // if (regionId == "-1") { // $("#accountDistrict").removeClass("nodisp").addClass("disp"); // $("#accountDistrict").empty(); // $("#txtAddress").val($("#accountProvince option:selected").text()); // $("#accountDistrict").addClass("disp").removeClass("nodisp"); // $("#txtAddress").attr("disabled", "disabled").css("background", "#fbfbfb"); // return false; // } // $.getJSON("/common/getRegionByParentid", { regionId: regionId }, function (json) { // if (json.code > 0 && json.result.length > 0) { // $("#accountDistrict").empty(); // $("").text("-请选择-").attr("value", "-1").appendTo("#accountDistrict"); // $.each(json.result, function (i, n) { // $("").text(n.region_name).attr("value", n.id).appendTo("#accountDistrict"); // }) // $("#accountDistrict").removeClass("disp").addClass("nodisp"); // $("#txtAddress").val($("#accountProvince option:selected").text() + $("#accoutCity option:selected").text()); // if (idpaths.length > 3) { // $("#accountDistrict").val(idpaths[3]); // $("#accountDistrict").change(); // } // } else { // $("#accountDistrict").addClass("disp").removeClass("nodisp"); // $("#accountDistrict").empty(); // if (regionId == -1) { // $("#txtAddress").val($("#accountProvince option:selected").text()); // $("#txtAddress").attr("disabled", "disabled").css("background", "#fbfbfb"); // //$("#txtAddress").parent().next().removeClass("err").removeClass("ok").addClass("focus").html("请进一步完善地址信息").show(); // } // else { // $("#txtAddress").val($("#accountProvince option:selected").text() + $("#accoutCity option:selected").text()); // $("#txtAddress").removeAttr("disabled").css("background", "#fff"); // $("#accountProvince").parent().next().removeClass("err").removeClass("focus").addClass("ok").html(" ").show(); // // $("#txtAddress").parent().next().removeClass("err").removeClass("ok").addClass("focus").html("请进一步完善地址信息").show(); // $("#hf_accountRegionId").val(regionId); // } // } // }) //}); //$("#accountDistrict").change(function () { // var regionId = $("#accoutCity option:selected").val(); // var Districtregionid = $("#accountDistrict option:selected").val(); // if (Districtregionid != -1) { // $("#txtAddress").removeAttr("disabled").css("background", "#fff"); // $("#accountProvince").parent().next().removeClass("err").removeClass("focus").addClass("ok").html(" ").show(); // $("#txtAddress").val($("#accountProvince option:selected").text() + $("#accoutCity option:selected").text() + $("#accountDistrict option:selected").text()); // $("#hf_accountRegionId").val(Districtregionid); // } else { // $("#txtAddress").attr("disabled", "disabled").css("background", "#fbfbfb"); // $("#txtAddress").val($("#accountProvince option:selected").text() + $("#accoutCity option:selected").text()); // //$("#txtAddress").parent().next().removeClass("err").removeClass("ok").addClass("focus").html("请进一步完善地址信息").show(); // } //}); //$.getJSON("/common/getRegionByParentid", { regionId: 4947 }, function (json) { // if (json.code > 0) { // $("#accountProvince").empty(); // $("").text("-请选择-").attr("value", "-1").appendTo("#accountProvince"); // $.each(json.result, function (i, n) { // $("").text(n.region_name).attr("value", n.id).appendTo("#accountProvince"); // }) // if (idpaths.length > 1) { // $("#accountProvince").val(idpaths[1]); // $("#accountProvince").change(); // } // } else { // $("#accoutCity").addClass("disp"); // $("#accountDistrict").addClass("disp"); // } //}); }; function startToGetEntTitle() { var sEntTitleValue = $.trim($(".js-txtEntTitle").val()); if (sEntTitleValue != "") { $.getJSON('/common/getShopListByKeyword', { keyword: sEntTitleValue } , function (json) { if (json.code > 0) { showEntTitle(json.result, sEntTitleValue); } }); } else { $('.ifg_match').hide(); } } //显示企业名称 function showEntTitle(data, keywords) { var s = ''; if (data.length>0) { $.each(data, function (i, n) { var title = n.title; var accountid = n.accountid; if (accountid == '-1') { s += ''; } else { s += ''; } s += '
' + title.replace(keywords, '' + keywords + '') + '
'; if (accountid == '-1') { s += ''; } else { s += '已注册'; } s += '
'; }) } else { $('.ifg_match').hide(); return; } $('.ifg_match').html(s); $('.ifg_match').show(); } function show_error(text) { msg.error(text); } var doRegister = function () { $(".js-submit").on("click", function () { var isremember = $('#js-remember').prop('checked') console.log(isremember) if (!isremember) { alert('请阅读并同意《药房网商城入驻用户服务协议》'); return } var failed_upload = false; $(".iform_H5 input[type='file']").each(function () { if ($(this).val() == '' && $(this).parents('.item').is(':visible') && $(this).attr('id').toLowerCase().indexOf('gsp') < 0) { failed_upload = true; return false; } }); if ($(".iform_H5 .has-error").length > 0) { msg.error('请输入完整信息'); return false; } var shop_title = $.trim($("#txtEntTitle").val()); var mobile = $.trim($("#txt_Mobile").val()); var account_name = $.trim($("#txtUserName").val()); var smscode = $.trim($("#txtMobileCode").val()); var password = $.trim($("#txtUserPass").val()); var real_name = $.trim($("#txt_RealName").val()); var real_idcard = $.trim($("#txt_RealIdcard").val()); var banklicenseimage = $.trim($("#fu_upload_khxkz").data("server-url")); var gspimage = $.trim($("#fu_upload_imggsp").data("server-url")); var licenseimage = $.trim($("#fu_upload_imgyyzz").data("server-url")); var managerproxyimage = $.trim($("#fu_upload_imgsfz").data("server-url")); var businesslicenseimage = $.trim($("#fu_upload_imgjyxkz").data("server-url")); var saleid = $.trim($("#saleid").val()); var Platform = $.trim($("#Platform").val()); //var subtype = $("input[type='radio'][name='optionsRadios']:checked").val(); var subtype = $("#shop_type").val(); if (subtype == null && shop_title != "") { msg.error("请选择正确的企业类型!"); return; } var RegionId = $.trim($("#hf_accountRegionId").val()); if (RegionId == null || RegionId == '' || RegionId == "0") { msg.error('请选择店铺所在地!'); return; } var detail_shop_address = $.trim($("#txtAddress").val()); if (detail_shop_address == "" || detail_shop_address.length<12) { msg.error('请填写详细地址'); return; } var partner_code = $.trim($("#txt_HHRCode").val()); var social_code = $.trim($("#social_code").val()); //var legal_person = $.trim($("#legal_person").val()); postData = { mobile: mobile, smscode: smscode, shop_title: shop_title, password: password, account_name: account_name, real_name: real_name, detail_shop_address: detail_shop_address, banklicenseimage: banklicenseimage, gspimage: gspimage, managerproxyimage: managerproxyimage, licenseimage: licenseimage, businesslicenseimage: businesslicenseimage, saleid: saleid, subtype: subtype, regionid: RegionId, partner_code: partner_code, social_code: social_code, legal_person: real_name, legal_person_idcard: real_idcard }; $(this).next().show(); $(this).hide(); var $this = $(this); postData["__RequestVerificationToken"] = $("[name=__RequestVerificationToken]").val(); $.ajax({ url: window.location.href, type: "post", dateType: "json", data: postData, success: function (d) { if (d.code > 0) { if (d != null && d.code == 1) { $("#zhmm").text(account_name) $(".pop_register_success").show(); return; } } if (d.code < 0) { alert(d.msg); $this.next().hide(); $this.show(); return; } }, error: function () { msg.show("系统错误") }, complete: function () { } }) }) }; //跳转完善资料 $(".quruzhu").on("click", function () { window.location.href = "//yaodian" + global_conf.domain; return; }) //资质验证 function checkMaterial() { if ($('#imgjyxkz').attr('src') == '') { show_error('请上传经营许可证'); return false; } if ($('#imgyyzz').attr('src') == '') { show_error('请上传营业执照'); return false; } if ($('#imgsfz').attr('src') == '') { show_error('请上传手持身份证照'); return false; } if ($('#imgkhxkz').attr('src') == '') { show_error('请上传开户许可证'); return false; } return true; } var doSendMsg = function () { $(".js-send-msg,.js-send-voice").on("click", function () { var $this = $(this); var isvoice = $(this).data("isvoice"); var mobile = $.trim($("#txt_Mobile").val()); if (mobile == "") { $("#txt_Mobile").focus(); return; } var imgCode = $.trim($("#txtImageCode").val()); if (imgCode == "") { $("#txtImageCode").focus(); return; } if ($this.data("isloading") == true) { return; } $this.data("isloading", true); var account_type = $(this).data("account_type") || 1; var postData = { mobile: mobile, imgCode: imgCode, type: 2, isVoice: isvoice, account_type: account_type }; $.ajax({ url: "/common/sendmsg", type: "post", dateType: "json", data: postData, success: function (d) { if (d.code > 0) { reduceNum(isvoice); return; } show_error(d.msg); }, error: function () { show_error("系统错误") }, complete: function () { $this.data("isloading", false); } }) }) } function reduceNum(is_voice) { var $send = $(".js-send-msg"); if (is_voice == 1) { $send = $(".js-send-voice"); } var $num = $send.next().find(".js-count-num"); $send.next().show(); $send.hide(); var num = parseInt($num.text()); if (num > 1) { $num.text(num - 1); setTimeout(function () { reduceNum(is_voice); }, 1000); } else { $num.parent().hide(); if (is_voice == 1) { $send.html("重发语音"); $send.show(); $(".js-send-msg").show(); } else { $send.html("重新获取").show(); $(".js-send-voice").show(); } $num.text(60); } } return { init: function () { initPage(); doRegister(); doSendMsg(); } } }(); var checkHelper = { CheckPassword: function () { var curObj = this; if ($.trim($(curObj).val()) != $.trim($(".txtUserPass").val())) { $(curObj).parent().addClass("has-error").after("
" + "两次输入的密码不一致,请重新输入" + "
"); return false; } }, CheckUserName: function () { var txtUserName = this; var accountName = $.trim($(txtUserName).val()); var accname = $.trim($(txtUserName).val().toLowerCase()); var excludeName = ["药房网", "yaofangwang", "admin", "webmaster", "管理员", "药品监督管理局", "伊邦", "国家食品药品监督管理局", "药监"] for (var i = 0; i < excludeName.length; i++) { if (accname.indexOf(excludeName[i]) >= 0) { $(txtUserName).parent().addClass("has-error"); $(txtUserName).parent().after("
" + "该用户名为系统保留,请输入其它字符!" + "
"); return; } } if (accountName != "") { $.ajax({ url: "/common/IsAccountNameExist?t=" + Date.now(), data: { account_name: accountName }, timeout: 1000, async: false, success: function (data) { if (data.result != false) { $(txtUserName).parent().addClass("has-error"); $(txtUserName).parent().after("
" + "该用户名已注册,请重新输入" + "
"); } } }); } }, CheckMobile: function (account_type) { var curObj = this; var account_type = $(curObj).data("account_type") || 1; $.ajax({ url: "/common/isMobileExist?timenow=" + Date.now(), data: { mobile: $(this).val(), account_type: account_type }, timeout: 1000, async: false, success: function (data) { if (data.result != false) { $(curObj).parent().addClass("has-error").after("
" + "该手机号已注册,请重新输入" + "
"); return false; } } }) }, CheckENTitle: function () { var timeParam = Math.round(new Date().getTime() / 1000); var curObj = this; $.ajax({ url: "/common/isExistedShopTitle?y=" + timeParam, data: { keyword: $(this).val() }, timeout: 1000, async: false, success: function (data) { if (data.result != false) { $(curObj).parent().addClass("has-error").after("
" + "该企业已注册,请重新输入" + "
"); } } }); } } account.PartnerRegister = function () { function checkInput(type) { var txtUserName = $.trim($("#txtUserName").val()); var txtUserPassword = $.trim($("#txtUserPassword").val()); var Mobile = $.trim($("#txt_Mobile").val()); var smsCode = $.trim($("#txtMobileCode").val()); var smsCode = $.trim($("#txtMobileCode").val()); var rege = $('#txtUserPassword').attr("rege"); if (!$('#js-need-check-btn').is(':checked')) { openInfo("请同意协议"); return false; } if (txtUserName == "") { openInfo("请填写您的用户名"); return false; } if (txtUserName.length < 4) { openInfo("您的用户名太短"); return false; } if (txtUserName.length > 18) { openInfo("您的用户名太长"); return false; } else { var rege = $('#txtUserName').attr("rege"); if (!eval(rege).test(txtUserName)) { openInfo("您的用户名不合法"); return false; } } if (txtUserPassword == "") { openInfo("请填写您的密码"); return false; } else { var rege = $('#txtUserPassword').attr("rege"); if (!eval(rege).test(txtUserPassword)) { openInfo("您的密码不合法"); return false; } } if (Mobile == "") { openInfo("请填写您的手机号码"); return false; } if (!isMobile(Mobile)) { openInfo("请填写正确的手机号码"); return false; } if (type != 2) { if (smsCode == "") { openInfo("请输入短信验证证码!") return false; } } return true; } var doLogin = function () { //短信验证 $(".js-send-msg").on("click", function () { var $this = $(this); var mobile = $.trim($("#txt_Mobile").val()); if (mobile == "") { $("#txt_Mobile").focus(); openInfo("请输入手机号码!") return; } if ($this.data("isloading") == true) { return; } $this.data("isloading", true); var account_type = $(this).data("account_type") || 1; var postData = { mobile: mobile }; $.ajax({ url: "/common/SendMsgOnlyMobile", type: "post", dateType: "json", data: postData, success: function (d) { if (d.code > 0) { reduceNum(); return; } yb.error(d.msg); }, error: function () { yb.error("系统错误") //openInfo("请输入短信验证证码!") }, complete: function () { $this.data("isloading", false); } }) }) //数字倒数 function reduceNum() { var $send = $(".js-send-msg"); var $num = $send.next().find(".js-count-num"); $send.next().show(); $send.hide(); var num = parseInt($num.text()); if (num > 1) { $num.text(num - 1); setTimeout(function () { reduceNum(); }, 1000); } else { $num.parent().hide(); $send.html("重新发送").show(); $num.text(60); } } $("#txt_Mobile").blur(function () { var val = $.trim($(this).val()); if (val == "") { openInfo("请填写您的手机号码"); return; } if (!isMobile(val)) { openInfo("请填写正确的手机号码"); return; } }); $(".js-region-submit").on("click touchstart", function () { var $this = $(this); if ($this.data("isloading") == true) { return; } var postData = {}; var loginType = 1; if (!checkInput(loginType)) { return; } var txtUserName = $.trim($("#txtUserName").val()); var txtUserPassword = $.trim($("#txtUserPassword").val()); var Mobile = $.trim($("#txt_Mobile").val()); var smsCode = $.trim($("#txtMobileCode").val()); var salesid = $.trim($("#aid").val()); $this.data("isloading", true); postData = { txtUserName: txtUserName, txtUserPassword: txtUserPassword, Mobile: Mobile, smsCode: smsCode, salesid: salesid }; $.ajax({ url: "/partner/PartnerRegisterF", type: "post", dateType: "json", data: postData, success: function (d) { if (d.code < 0) { openInfo(d.msg); return; } else { $('#dialog__partnerAgreementSuccess').show() } // window.location.href = "//m" + global_conf.domain + "/partner/updateadminidcard"; }, error: function () { openInfo("系统错误") }, complete: function () { $this.data("isloading", false); } }) }) }; return { init: function () { doLogin(); } } }(); account.PartnerupdateAdmInfo = function () { function checkInput(type) { var real_name = $.trim($("#admin_RealName").val()); var idcardno = $.trim($("#admin_Idcard").val()); var address = $.trim($("#address").val()); var hf_accountRegionId = $.trim($("#hf_accountRegionId").val()); var image1 = $("#fu_upload_imgsfz2").data("server-url") var image2 = $("#fu_upload_imgsfz1").data("server-url") if (real_name == "") { openInfo("请填写您的真实姓名"); return false; } if (idcardno == "") { openInfo("请填写您的身份证号码"); return false; } if (address == "") { openInfo("请填写您的代理地区居住地址"); return false; } if (image1 == "") { openInfo("请上传您的身份证人面像"); return false; } if (image2 == "") { openInfo("请上传您的身份证国徽面"); return false; } if (hf_accountRegionId == "") { openInfo("请重新选择地区"); return false; } return true; } if ($("#isDefaule").val() == "1") { $("#isDefaule").parent().toggleClass('_active') } if ($("#isDefaule").val() == "1") { $("#defaultAddress i").addClass("checked"); } else { $("#defaultAddress i").removeClass("checked"); } var regionId = 4947; var orgional_regionId = $("#hf_accountRegionId").val(); var address = $("#hd_address").val(); var addressed = false; //最新载入页面 if (address != "undefined" && address != null && address != "") { addressed = true; } $.post("/manage/address/GetRegionList", { regionId: regionId }, function (json) { if (json.code > 0) { $("#accountProvince").empty(); $.each(json.list, function (i, n) { var opt = $("

"); opt.text(n.region_name); opt.attr("province_id", n.id); opt.addClass('local_selectOption'); opt.appendTo("#accountProvince"); }); } }); $("#accountProvince").on('click', 'p', function () { if (!$(this).hasClass('_active')) { $('.local_selectOptgroup[data-key=2]').attr('data-local', '') $('.local_selectOptgroup[data-key=3]').attr('data-local', '') } regionId = $(this).attr("province_id"); $("#hf_accountRegionId").val(regionId); //清空地址 $("#txt_Address").val(null); $.post("/manage/address/GetRegionList", { regionId: regionId }, function (json) { if (json.code > 0) { localToNext() $("#accoutCity").empty(); $.each(json.list, function (i, n) { var opt = $("

"); opt.text(n.region_name); opt.attr("city_id", n.id); opt.addClass('local_selectOption'); opt.appendTo("#accoutCity"); $('.local_selectMain').scrollTop(0) }); } }) }); //个人选择县 $("#accoutCity").on('click', 'p', function () { if (!$(this).hasClass('_active')) { $('.local_selectOptgroup[data-key=3]').attr('data-local', '') } regionId = $(this).attr("city_id"); $("#hf_accountRegionId").val(regionId); $.post("/manage/address/GetRegionList", { regionId: regionId }, function (json) { if (json.code > 0) { localToNext() $('.local_selectItem a[data-key=3]').show() $("#accountDistrict").attr('data-require', 'true') $("#accountDistrict").show() $("#accountDistrict").empty(); $.each(json.list, function (i, n) { var opt = $("

"); opt.text(n.region_name); opt.attr("district_id", n.id); opt.addClass('local_selectOption'); opt.appendTo("#accountDistrict"); $('.local_selectMain').scrollTop(0) }); } else { $("#accountDistrict").attr('data-require', 'false') $("#accountDistrict").hide() $('.local_selectItem a[data-key=3]').hide() } }); }); $("#accountDistrict").on('click', 'p', function () { regionId = $(this).attr("district_id"); $("#hf_accountRegionId").val(regionId); }); $("#txt_Address").blur(function () { }); $("#dialog_mask").on('click', '.mask', function () { $("#dialog_mask").css("display", "none"); }) $("#defaultAddress i").click(function () { if ($(this).attr("class").indexOf("checked") >= 0) { $(this).removeClass("checked"); $("#isDefaule").val("0"); } else { $(this).addClass("checked"); $("#isDefaule").val("1"); } }); var doLogin = function () { $('.local__setDefault a').on('click', function () { $(this).parent().toggleClass('_active') }) $('.local_selectItem').on('click', 'a', function () { if ($(this).hasClass('_disabled')) { return false; } $(this).addClass('_active').siblings().removeClass('_active') var key = $(this).attr('data-key') var list = $(".local_selectOptgroup") list.hide() list.each(function (i, e) { if ($(e).attr('data-key') === key) { $(e).show() } }) }) $('.local_selectOptgroup').on('click', '.local_selectOption', function () { $(this).addClass('_active').siblings().removeClass('_active') var local = $(this).text() var key = +$(this).parents('.local_selectOptgroup').attr('data-key') $(this).parents('.local_selectOptgroup').attr('data-local', local) console.log(key) }) window.localToNext = function () { var key = +$('.local_selectItem').find('._active').attr('data-key') var next = $('.local_selectItem').find('a[data-key=' + (key + 1) + ']') next.removeClass('_disabled') next.trigger('click') } $('.local_selectConfirm a').on('click', function () { var result = [] var list = $('.local_selectOptgroup') var flag = true; list.each(function (i, e) { var local = $(e).attr('data-local') var require = $(e).attr('data-require') if (require === 'false') { return true } if (!local) { flag = false; } result.push(local) }) if (!flag) { return; } console.log(result) $("#bLocal").attr('value', result.join(' ')) $("#address").attr('value', result.join('')) $('.dialog__mask').hide() }) $('#bLocal').on('click', function () { reset() $(".dialog__mask").show() $(".local_select").show() }) function reset() { $('.local_selectOptgroup').each(function (i, e) { if (i === 0) { $(e).show() $(e).find('._active').removeClass('_active') } else { $(e).hide() } $(e).attr('data-require', 'true').attr('data-local', '') }) $('.local_selectItem a').each(function (i, e) { if (i === 0) { e.className = '_active' } else { e.className = '_disabled' } }) } $(".js-partner-submit").on("click touchstart", function () { var $this = $(this); if ($this.data("isloading") == true) { return; } var postData = {}; var loginType = 1; if (!checkInput(loginType)) { return; } var real_name = $.trim($("#admin_RealName").val()); var idcardno = $.trim($("#admin_Idcard").val()); var address = $.trim($("#address").val()); var hf_accountRegionId = $.trim($("#hf_accountRegionId").val()); var image1 = $("#fu_upload_imgsfz2").data("server-url"); var image2 = $("#fu_upload_imgsfz1").data("server-url"); postData = { real_name: real_name, idcardno: idcardno, address: address, image1: image1, image2:image2, hf_accountRegionId: hf_accountRegionId }; $.ajax({ url: "/partner/PartnerUpdateInfo", type: "post", dateType: "json", data: postData, success: function (d) { if (d.code < 0) { openInfo(d.msg); return; } var from = $('#js-from')[0].value; if (from == "reg") { window.location.href = "//m" + global_conf.domain + "/partner/choessModel?from=reg"; } else { window.location.href = "//m" + global_conf.domain + "/partner/RegisterMap"; } }, error: function () { openInfo("系统错误") }, complete: function () { $this.data("isloading", false); } }) }) }; return { init: function () { doLogin(); } } }(); account.Partnerchoessmodel = function () { $('#regionidtype').val("1"); $('#regionids').val(""); var doLogin = function () { var cityList = {} // 城市选择 $('.dialog__partnerSelectArea') .on('click', '.handleCityClick', function () { if (isBigSelect()) return false var name = $(this).data("id")+"|"+$(this).text() if (isOneSelect()) { var list = Object.keys(cityList) if (list.length >= 5) { openInfo("地级市代理最多只能代理5个地级市!"); // $('.handleReset').click(); // $('.handleProvinceClick[data-check="0"]').click(); return false; } } $(this).toggleClass('on') if ($(this).hasClass('on')) { cityList[name] = true } else { delete cityList[name] } changeSelect() }) // 点已选 $('.dialog__partnerSelectArea') .on('click', '.handleCitySelected', function () { if (isBigSelect()) return false var name = $(this).data("id") + "|" +$(this).text() delete cityList[name] $('.dialog__partnerSelectArea') .find('.handleCityClick[data-id=' + $(this).data("id") + ']') .removeClass('on') changeSelect() }) // 选省 $('.dialog__partnerSelectArea') .on('click', '.handleProvinceClick', function () { $('.handleReset').click(); var name = $(this).text() var type = $(this).data("check"); if (type == 0) { $(this).addClass('on') .siblings().removeClass('on') $('.dialog__partnerSelectArea') .find('.cityList') .hide() var target = $('.dialog__partnerSelectArea') .find('.cityList[data-province=' + name + ']') target.show() if (isBigSelect()) { cityList = {} // 删上一批,貌似没必要? // $('.dialog__partnerSelectArea') // .find('.handleCityClick') // .removeClass('on') target.find('.handleCityClick').each(function (i, e) { $(e).addClass('on') cityList[$(e).data("id") + "|" + $(e).text()] = true }) } changeSelect() } else { openInfo("暂不支持本省以外的城市选择"); $('.handleReset').click(); $('.handleProvinceClick[data-check="0"]').click(); } }) $('.dialog__partnerSelectArea .handleReset').on('click', reset) /*** * 创建已选的按钮 * param {string[]} arr */ function createResult(arr) { if (arr.length === 0) { return '' } var html = '' for (var i = 0; i < arr.length; i++) { html += '' + arr[i].split('|')[1] + '' } return html } /** * */ //获取地区 getRegionByParentid(); function getRegionByParentid() { var list = $('.cityList'); list.each(function (i, e) { var id = $(e).data('provinceid'); $.getJSON("/common/getRegionByParentid", { regionId: id}, function (json) { if (json.code > 0 && json.result.length > 0) { $.each(json.result, function (i, n) { $(e).append(''+n.region_name+'') }) } }) }) } function changeSelect() { var list = Object.keys(cityList) $('.handleCityList').html(createResult(list)) $('.handleCitySum').text(list.length) if (isOneSelect()) { if (list.length > 5) { openInfo("地级市代理最多只能代理5个地级市!"); $('.handleReset').click(); $('.handleProvinceClick[data-check="0"]').click(); } } } function isBigSelect() { return $('.dialog__partnerSelectArea').hasClass('bigSelect') } function isOneSelect() { return $('.dialog__partnerSelectArea').hasClass('oneSelect') } function reset() { // 市不绿 $('.dialog__partnerSelectArea') .find('.handleCityClick') .removeClass('on') // 市全隐藏 $('.dialog__partnerSelectArea') .find('.cityList') .hide() $('.dialog__partnerSelectArea') .find('.handleProvinceClick') .removeClass('on') // 已选清空 cityList = {} changeSelect() $('#regionids').val(""); } $('#js-model-type-1').on('click', function() { var bol = $(this).hasClass('on') if (!bol) { $(this).addClass('on'); $('#js-model-type-2').removeClass('on') $('#js-model-view-div1').show(); $('#js-model-view-div2').hide(); $('.js-need-show-regionname')[0].innerText = ""; $('.js-need-show-regionname')[1].innerText = ""; $('#regionidtype').val("1"); $('#regionids').val(""); $('.handleReset').click(); } }); $('#js-model-type-2').on('click', function () { var bol = $(this).hasClass('on') if (!bol) { $(this).addClass('on'); $('#js-model-type-1').removeClass('on') $('#js-model-view-div2').show(); $('#js-model-view-div1').hide(); $('.js-need-show-regionname')[0].innerText = ""; $('.js-need-show-regionname')[1].innerText = ""; $('#regionidtype').val("2"); $('.dialog__partnerSelectArea').addClass('oneSelect'); $('#regionids').val(""); $('.handleReset').click(); } }); $('#js-chose-city1').on('click', function () { $('html').css({overflow: 'hidden'}) //$('.handleReset').click(); $('#dialog__partnerSelectArea').show() $('.dialog__partnerSelectArea').removeClass('bigSelect'); $('.dialog__partnerSelectArea').removeClass('oneSelect'); $('.dialog__partnerSelectArea').addClass('oneSelect'); $('.handleProvinceClick[data-check="0"]').click(); }); $('#js-chose-city2').on('click', function () { $('html').css({ overflow: 'hidden' }) //$('.handleReset').click(); $('#dialog__partnerSelectArea').show() $('.handleProvinceClick[data-check="0"]').click(); }); $('#js-choessspan-view1').on('click', function () { var bol = $(this).hasClass('on') if (!bol) { $(this).addClass('on'); $('.handleReset').click(); $('.dialog__partnerSelectArea').addClass('oneSelect'); $('.dialog__partnerSelectArea').removeClass('bigSelect'); $('#js-choessspan-view2').removeClass('on') $('#js-span-view1').show(); $('#js-span-view2').hide(); $('.js-need-show-regionname')[0].innerText = ""; $('.js-need-show-regionname')[1].innerText = ""; $('#regionidtype').val("2"); $('.handleReset').click(); $('.handleProvinceClick[data-check="0"]').click(); $('#regionids').val(""); } }); $('#js-choessspan-view2').on('click', function () { var bol = $(this).hasClass('on') if (!bol) { $(this).addClass('on'); $('.handleReset').click(); $('.dialog__partnerSelectArea').addClass('bigSelect'); $('.dialog__partnerSelectArea').removeClass('oneSelect'); $('#js-choessspan-view1').removeClass('on') $('#js-span-view2').show(); $('#js-span-view1').hide(); $('.js-need-show-regionname')[0].innerText = ""; $('.js-need-show-regionname')[1].innerText = ""; $('#regionidtype').val("3"); $('.handleReset').click(); $('.handleProvinceClick[data-check="0"]').click(); $('#regionids').val(""); } }); $('.js-confirm-btn').on('click', function () { var $this = $(this); if ($this.data("isloading") == true) { return; } var titel = ""; var id = ""; $(".handleCitySelected").each(function (i,e) { titel += $(e).data("title") + "|"; id += $(e).data("id") + "|"; }); titel = titel.substr(0, titel.length - 1); id = id.substr(0, id.length - 1); var regionidtype = $.trim($('#regionidtype').val()); $this.data("isloading", true); postData = { regionids: id, regionidtype: regionidtype }; //查询地级市是否被占用 $.ajax({ url: "/partner/checkregions", type: "post", dateType: "json", data: postData, success: function (d) { if (d.code < 0) { openInfo(d.msg); return; } else { $('html').css({ overflow: 'visible'}) $('#regionids').val(id); $('.js-need-show-regionname')[0].innerText = titel; $('.js-need-show-regionname')[1].innerText = titel; $('.g-dialog').hide() } // window.location.href = "//m" + global_conf.domain + "/partner/CheckModel"; }, error: function () { openInfo("系统错误") }, complete: function () { $this.data("isloading", false); } }) }); function checkInput(type) { var smsCode = $.trim($("#regionids").val()); if (smsCode == "") { openInfo("请填写选择代理区域"); return false; } return true; } $(".js-submit").on("click touchstart", function () { var $this = $(this); if ($this.data("isloading") == true) { return; } var postData = {}; var loginType = 1; if (!checkInput(loginType)) { return; } var regionids = $.trim($("#regionids").val()); var regionidtype = $.trim($('#regionidtype').val()); $this.data("isloading", true); postData = { regionids: regionids, regionidtype: regionidtype }; $.ajax({ url: "/partner/updateregion", type: "post", dateType: "json", data: postData, success: function (d) { if (d.code < 0) { openInfo(d.msg); return; } var from = $('#js-from')[0].value; if (from == "reg") { window.location.href = "//m" + global_conf.domain + "/partner/CheckModel?from=reg"; } else { window.location.href = "//m" + global_conf.domain + "/partner/RegisterMap"; } }, error: function () { openInfo("系统错误") }, complete: function () { $this.data("isloading", false); } }) }) }; return { init: function () { doLogin(); } } }(); account.PartnerSign = function () { var doLogin = function () { $("#js-need-confirm").on("click touchstart", function () { var from = $('#js-from')[0].value; if (from == "reg") { window.location.href = "//m" + global_conf.domain + "/partner/Pay?from=reg"; } else { window.location.href = "//m" + global_conf.domain + "/partner/RegisterMap"; } }); $('#js-confirm-btm').on('click touchstart', function () { var $this = $(this); if ($this.data("isloading") == true) { return; } if (!$('#js-need-check-btn').is(':checked')) { openInfo("请同意协议"); return false; } $("#btn_Submit").data("isloading", true); $('#dialog__partnerAgreementWait').show() postData = {}; $.ajax({ url: "/partner/starsgin", type: "post", dateType: "json", data: postData, success: function (d) { if (d.code > 0) { $('#dialog__partnerAgreementWait').hide() $('#dialog__partnerAgreementSuccess').show() } else { $('#dialog__partnerAgreementWait').hide() $('#js-msg-text')[0].innerText = d.msg; $('#js-msg-confirm').attr("href","/partner/RegisterMap"); $('#dialog__partnerHasAgency').show() } }, error: function () { $('#dialog__partnerAgreementWait').hide() openInfo("系统错误") //openInfo("请输入短信验证证码!") }, complete: function () { $('#dialog__partnerAgreementWait').hide() $("#btn_Submit").data("isloading", false); } }) }); }; return { init: function () { doLogin(); } } }(); account.PartnerPay = function () { $(function () { var timeLeftDom = $('.js-timeleft') var create_time = $('#create_time').val(); var domain = $('#domain').val(); var stime = new Date().getTime(); var etime = new Date(create_time).getTime(); var usedTime = etime - stime+1800*1000; //两个时间戳相差的毫秒数 console.log(usedTime) if (usedTime <= 0) { timeLeftDom.html('已过期') window.location.href = 'https://m' + domain + '/partner/RegisterMap'; return } //计算出小时数 var leave1 = usedTime % (24 * 3600 * 1000); //计算天数后剩余的毫秒数 var hours = Math.floor(leave1 / (3600 * 1000)); //计算相差分钟数 var leave2 = leave1 % (3600 * 1000); //计算小时数后剩余的毫秒数 var minutes = Math.floor(leave2 / (60 * 1000)); var timeMin = minutes //计算相差秒数 var leave3 = leave2 % (60 * 1000); var timeSec = Math.floor(leave3 / (1000)); var timeLeftEvent = setInterval(function () { timeSec-- if (timeSec < 0) { timeSec = 59 timeMin-- } if (timeMin <= 0 && timeSec <= 0) { timeLeftDom.html('已过期') clearInterval(timeLeftEvent) timeLeftEvent = null return } var tpl = timeMin + '分' + timeSec + '秒' timeLeftDom.html(tpl) }, 1000); var error = $('#showerror').val(); if (error == "1") { $('#dialog__partnerHasAgency').show(); } }) var doLogin = function () { var type = $('#type').val(); if (type == 1) { window.location.href = "//m" + global_conf.domain + "/partner/success"; } }; return { init: function () { doLogin(); } } }(); ; "v0.4.7 Geetest Inc."; (function (window) { "use strict"; if (typeof window === 'undefined') { throw new Error('Geetest requires browser environment'); } var document = window.document; var Math = window.Math; var head = document.getElementsByTagName("head")[0]; function _Object(obj) { this._obj = obj; } _Object.prototype = { _each: function (process) { var _obj = this._obj; for (var k in _obj) { if (_obj.hasOwnProperty(k)) { process(k, _obj[k]); } } return this; } }; function Config(config) { var self = this; new _Object(config)._each(function (key, value) { self[key] = value; }); } Config.prototype = { api_server: 'api.geetest.com', protocol: 'http://', typePath: '/gettype.php', fallback_config: { slide: { static_servers: ["static.geetest.com", "dn-staticdown.qbox.me"], type: 'slide', slide: '/static/js/geetest.0.0.0.js' }, fullpage: { static_servers: ["static.geetest.com", "dn-staticdown.qbox.me"], type: 'fullpage', fullpage: '/static/js/fullpage.0.0.0.js' } }, _get_fallback_config: function () { var self = this; if (isString(self.type)) { return self.fallback_config[self.type]; } else if (self.new_captcha) { return self.fallback_config.fullpage; } else { return self.fallback_config.slide; } }, _extend: function (obj) { var self = this; new _Object(obj)._each(function (key, value) { self[key] = value; }) } }; var isNumber = function (value) { return (typeof value === 'number'); }; var isString = function (value) { return (typeof value === 'string'); }; var isBoolean = function (value) { return (typeof value === 'boolean'); }; var isObject = function (value) { return (typeof value === 'object' && value !== null); }; var isFunction = function (value) { return (typeof value === 'function'); }; var MOBILE = /Mobi/i.test(navigator.userAgent); var pt = MOBILE ? 3 : 0; var callbacks = {}; var status = {}; var nowDate = function () { var date = new Date(); var year = date.getFullYear(); var month = date.getMonth() + 1; var day = date.getDate(); var hours = date.getHours(); var minutes = date.getMinutes(); var seconds = date.getSeconds(); if (month >= 1 && month <= 9) { month = '0' + month; } if (day >= 0 && day <= 9) { day = '0' + day; } if (hours >= 0 && hours <= 9) { hours = '0' + hours; } if (minutes >= 0 && minutes <= 9) { minutes = '0' + minutes; } if (seconds >= 0 && seconds <= 9) { seconds = '0' + seconds; } var currentdate = year + '-' + month + '-' + day + " " + hours + ":" + minutes + ":" + seconds; return currentdate; } var random = function () { return parseInt(Math.random() * 10000) + (new Date()).valueOf(); }; var loadScript = function (url, cb) { var script = document.createElement("script"); script.charset = "UTF-8"; script.async = true; script.onerror = function () { cb(true); }; var loaded = false; script.onload = script.onreadystatechange = function () { if (!loaded && (!script.readyState || "loaded" === script.readyState || "complete" === script.readyState)) { loaded = true; setTimeout(function () { cb(false); }, 0); } }; script.src = url; head.appendChild(script); }; var normalizeDomain = function (domain) { // special domain: uems.sysu.edu.cn/jwxt/geetest/ // return domain.replace(/^https?:\/\/|\/.*$/g, ''); uems.sysu.edu.cn return domain.replace(/^https?:\/\/|\/$/g, ''); // uems.sysu.edu.cn/jwxt/geetest }; var normalizePath = function (path) { path = path.replace(/\/+/g, '/'); if (path.indexOf('/') !== 0) { path = '/' + path; } return path; }; var normalizeQuery = function (query) { if (!query) { return ''; } var q = '?'; new _Object(query)._each(function (key, value) { if (isString(value) || isNumber(value) || isBoolean(value)) { q = q + encodeURIComponent(key) + '=' + encodeURIComponent(value) + '&'; } }); if (q === '?') { q = ''; } return q.replace(/&$/, ''); }; var makeURL = function (protocol, domain, path, query) { domain = normalizeDomain(domain); var url = normalizePath(path) + normalizeQuery(query); if (domain) { url = protocol + domain + url; } return url; }; var load = function (config, send, protocol, domains, path, query, cb) { var tryRequest = function (at) { var url = makeURL(protocol, domains[at], path, query); loadScript(url, function (err) { if (err) { if (at >= domains.length - 1) { cb(true); // report gettype error if (send) { config.error_code = 508; var url = protocol + domains[at] + path; reportError(config, url); } } else { tryRequest(at + 1); } } else { cb(false); } }); }; tryRequest(0); }; var jsonp = function (domains, path, config, callback) { if (isObject(config.getLib)) { config._extend(config.getLib); callback(config); return; } if (config.offline) { callback(config._get_fallback_config()); return; } var cb = "geetest_" + random(); window[cb] = function (data) { if (data.status == 'success') { callback(data.data); } else if (!data.status) { callback(data); } else { callback(config._get_fallback_config()); } window[cb] = undefined; try { delete window[cb]; } catch (e) { } }; load(config, true, config.protocol, domains, path, { gt: config.gt, callback: cb }, function (err) { if (err) { callback(config._get_fallback_config()); } }); }; var reportError = function (config, url) { load(config, false, config.protocol, ['monitor.geetest.com'], '/monitor/send', { time: nowDate(), captcha_id: config.gt, challenge: config.challenge, pt: pt, exception_url: url, error_code: config.error_code }, function (err) {}) } var throwError = function (errorType, config) { var errors = { networkError: '缃戠粶閿欒', gtTypeError: 'gt瀛楁涓嶆槸瀛楃涓茬被鍨�' }; if (typeof config.onError === 'function') { config.onError(errors[errorType]); } else { throw new Error(errors[errorType]); } }; var detect = function () { return window.Geetest || document.getElementById("gt_lib"); }; if (detect()) { status.slide = "loaded"; } window.initGeetest = function (userConfig, callback) { var config = new Config(userConfig); if (userConfig.https) { config.protocol = 'https://'; } else if (!userConfig.protocol) { config.protocol = window.location.protocol + '//'; } // for KFC if (userConfig.gt === '050cffef4ae57b5d5e529fea9540b0d1' || userConfig.gt === '3bd38408ae4af923ed36e13819b14d42') { config.apiserver = 'yumchina.geetest.com/'; // for old js config.api_server = 'yumchina.geetest.com'; } if (isObject(userConfig.getType)) { config._extend(userConfig.getType); } jsonp([config.api_server || config.apiserver], config.typePath, config, function (newConfig) { var type = newConfig.type; var init = function () { config._extend(newConfig); callback(new window.Geetest(config)); }; callbacks[type] = callbacks[type] || []; var s = status[type] || 'init'; if (s === 'init') { status[type] = 'loading'; callbacks[type].push(init); load(config, true, config.protocol, newConfig.static_servers || newConfig.domains, newConfig[type] || newConfig.path, null, function (err) { if (err) { status[type] = 'fail'; throwError('networkError', config); } else { status[type] = 'loaded'; var cbs = callbacks[type]; for (var i = 0, len = cbs.length; i < len; i = i + 1) { var cb = cbs[i]; if (isFunction(cb)) { cb(); } } callbacks[type] = []; } }); } else if (s === "loaded") { init(); } else if (s === "fail") { throwError('networkError', config); } else if (s === "loading") { callbacks[type].push(init); } }); }; })(window);; !function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof def&&def.amd?def("GOP",t):(n=n||self).GOP=t()}(this,function(){"use strict";var uid=function(){return parseInt(1e4*Math.random())+(new Date).valueOf()},guid=function(){function n(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return function(){return n()+n()+n()+n()+n()+n()+n()+n()}}();function PureEvent(){this.t={}}function extend(n,t){for(var e in t){var o;t.hasOwnProperty(e)&&(o=t[e],n[e]=o)}}PureEvent.prototype={o:function(n,t){var e=this;return e.t[n]?e.t[n].push(t):e.t[n]=[t],e},i:function(n,t){var e=this.t[n];if(e){for(var o=0,i=e.length;o>5]|=128<>>9<<4)]=t;for(var e=1732584193,o=-271733879,i=-1732584194,r=271733878,c=0;c>16)+(t>>16)+(e>>16)<<16|65535&e}function bit_rol(n,t){return n<>>32-t}function str2binl(n){for(var t=Array(),e=(1<>5]|=(n.charCodeAt(o/chrsz)&e)<>2]>>o%4*8+4&15)+t.charAt(n[o>>2]>>o%4*8&15);return e}var opts={getMobileUrl:{test01:"https://120.197.235.102:7009/h5/getMobile",pro:"https://verify.cmpassport.com/h5/getMobile"},getCTaddress:{test01:"http://120.197.235.102/NumberAbility01/h5/getCTaddress.htm",pro:"https://www.cmpassport.com/NumberAbility/h5/getCTaddress.htm"},getCTCUtoken:{test01:"http://120.197.235.102/NumberAbility01/h5/getCTCUtoken.htm",pro:"https://www.cmpassport.com/NumberAbility/h5/getCTCUtoken.htm"},logReport:{pro:"https://log-h5.cmpassport.com:9443/log/logReport"},CUjssdk:{pro:"https://sdk.microwu.com/sdk-deliver/js/verify_mobile_sdk-1.3.0.js"},optparams:{uuid:"",msgId:"",businessType:"1",timestamp:dateFormat(new Date,"yyyyMMddhhmmssSSS"),userInformation:getFingerPrint(),isimge:!1,version:"1.0"}};function uuid(n,t){var e,o,i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),r=[];if(t=t||i.length,n)for(e=0;e>2,i=(3&t)<<4|(t=n.charCodeAt(a++))>>4,r=(15&t)<<2|(e=n.charCodeAt(a++))>>6,c=63&e,isNaN(t)?r=c=64:isNaN(e)&&(c=64),s=s+u.charAt(o)+u.charAt(i)+u.charAt(r)+u.charAt(c);return s}function _utf8_encode(n){n=n.replace(/\r\n/g,"\n");for(var t="",e=0;e>6|192))+String.fromCharCode(63&o|128):(t=(t+=String.fromCharCode(o>>12|224))+String.fromCharCode(o>>6&63|128))+String.fromCharCode(63&o|128)}return t}YDRZ={getConnection:function(n){""==opts.optparams.msgId&&(opts.optparams.msgId=uuid(32,32));var t=navigator.connection||navigator.mozConnection||navigator.webkitConnection||{type:"unknown"},e=hex_md5("2.0"+n+opts.optparams.timestamp+opts.optparams.msgId+"@Fdiwmxy7CBDDQNUI"),t={appid:n,msgid:opts.optparams.msgId,netType:"none"!=t.type&&t.type||"unknown"},e={header:{sign:e,msgid:opts.optparams.msgId,version:"2.0",appid:n,systemtime:opts.optparams.timestamp},body:{log:{UA:navigator.userAgent,appId:n,msgid:opts.optparams.msgId,netType:t.netType}}};return navigator.sendBeacon&&navigator.sendBeacon(opts.logReport.pro,JSON.stringify(e)),t},getSign:function(n,t){return opts.optparams.traceId=uuid(32,32),opts.optparams.msgId=opts.optparams.traceId,opts.optparams.version=t,n+opts.optparams.businessType+opts.optparams.traceId+opts.optparams.timestamp+opts.optparams.msgId+t},getTokenInfo:function(e){opts.optparams.msgId=opts.optparams.traceId;var n={version:opts.optparams.version,timestamp:opts.optparams.timestamp,appId:e.data.appId,businessType:opts.optparams.businessType,traceId:opts.optparams.traceId,sign:e.data.sign,msgId:opts.optparams.traceId,userInformation:opts.optparams.userInformation},t="0"===e.data.isTest?opts.getMobileUrl.test01:opts.getMobileUrl.pro;try{request.ajax({request:{url:t,method:"post",data:JSON.stringify(n)},success:function(n){var t;if("103000"!==n.result.body.resultCode)return t={code:n.result.body.resultCode,message:n.result.body.resultDesc},e.error({code:t.code,message:t.message,msgId:opts.optparams.msgId}),t;t={code:n.result.body.resultCode,token:n.result.body.token,userInformation:opts.optparams.userInformation,message:"获取token成功"},e.success({code:t.code,message:t.message,token:t.token,userInformation:t.userInformation,msgId:opts.optparams.msgId})},error:function(n){var t={code:"500",message:"接口异常,获取token失败"};return e.error({code:t.code,message:t.message,msgId:opts.optparams.msgId}),t}})}catch(o){throw new Error(o)}}};var request={utilCreateXHR:function(n){var t=n&&n.window||window;if(t.XMLHttpRequest)return new t.XMLHttpRequest;for(var e=["MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","Microsoft.XMLHTTP"],o=0;o{if("false"!==u)return!(a="false")},6e3),n.appKey?n.authenticator?n.ts?void _ajax_get({path:"https://hs.wosms.cn/api/atrace",fullurl:!0,timeout:s.timeout,query:{appKey:n.appKey,authenticator:n.authenticator,ts:n.ts,bwid:n.bwid,signType:"A"}}).R(function(o){if("0000"==o.code){if("false"==a)return c({code:-20,msg:"超时的错误策略"}),!1;const i=o.traceId;var t=o.url.split("&")[0];let n=s.getUrlString(t,"appid");s.jsonp(t,"a",s.timeout).then(e=>{-2==e.authurl&&alert("公网ip错误"),e.authurl?s.jsonp(e.authurl+"/api?appid="+n+"&signType=A","a",s.timeout).then(n=>{let t="";t=n.err_code||"","false"==a?c({code:-20,msg:"超时的错误策略"}):_ajax_get({path:window.atob(o.url.split("&ret_url=")[1]),fullurl:!0,query:{ts:e.ts,code:n.code,province:n.province,err_code:t,signType:"A"},timeout:s.timeout}).R(function(n){if(r(n),"0000"==n.code){if((u="false")==a)return c({code:-20,msg:"超时的错误策略",traceId:i}),!1;r(n)}else c({code:n.code,msg:n.msg,traceId:i})},function(n){c({code:"122",msg:"联通在线hs.wosms.cn 接口请求报错或者超时",traceId:i})})})["catch"](n=>{n=n.code?n:{code:"122",msg:"联通在线enrichgw 接口报错",traceId:i};c(n)}):c(e)})["catch"](n=>{n=n.code?n:{code:"122",msg:"联通在线nisportal 接口报错",traceId:i};c(n)})}else c(o)},function(){c({code:"122",msg:"联通在线 请求api/atrace 接口出错或者超时"})}):(c({code:-18,msg:"ts不能为空"}),!1):(c({code:-17,msg:"authenticator不能为空"}),!1):(c({code:-16,msg:"appKey不能为空"}),!1)})},jsonp:function(i,r,c=5e3){return new Promise((t,e)=>{var n=document.createElement("script");i+="&callback="+r,n.src=i,window[r]=function(n){clearTimeout(o),t(n)},n.onerror=function(n){clearTimeout(o),e(n)},document.body.insertBefore(n,document.body.firstChild);const o=setTimeout(()=>{n.onerror=null,e(new Error({code:"121",msg:"联通在线jsonp超时"}))},c)})},getUrlString:function(n,t){for(var e=n.split("?")[1].split("&"),o=0;o{canClick=!0;"0000"===n.code&&e.phone?(o.i(GATEWAY_SUCCESS,{process_id:e.process_id,accesscode:n.accessCode,phone:e.phone}),e.P(n,"0")):(o.i(GATEWAY_FAIL,Error$1.cu_online_pre_error(e.process_id)),e.P(n,"109"))})["catch"](n=>{canClick=!0,o.i(GATEWAY_FAIL,Error$1.cu_online_pre_error(e.process_id)),e.P(n,"109")})},F:function(n,t){var e=this,o=e.G;jsonp({path:n.option[t].url,query:{custId:n.option[t].custid},headers:{"Content-Type":"application/json;chartset=UTF-8",seqId:guid(),Authorization:n.option[t].auth,appId:n.option[t].appid},fullurl:!0,timeout:e.timeout,format:"json"}).R(function(n){canClick=!0,n&&n.success&&n.data.sessionId?(o.i(GATEWAY_SUCCESS,{process_id:e.process_id,phone:e.phone,accesscode:n.data.sessionId}),e.P(n,"0")):(o.i(GATEWAY_FAIL,Error$1.pre_getmobile_result(e.process_id)),e.P(n,"103"))},function(){canClick=!0,o.i(GATEWAY_FAIL,Error$1.pre_getmobile_net(e.process_id)),e.P({code:400,msg:"接口请求失败 ||超时"},"400")})},W:function(){this.process_id=""},o:function(n,t){return this.G.o(n,t),this},P:function(n,t){var t=t||"undefined",e=(n&&"object"==typeof n&&(n=JSON.stringify(n)),this.process_id||n&&n.process_id),o=checkNetInfo();jsonp({protocol:this.protocol,domain:this.gtapi_domain,query:{process_id:e,code:t,metadata:n,cell:o},path:this.log_api,timeout:this.timeout})},$:function(){var t=this;jsonp({protocol:this.protocol,domain:this.gtapi_domain,path:this.config_api,query:{app_id:t.app_id,sdk:"3.0.2",presign:t.OnepassConfig.presign,presign_cu:t.OnepassConfig.presign_cu,clienttype:1,callback:t.OnepassConfig.cb,type:"pre",ts:t.OnepassConfig.ts},timeout:this.timeout}).R(function(n){t.OnepassConfig.haspreASK=!0,n&&200===n.status?(t.OnepassConfig.data=n,t.OnepassConfig.ip=n.data&&1===n.data.operator_rule||!1):(n=guid(),t.OnepassConfig.haspreASK=!0,t.OnepassConfig.ip=!1,t.P({process_id:n,msg:"请求webgetconfig出错"},"101"))},function(){var n=guid();t.OnepassConfig.haspreASK=!1,t.OnepassConfig.ip=!1,t.P({process_id:n,msg:"请求webgetconfig失败"},"100")})},q:function(n,t){var e=this,o=e.G;CUAU.getAuthCode({clientId:n.option[t].client_id,sign:n.option[t].sign,timeout:e.timeout||3e4,result:function(n){"0"==n.code?n.operatorType&&"CU"===n.operatorType&&(canClick=!0,o.i(GATEWAY_SUCCESS,{process_id:e.process_id,phone:e.phone,accesscode:n.accesscode}),e.P(n,"0")):(canClick=!0,o.i(GATEWAY_FAIL,Error$1.cu_token_error(e.process_id)),e.P(n,"107"))}})},L:function(n,t){var e=this;e.process_id=n.process_id,e.OnepassConfig.haspreASK=!1,n.data&&1===n.data.operator?e.N(n.data,n.data.operator):n.data&&3===n.data.operator?n.data.option[3].client_id?e.q(n.data,n.data.operator):e.D(n.data,n.data.operator):n.data&&4===n.data.operator?this.F(n.data,n.data.operator):e.Y(n.data,n.data.operator,t)}};var data=function(){var e=[];return{J:function(n,t){e[n]=t},M:function(n){return e[n]}}}();function GOP(n){this.X=uid(),this.Z=!0,data.J(this.X,new Onepass(n))}return GOP.version="3.0.2",GOP.prototype={gateway:function(n){return this.Z&&data.M(this.X).O(n),this},onGatewaySuccess:function(n){return this.Z&&data.M(this.X).o(GATEWAY_SUCCESS,n),this},onGatewayFail:function(n){return this.Z&&data.M(this.X).o(GATEWAY_FAIL,n),this},checkNetInfo:function(){return checkNetInfo()}},GOP}); ; /* eslint-disable */ !function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof def&&def.amd?def("GOL",e):(n="undefined"!=typeof globalThis?globalThis:n||self).GOL=e()}(this,function(){"use strict";function ownKeys(e,n){var t,o=Object.keys(e);return Object.getOwnPropertySymbols&&(t=Object.getOwnPropertySymbols(e),n&&(t=t.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),o.push.apply(o,t)),o}function _objectSpread2(e){for(var n=1;n>5]|=128<>>9<<4)]=e;for(var t=1732584193,o=-271733879,i=-1732584194,r=271733878,a=0;a>16)+(e>>16)+(t>>16)<<16|65535&t}function bit_rol$1(n,e){return n<>>32-e}function str2binl$1(n){for(var e=Array(),t=(1<>5]|=(n[_0x4268("0x75")](o/chrsz$1)&t)<>2]>>o%4*8+4&15)+e.charAt(n[o>>2]>>o%4*8&15);return t}(Ce=function Ce(n){var a=Array[_0x4268("0x59")].forEach,e=Array[_0x4268("0x59")][_0x4268("0x76")];this.each=function(n,e,t){if(null!==n)if(a&&n[_0x4268("0x23")]===a)n[_0x4268("0x23")](e,t);else if(n[_0x4268("0xca")]===+n.length){for(var o=0,i=n[_0x4268("0xca")];o>>16)*c&65535)<<16)&4294967295)<<15|o>>>17))*s+(((o>>>16)*s&65535)<<16)&4294967295)<<13|a>>>19))+((5*(a>>>16)&65535)<<16)&4294967295))+((58964+(t>>>16)&65535)<<16);switch(o=0,i){case 3:o^=(255&n.charCodeAt(u+2))<<16;case 2:o^=(255&n[_0x4268("0x75")](u+1))<<8;case 1:a^=o=(65535&(o=(o=(65535&(o^=255&n[_0x4268("0x75")](u)))*c+(((o>>>16)*c&65535)<<16)&4294967295)<<15|o>>>17))*s+(((o>>>16)*s&65535)<<16)&4294967295}return a^=n[_0x4268("0xca")],a=2246822507*(65535&(a^=a>>>16))+((2246822507*(a>>>16)&65535)<<16)&4294967295,a=3266489909*(65535&(a^=a>>>13))+((3266489909*(a>>>16)&65535)<<16)&4294967295,(a^=a>>>16)>>>0},hasLocalStorage:function(){try{return!!window.localStorage}catch(n){return!0}},hasSessionStorage:function(){try{return!!window.sessionStorage}catch(n){return!0}},isCanvasSupported:function(){var n=document.createElement(_0x4268("0x4b"));return!(!n[_0x4268("0x47")]||!n[_0x4268("0x47")]("2d"))},isIE:function(){return navigator.appName===_0x4268("0x7b")||!(navigator.appName!==_0x4268("0x95")||!/Trident/[_0x4268("0x1")](navigator[_0x4268("0xa5")]))},getPluginsString:function(){return this.isIE()&&this[_0x4268("0xc")]?this[_0x4268("0xd2")]():this.getRegularPluginsString()},getRegularPluginsString:function(){return this.map(navigator[_0x4268("0x61")],function(n){var e=this[_0x4268("0x76")](n,function(n){return[n.type,n[_0x4268("0x33")]][_0x4268("0x4a")]("~")})[_0x4268("0x4a")](",");return[n[_0x4268("0x94")],n[_0x4268("0x38")],e][_0x4268("0x4a")]("::")},this)[_0x4268("0x4a")](";")},getIEPluginsString:function(){if(window.ActiveXObject){var n=[_0x4268("0xb4"),"AcroPDF.PDF",_0x4268("0x71"),_0x4268("0x69"),_0x4268("0x8a"),_0x4268("0x7d"),_0x4268("0x43"),_0x4268("0xd"),_0x4268("0x82"),_0x4268("0x67"),_0x4268("0xe"),_0x4268("0xcf"),_0x4268("0xa1")];return this[_0x4268("0x76")](n,function(n){try{return new ActiveXObject(n),n}catch(e){return null}})[_0x4268("0x4a")](";")}return""},getScreenResolution:function(){return[screen[_0x4268("0xb")],screen[_0x4268("0xbb")]]},getCanvasFingerprint:function(){var n=document.createElement(_0x4268("0x4b")),e=n[_0x4268("0x47")]("2d"),t=_0x4268("0xd3");return e[_0x4268("0xcb")]=_0x4268("0x6"),e[_0x4268("0xb7")]=_0x4268("0xba"),e.textBaseline=_0x4268("0x60"),e[_0x4268("0xc9")]="#f60",e[_0x4268("0x8c")](125,1,62,20),e.fillStyle=_0x4268("0x5f"),e[_0x4268("0x83")](t,2,15),e[_0x4268("0xc9")]=_0x4268("0x0"),e[_0x4268("0x83")](t,4,17),n[_0x4268("0x56")]()}},window.EAccountFingerprint=Ce;var fjs$1=(Cf=window,Cf.fjs=function(s,r){var u=r["sdk_createModal"];var l=_0x4268("0x8e");var d="jssdk-hy-1.0.0";var x,g,i,a,c,f="",p={},h="",_,m="",b="",v="",n=![],e=0,t=0,w=![],y=![],A=![],o=null,k=null,S=![];var T=function T(n){if(x[_0x4268("0x2b")]===!![]){n=JSON[_0x4268("0x49")](n);if(navigator[_0x4268("0xa5")]["match"](/(iPhone|iPod|Android|ios)/i))alert(n);else console[_0x4268("0xb8")](n)}};var C=function C(n,e){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"[_0x4268("0x54")]("");var o=[];var i;e=e||t["length"];if(n)for(i=0;in)clearInterval(o)},1e3)};var O=function O(n){var e;if(n||x[_0x4268("0x3d")]){e={callback:s+_0x4268("0x37"),clientId:n||x["appId"],clientType:"10010",finger:v,format:_0x4268("0x8d"),seqNum:C(32),timeStamp:(new Date)["getTime"](),version:_0x4268("0x62"),authDomainMD5:x["authDomain"]?hex_md5$1(x[_0x4268("0xa7")]):""};if(s==="cjs")e["bussinessType"]="jy";else if(s===_0x4268("0x16"))e[_0x4268("0xa4")]="squ";else if(s==="fjs")e["bussinessType"]="jq";else e[_0x4268("0xa4")]="qu";return e}else N(_0x4268("0x88"),{result:_0x4268("0x2f"),msg:_0x4268("0x3b")})};var M=function M(n){p=O(n);var e=E(p);var t="";for(var o=0;o=t+10;if(n){y=![];w=![];if(s==="ejs")u[_0x4268("0x98")]();if(s===_0x4268("0x1a")&&!x["isNoUI"])R();else N(_0x4268("0x58"),D({result:"0",tn:_,accessCode:h,number:b,fingerId:v,gwAuth:m,msg:_0x4268("0x28")}))}else{y=!![];if(A)X[_0x4268("0x3e")](JSON["stringify"]({st:v+"",bt:_0x4268("0x24"),authType:"2"}));else L()}};var Z=function Z(){var n=document[_0x4268("0x1e")]("__21cn__ejs-ok-btn");var e=document[_0x4268("0x1e")](_0x4268("0x74"));var t=document[_0x4268("0x1e")](_0x4268("0x66"));if(n)n[_0x4268("0x80")]("touchend",function(){Y()});if(e)e[_0x4268("0x80")](_0x4268("0x12"),function(){u["hideModal"]();N(_0x4268("0x88"),{result:_0x4268("0x18"),msg:_0x4268("0x4f")})});if(t)t[_0x4268("0x80")](_0x4268("0x12"),function(){u[_0x4268("0x98")]()})};var Q=function Q(n,e){p={appId:g,clientType:_0x4268("0x15"),format:_0x4268("0x5c"),paramKey:n,paramStr:e,version:_0x4268("0x5e")};var t=E(p);var o="";for(var i=0;i0){r[_0x4268("0xc6")][n](e);return!![]}else{r[_0x4268("0xc6")][n]();return!![]}else try{var o={func:n,params:e,successCallBackFunc:t};r[_0x4268("0xcc")][_0x4268("0x96")]["EAccountJsBridge"][_0x4268("0x20")](o);return!![]}catch(i){return![]}},getPreCodeParams:function nn(n){return X[_0x4268("0x99")]("getPreCodeParams",n,_0x4268("0xa2"))},callbackPreCodeParams:function en(n){if(S)return;n=JSON[_0x4268("0x6f")](n);i=n["pk"];a=n["ps"];c=n["taskId"];Q(i,a)},preGetMobile:function tn(n){return X["getJsBrigeSdkFunc"](_0x4268("0xc8"),n,_0x4268("0xf"))},callbackPreCode:function on(n){if(S)return;n=JSON[_0x4268("0x6f")](n);clearTimeout(k);if(n[_0x4268("0x1d")]=="0"){var e=n[_0x4268("0x42")]["expiredTime"];var t=document["getElementById"](_0x4268("0x34"));I(e);if(t&&s===_0x4268("0xbd"))t[_0x4268("0x6b")]=n[_0x4268("0x42")][_0x4268("0x53")];h=n[_0x4268("0x42")]["accessCode"];b=n[_0x4268("0x42")][_0x4268("0x53")];m=n[_0x4268("0x42")]["gwAuth"];N(_0x4268("0x97"),{result:"0",msg:_0x4268("0xb2")});if(!x[_0x4268("0x6d")])Y()}else N("error",{result:n[_0x4268("0x1d")],msg:_0x4268("0xd1")})}};var U=function U(n){if(s===_0x4268("0xbd")){u[_0x4268("0x5a")]();Z()}x=n||{};v=(new EAccountFingerprint)[_0x4268("0x7f")]();g=x[_0x4268("0x3d")];B();if(X[_0x4268("0x79")](_0x4268("0x3e"),JSON["stringify"]({st:v+"",bt:_0x4268("0x24"),authType:"2"}))){k=setTimeout(function(){S=!![];N(_0x4268("0x88"),{result:_0x4268("0x93"),msg:_0x4268("0xd1")})},3e3);A=!![]}else{M();A=![]}};var J=function J(n,e){x=e||{};v=(new EAccountFingerprint)[_0x4268("0x7f")]();return M(n)};var H=function H(){R()};var G=function G(n,e){if(n){f=n;p["clientId"]=e;g=e}else{N(_0x4268("0x88"),{result:_0x4268("0x2f"),msg:_0x4268("0x8b")});return}if(A){var t="https://id6.me/auth/preauth.do?";var o=t+_0x4268("0xd5")+g+_0x4268("0x52")+i+_0x4268("0x77")+a+"&sign="+f;X[_0x4268("0xb0")](JSON["stringify"]({taskId:c,url:o}))}else L()};var K=function K(n){return encodeURIComponent(n)};var W=function W(n,e,t){var o="";var i="";var r=K(location[_0x4268("0x26")]);var a=K(location[_0x4268("0x86")]);n=K(n);e=K(e);var c=(new Date)[_0x4268("0x92")]()-t;var s=new Image;o=_0x4268("0x41")+g+_0x4268("0xd4")+r+"&hs="+a+_0x4268("0xad")+c+"&tt="+n+_0x4268("0xb1")+t+_0x4268("0x73")+e;i=l+_0x4268("0xc5")+o;s["src"]=i};var q={};if(s===_0x4268("0x6a")||s===_0x4268("0x1a"))q["getAccessCode"]=U;else q[_0x4268("0x10")]=U;q[_0x4268("0x5")]=G;r[_0x4268("0x6c")]=X;q["getSigin"]=J;q["OpenAuth"]=H;return q}("fjs",Cf),fjs$1),Cf,chrsz=8;function hex_md5(n){return binl2hex(core_md5(str2binl(n),n.length*chrsz))}function core_md5(n,e){n[e>>5]|=128<>>9<<4)]=e;for(var t=1732584193,o=-271733879,i=-1732584194,r=271733878,a=0;a>16)+(e>>16)+(t>>16)<<16|65535&t}function bit_rol(n,e){return n<>>32-e}function str2binl(n){for(var e=Array(),t=(1<>5]|=(n.charCodeAt(o/chrsz)&t)<>2]>>o%4*8+4&15)+e.charAt(n[o>>2]>>o%4*8&15);return t}function isNative(n){return"function"==typeof n&&/native code/.test(n.toString())}function isNumber(n){return"[object Number]"===Object.prototype.toString.call(n)}function isFunction(n){return"[object Function]"===Object.prototype.toString.call(n)}function isArray(n){return Array.isArray?Array.isArray(n):"[object Array]"===Object.prototype.toString.call(n)}function detecEventSupport(n){var e=document.createElement("div"),t="on".concat(n),n=t in e;return n||(e.setAttribute(t,"xxx"),n="function"==typeof e[t]),e=null,n}!function(_0x8160f,_0x90308c){var _0x49cf5a={utilCreateXHR:function(n){var e=n&&n.window||window;if(e.XMLHttpRequest)return new e.XMLHttpRequest;for(var t=["MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","Microsoft.XMLHTTP"],o=0;o

"+n+"

",document.body.appendChild(t);var o=setTimeout(function(){document.body.removeChild(t),clearTimeout(o)},e)}var _0x1b41ab={version:"",openType:"",timestamp:_0x413441.dateFormat(new Date,"yyyyMMddhhmmssSSS"),appId:"",traceId:"",msgId:"",sign:"",expandParams:"",isTest:"",errCallback:null,succCallback:null,layerCallback:null,authPageType:"1",userInformation:_0x413441.getFingerPrint(),businessType:"8",status:!1,loading:!0,v:"20220216",resourceHref:"https://www.cmpassport.com/h5/js/jssdk_auth/image/",ifStopGetToken:!1,ifLoadIframe:!1,ifInitOptions:!1,maskLength:0,keytype:"1",maskPhone:"",accessToken:"",authPageUrl:"",authLevel:"",authName:"",customerPrivacyConfig:"",oper:"",operatorNetData:"",clickKeyBoard:0},_0x32d2cb,_0x2c5574,_0x5359a2,_0x923594;function _0x1ddc52(){var n=navigator.userAgent,e="";-1>2,i=(3&a)<<4|(e=n.charCodeAt(u++))>>4,r=(15&e)<<2|(t=n.charCodeAt(u++))>>6,a=63&t,isNaN(e)?r=a=64:isNaN(t)&&(a=64),c=c+s.charAt(o)+s.charAt(i)+s.charAt(r)+s.charAt(a);return c}function _0x2b7501(n){n=n.replace(/\r\n/g,"\n");for(var e="",t=0;t>6|192):(e+=String.fromCharCode(o>>12|224),e+=String.fromCharCode(o>>6&63|128)),e+=String.fromCharCode(63&o|128))}return e}var _0x5ca6c4={getConnection:function(n){""==_0x1b41ab.msgId&&(_0x1b41ab.msgId=_0x413441.getUuId(32,32));n={appid:n,msgid:_0x1b41ab.msgId,netType:""};try{var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection||{type:"unknown"};n.netType="none"!=e.type&&e.type||"unknown"}catch(t){n.netType="unknown"}return n},init:function(){if(!(event.data.UC_MSG_Method||"https://www.cmpassport.com"!=event.origin&&"https://testcert.cmpassport.com:7002"!=event.origin&&"http://120.197.235.102"!=event.origin)){var n=document.getElementById("auth");try{n.contentWindow.document.write(""),n.contentWindow.document.clear()}catch(e){}n&&(event.data.msgId||event.data.code)&&(n.parentNode.removeChild(n),_0x1b41ab.loading=!0,n=event.data,_0x1b41ab.operatorNetData&&(n.operatorNetData=_0x1b41ab.operatorNetData),"103000"===event.data.code&&0==_0x1b41ab.status?(_0x1b41ab.succCallback(n),_0x8160f.removeEventListener("message",this.init,!1),_0x1b41ab.status=!0):0==_0x1b41ab.status&&(_0x1b41ab.errCallback(n),_0x8160f.removeEventListener("message",this.init,!1),_0x1b41ab.status=!0))}},getTokenInfo:function(n){_0x1b41ab.loading&&(_0x55bc0e.clearLogParam(),_0x1b41ab.status=!1,_0x1b41ab.msgId=n.data.traceId,_0x1b41ab.traceId=n.data.traceId,_0x1b41ab.version=n.data.version,_0x1b41ab.openType=n.data.openType,_0x1b41ab.timestamp=n.data.timestamp,_0x1b41ab.appId=n.data.appId,_0x1b41ab.sign=n.data.sign,_0x1b41ab.timeout=n.data.timeout,_0x1b41ab.expandParams=n.data.expandParams,_0x1b41ab.isTest=n.data.isTest,_0x1b41ab.succCallback="undefined"==typeof n.success?function(){}:n.success,_0x1b41ab.errCallback="undefined"==typeof n.error?function(){}:n.error,_0x1b41ab.layerCallback="undefined"==typeof n.layerCallback?function(){}:n.layerCallback,_0x1b41ab.authPageType=n.data.authPageType||"0",_0x1b41ab.maskLength=0,_0x1b41ab.clickKeyBoard=0,_0x8160f.removeEventListener("message",_0x5ca6c4.init,!1),_0x8160f.addEventListener("message",_0x5ca6c4.init,!1),_0x413441.getSystem(),"unknown"==(n=_0x5ca6c4.getConnection(n.data.appId).netType)||"cellular"==n?("1"==_0x1b41ab.authPageType||"2"==_0x1b41ab.authPageType?_0x1b41ab.ifLoadIframe=!1:(_0x1b41ab.ifLoadIframe=!0,(_0x32d2cb=document.createElement("iframe")).setAttribute("id","auth"),_0x32d2cb.style.display="none",document.body.appendChild(_0x32d2cb)),_0x1b41ab.ifStopGetToken?_0x5ca6c4.getYDPhoneNumber():_0x5ca6c4.endGetToken()):(_0x1b41ab.ifLoadIframe=!1,n={code:"504",message:"网络环境不支持取号",msgId:_0x1b41ab.msgId},this.overGetToken(_0x1b41ab.errCallback,n)))},getYDPhoneNumber:function(){var e=this,n={version:_0x1b41ab.version,timestamp:_0x1b41ab.timestamp,appId:_0x1b41ab.appId,businessType:_0x1b41ab.businessType,traceId:_0x1b41ab.traceId,msgId:_0x1b41ab.traceId,sign:_0x1b41ab.sign,authPageType:_0x1b41ab.authPageType,userInformation:_0x1b41ab.userInformation,expandParams:_0x1b41ab.expandParams},t="0"===_0x1b41ab.isTest?_0x3008ef.httpsPreGetmobile.test01:_0x3008ef.httpsPreGetmobile.pro;try{_0x1b41ab.loading&&(_0x1b41ab.loading=!1,_0x49cf5a.ajax({request:{url:t,method:"post",data:JSON.stringify(n),timeout:_0x1b41ab.timeout},success:function(n){n=n.result.body;n.operatorNetData?_0x1b41ab.operatorNetData=n.operatorNetData:_0x1b41ab.operatorNetData="",n.keytype&&(_0x1b41ab.keytype=n.keytype),"103000"===n.resultCode?(_0x1b41ab.accessToken=n.accessToken||"",_0x1b41ab.maskPhone=n.maskPhone||"",_0x1b41ab.authPageUrl=n.authPageUrl||"",_0x1b41ab.authLevel=n.authLevel||"",_0x1b41ab.authName=n.appName||"",_0x1b41ab.customerPrivacyConfig=n.customerPrivacyConfig||"",_0x1b41ab.oper="CM",e.getAuthentication()):(_0x2c45a0.YDData={code:n.resultCode,message:n.resultDesc},_0x1b41ab.ifStopGetToken?e.overGetToken(_0x1b41ab.errCallback):_0x5ca6c4.endGetToken())},error:function(n){_0x2c45a0.YDData={code:"500",message:n.result&&n.result.summary||"网络异常,请检查网络设置"},_0x1b41ab.ifStopGetToken?e.overGetToken(_0x1b41ab.errCallback):_0x5ca6c4.endGetToken()}}))}catch(o){throw new Error(o)}},getAuthentication:function(){var n,e,t;("5"==_0x1b41ab.authLevel||_0x1b41ab.authPageUrl)&&_0x1b41ab.authLevel&&_0x1b41ab.accessToken?"5"!=_0x1b41ab.authLevel&&"4"!=_0x1b41ab.authLevel&&"6"!=_0x1b41ab.authLevel?"2"==_0x1b41ab.authPageType?this.getLayerConf():(_0x32d2cb.style.cssText="width: 100%;height: 100%;border:0;position: fixed;top:0;left:0;right:0;bottom:0;z-index: 999999999999;background: #fff;",n=_0x1b41ab.authPageUrl,t={traceId:_0x1b41ab.traceId,accessToken:_0x1b41ab.accessToken,maskPhone:_0x1b41ab.maskPhone,authLevel:_0x1b41ab.authLevel,authName:_0x1b41ab.authName,userInformation:_0x1b41ab.userInformation,appId:_0x1b41ab.appId,expandParams:_0x1b41ab.expandParams,isTest:_0x1b41ab.isTest,oper:_0x1b41ab.oper},e=n+"?traceId="+_0x1b41ab.traceId+"&accessToken="+_0x1b41ab.accessToken+"&maskPhone="+_0x1b41ab.maskPhone+"&authLevel="+_0x1b41ab.authLevel+"&authName="+_0x1b41ab.authName+"&userInformation="+_0x1b41ab.userInformation+"&appId="+_0x1b41ab.appId+"&expandParams="+_0x1b41ab.expandParams+"&isTest="+_0x1b41ab.isTest+"&oper="+_0x1b41ab.oper+"&from="+window.location.origin+"&authPageType="+_0x1b41ab.authPageType+"&v="+_0x1b41ab.v,_0x32d2cb.src=e,_0x413441.isJSON(_0x1b41ab.customerPrivacyConfig)&&"3"!=_0x1b41ab.authPageType?_0x32d2cb.onload=function(){_0x32d2cb.contentWindow.postMessage(_0x1b41ab.customerPrivacyConfig,n)}:"3"==_0x1b41ab.authPageType&&(_0x32d2cb.onload=function(){_0x32d2cb.contentWindow.postMessage(_0x26e921,n)})):(t={code:"103000",message:"获取AccessToken成功",msgId:_0x1b41ab.msgId,accessToken:_0x1b41ab.accessToken,maskPhone:_0x1b41ab.maskPhone,oper:_0x1b41ab.oper,appId:_0x1b41ab.appId,authLevel:_0x1b41ab.authLevel},this.overGetToken(_0x1b41ab.succCallback,t)):(t={code:"509",message:"参数缺失",msgId:_0x1b41ab.msgId},this.overGetToken(_0x1b41ab.errCallback,t))},authGetToken:function(t){var o=this,n=hex_md5((t.data.maskPhone||_0x1b41ab.maskPhone).replace(/\*+/g,t.data.maskVal)),i="undefined"==typeof t.success?function(){}:t.success,r="undefined"==typeof t.error?function(){}:t.error,e={header:{interfaceVersion:t.data.version,timestamp:_0x413441.dateFormat(new Date,"yyyyMMddhhmmssSSS"),appId:t.data.appId,businessType:_0x1b41ab.businessType,traceId:t.data.traceId,"Content-Type":"application/json"},body:{accessToken:t.data.accessToken,phone:n,userInformation:_0x1b41ab.userInformation,expandParams:t.data.expandParams}},n="0"===t.data.isTest?_0x3008ef.getToken.test01:_0x3008ef.getToken.pro;try{_0x49cf5a.ajax({request:{headers:e.header,url:n,method:"post",data:JSON.stringify(e.body)},success:function(n){_0x2c5574&&(_0x2c5574.parentNode.removeChild(_0x2c5574),_0x2c5574=null);var e,n=n.result;!t.data.authPageType||"1"!=t.data.authPageType&&"2"!=t.data.authPageType||"104012"==n.resultCode||_0x923594.closeMark(),"103000"===n.resultCode?(e={code:n.resultCode,token:n.data.token,userInformation:_0x1b41ab.userInformation,msgId:t.data.traceId,message:n.desc},o.overAuthGetToken(i,e)):t.data.authPageType&&"104012"===n.resultCode&&"1"!=_0x1b41ab.authLevel&&"5"!=_0x1b41ab.authLevel?_0x923594.showErrorTips("号码有误,请重新填写"):(e={code:n.resultCode,message:n.desc,msgId:t.data.traceId},o.overAuthGetToken(r,e))},error:function(n){!t.data.authPageType||"1"!=t.data.authPageType&&"2"!=t.data.authPageType||(_0x2c5574&&(_0x2c5574.parentNode.removeChild(_0x2c5574),_0x2c5574=null),_0x923594.closeMark());var e={code:"103005",message:"inner error",msgId:t.data.traceId};o.overAuthGetToken(r,e)}})}catch(a){throw new Error(a)}},endGetToken:function(){var n={code:"503",message:"获取token结束",msgId:_0x1b41ab.msgId};this.overGetToken(_0x1b41ab.errCallback,n)},overGetToken:function(n,e){var t;e&&"{}"!=JSON.stringify(e)?t=e:(t=_0x2c45a0).msgId=_0x1b41ab.msgId,_0x1b41ab.operatorNetData&&(t.operatorNetData=_0x1b41ab.operatorNetData),_0x1b41ab.ifLoadIframe&&(_0x32d2cb.parentNode.removeChild(_0x32d2cb),_0x1b41ab.ifLoadIframe=!1),_0x8160f.removeEventListener("message",this.init,!1),n&&n(t),_0x1b41ab.loading=!0},overAuthGetToken:function(n,e){var t;e&&"{}"!=JSON.stringify(e)?t=e:(t=_0x2c45a0).msgId=_0x1b41ab.msgId,_0x1b41ab.operatorNetData&&(t.operatorNetData=_0x1b41ab.operatorNetData),_0x1b41ab.ifLoadIframe&&(_0x32d2cb.parentNode.removeChild(_0x32d2cb),_0x1b41ab.ifLoadIframe=!1),_0x8160f.removeEventListener("message",this.init,!1),n&&n(t),_0x1b41ab.loading=!0},getLayerConf:function(){"2"==_0x1b41ab.authPageType&&_0x5359a2&&0<_0x5359a2.childNodes.length&&_0x923594.closeMark();var t={},n={interfaceVersion:"1.0",traceId:_0x1b41ab.msgId,appId:_0x1b41ab.appId,timestamp:_0x413441.dateFormat(new Date,"yyyyMMddhhmmssSSS"),businessType:_0x1b41ab.businessType},e="0"===_0x1b41ab.isTest?_0x3008ef.getPageOpt.test01:_0x3008ef.getPageOpt.pro;try{_0x49cf5a.ajax({request:{headers:n,url:e,method:"get",data:""},success:function(n){n=n.result;_0x923594=(n=("103000"==n.resultCode&&n.data.pageOption&&(t=n.data.pageOption),new _0x174327(t)),new _0xaddc85(n))},error:function(n){var e=new _0x174327(t);_0x923594=new _0xaddc85(e)}})}catch(o){e=new _0x174327(t);_0x923594=new _0xaddc85(e)}}},_0x55bc0e={A:{logType1:{operType:"onekeylogin",traceid:"",appScene:"0",appid:"",networkType:"",clientType:"",userInformation:"",costtime_GetOwnerAppValidate:"",CMrequestTime_PreGetmobile:"",CMresponseTime_PreGetmobile:"",CM_resultCode:"",CTrequestTime_PreGetmobile:"",CTresponseTime_PreGetmobile:"",CT_resultCode:"",CUrequestTime_PreGetmobile:"",CUresponseTime_PreGetmobile:"",CU_resultCode:"",version:"2"},logType2:{operType:"onekeylogin",traceid:"",appid:"",authpageLoad:"",authpageCostTime:"",authpageType:"",authType:""},logType3:{operType:"onekeylogin",requestTime_GetToken:"",responseTime_GetToken:"",traceid:"",appid:"",loginbuttonClick:"",checkboxClick:"",keyboardClick:"",authpageReturn:""}},clearLogParam:function(){for(var n in this.A)for(var e in this.A[n])"operType"!==e&&"appScene"!==e&&"version"!==e&&(this.A[n][e]="")},setLog:function(n,e,t){this.A[n][e]=t},sendLog:function(n){var e,t=_0x413441.getUuId(32,32),o=hex_md5("2.0"+_0x1b41ab.appId+_0x1b41ab.timestamp+t+"@Fdiwmxy7CBDDQNUI"),i={};for(e in this.A[n])""==this.A[n][e]||(i[e]=this.A[n][e]);var r={header:{sign:o,msgid:t,version:"2.0",appid:_0x1b41ab.appId,systemtime:_0x1b41ab.timestamp,operType:"onekeylogin"},body:{log:i}},o=_0x3008ef.logReport.pro,t=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");t.open("post",o,!0),t.send(JSON.stringify(r))}},_0x174327=function _0x174327(n){return this.layerOption={},this.checkparam="1"==_0x1b41ab.authPageType?n:_0x26e921,this.defaultObject=_0x4231be,this.init(),this.layerOption.configBusinessName=n.configBusinessName||"",this.layerOption};_0x174327.prototype={constructor:_0x174327,init:function(){if("1"==_0x1b41ab.authLevel&&(this.defaultObject.phoneStyle.width="60%",this.defaultObject.submitBtnStyle.ifShow=!0),("1"==_0x1b41ab.authLevel||this.checkparam.submitBtnStyle&&this.checkparam.submitBtnStyle.ifShow)&&(this.defaultObject.phoneStyle.high="81px",this.defaultObject.agreeStyle.high="168px"),"1"!=_0x1b41ab.authPageType)if(this.checkparam&&"{}"!=JSON.stringify(this.checkparam))for(var n in this)"function"==typeof this[n]&&0==n.indexOf("check")&&this[n]();else this.layerOption=this.defaultObject;else{_layer_option=_0x4231be;var e=this.checkparam;if(_layer_option.agreeStyle.hrefColor=e.agreeTextColour||_0x4231be.agreeStyle.hrefColor,_layer_option.agreeStyle.checkedImage=e.agreeCheckPic||_0x4231be.agreeStyle.checkedImage,_layer_option.submitBtnStyle.name=e.agreeButtonText||_0x4231be.submitBtnStyle.name,_layer_option.submitBtnStyle.bgColor=e.agreeButtonText||_0x4231be.submitBtnStyle.bgColor,e.customControlsConf&&0!=JSON.parse(e.customControlsConf).length){var t=JSON.parse(e.customControlsConf);_layer_option.customControlStyle=[];for(var n=0;n"+this.maskPhone[t]+"
";n.className="ydrz-maskphone",n.id=1===this.layerType?"YDRZ_InputPhone":"YDRZ_InputPhone_two",1!==this.layerType&&(this.T.push(n.id),n.setAttribute("data-style","phoneStyle"),this.setPageByOption(n,e,"phoneStyle")),this.k.appendChild(n)}},createLayerPhoneLineByLevel4:function(){if("1"!=this.authLevel){for(var n,e=document.createElement("div"),t=this.styleObj.phoneStyle,o=this,i=1,r=0;r"+this.maskPhone[r]+"";e.className="ydrz-auth-phone",e.id=1===this.layerType?"YDRZ_InputPhone":"YDRZ_InputPhone_two",1!==this.layerType&&(this.T.push(e.id),e.setAttribute("data-style","phoneStyle"),this.setPageByOption(e,t,"phoneStyle")),this.k.appendChild(e),"2"==this.layerType&&_0x2f4a3a.addHandler(e,"click",function(n){n.stopPropagation(),o.createLayerKeyBoard(!0)})}},createLayerSubmitBtn:function(){var n,e,t=this.styleObj.submitBtnStyle;t.ifShow&&(n=document.createElement("div"),e=this,n.innerHTML="

"+t.name+"

",n.className="ydrz-submit-btn ydrz-disabled",n.id="YDRZ_Submitbtn",1!==this.layerType&&(this.T.push(n.id),n.setAttribute("data-style","submitBtnStyle"),this.setPageByOption(n,t,"submitBtnStyle")),this.k.appendChild(n),this.submitBtn=document.getElementById("YDRZ_Submitbtn"),_0x2f4a3a.addHandler(this.submitBtn,"click",function(n){e.C&&e.getAuthToken()}))},createLayerAgreeLine:function(){var n,e,t,o,i,r,a=document.createElement("p"),c=this,s=document.createElement("div"),u=this.styleObj.agreeStyle,l=u.hrefColor,d=u.checkedImage,x=u.fontSize;u.lineHeight;a.innerHTML=("1"==this.authLevel?"我已阅读并同意":"请补充完整号码同意")+function(n,e){var t,o="";if(!Array.isArray(e))return"";o="CT"==_0x1b41ab.oper?""+t.name+"":"CU"==_0x1b41ab.oper?""+t.name+"":""+t.name+"";for(var i=0;i"+r.name+""}return o}(l,u.agreeArr)+"并授权"+this.styleObj.configBusinessName+"使用此号码",s.className="ydrz-p ydrz-v1",s.id="YDRZ_Agreement",(a.style.flex=1)!==this.layerType&&(this.T.push(s.id),s.setAttribute("data-style","agreeStyle"),this.setPageByOption(s,u,"agreeStyle")),s.appendChild((n=x,e=l,t=d,o="",i=document.createElement("input"),r=document.createElement("div"),i.type="checkbox",i.id="YDRZ_Checkbox",i.name="YDRZ_Choose",i.className="ydrz-checkbox",r.style.width=r.style.height=n,r.style.position="relative",r.style.marginRight="6px",r.appendChild(i),i=n,n=parseInt(i)/2.4,o=t?".ydrz-layer-wrap .ydrz-v1 .ydrz-checkbox {vertical-align: text-top;margin:0;overflow:hidden;border-radius: 50%;border: 1px solid #cccccc;padding: 0;width: "+i+";height: "+i+";display: inline-block;outline: none;cursor: pointer;outline: none;appearance: none;-webkit-appearance: none;position: absolute;top:16%;left:0;}.ydrz-layer-wrap .ydrz-v1 .ydrz-checkbox:checked{border: 0;border-radius:0;outline: none;appearance: none;-webkit-appearance: none;margin-right: 6px;width: "+i+";height: "+i+";border: 0;background: url("+t+") no-repeat center top;background-size: 100% 100%;}":".ydrz-layer-wrap .ydrz-v1 .ydrz-checkbox {vertical-align: text-top;margin:0;overflow:hidden;border-radius: 50%;border: 1px solid #cccccc;padding: 0;width: "+i+";height: "+i+";display: inline-block;outline: none;cursor: pointer;outline: none;appearance: none;-webkit-appearance: none;position: absolute;top:16%;left:0;}.ydrz-layer-wrap .ydrz-v1 .ydrz-checkbox:checked {border: 1px solid "+e+';background: transparent;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);tap-highlight-color: rgba(0, 0, 0, 0);}.ydrz-layer-wrap .ydrz-v1 .ydrz-checkbox:checked::after{content: "";position: absolute;left: 0;top: 0;height: '+n+"px;width: "+(4+n)+"px;transform: rotate(-45deg);border: 1px solid "+e+";border-top: none;border-right: none;}",n=document.getElementsByTagName("head")[0],(e=document.createElement("style")).type="text/css",e.styleSheet?e.styleSheet.cssText=o:e.appendChild(document.createTextNode(o)),e.id="add-style-id",n.appendChild(e),r)),s.appendChild(a),this.k.appendChild(s);s=document.getElementById("YDRZ_Checkbox");_0x2f4a3a.addHandler(s,"click",function(n){var e;c.C=this.checked,"1"!==c.authLevel&&this.checked&&c.I.length==c.maskLength?(e={code:"103000",msgId:_0x1b41ab.msgId,message:"用户已输入中间四位号码并勾选协议"},_0x1b41ab.layerCallback(e),"3"==c.layerType?c.submitBtn?c.submitBtn.classList.remove("ydrz-disabled"):c.getAuthToken():"2"==c.layerType?c.submitBtn&&c.submitBtn.classList.remove("ydrz-disabled"):c.getAuthToken()):"1"==c.authLevel&&this.checked?c.submitBtn&&c.submitBtn.classList.remove("ydrz-disabled"):c.submitBtn&&c.submitBtn.classList.add("ydrz-disabled")})},createLayerCloseBtn:function(){var n,e=this.styleObj.closeBtnStyle,t=this;1!==this.layerType&&!e.ifShowBtn||((n=document.createElement("div")).id=1===this.layerType?"YDRZ_Closebtn":"YDRZ_Closebtn_two",n.className="ydrz-close-btn",n.innerHTML='',1!==this.layerType&&(this.T.push(n.id),n.setAttribute("data-style","closeBtnStyle"),this.setPageByOption(n,e,"closeBtnStyle")),this.k.appendChild(n),_0x2f4a3a.addHandler(n,"click",function(n){t.closeMark(),_0x4fd422.closeKeyBoard();var e={code:"501",msgId:_0x1b41ab.msgId,message:"用户取消授权"};_0x1b41ab.errCallback(e),_0x1b41ab.loading=!0}))},createLayerCustomControl:function(){var n,e,t,o=this.styleObj.customControlStyle,i=null,i="1"==this.layerType?(n=document.createElement("div"),e=document.getElementById("YDRZ_Agreement"),t=document.getElementById("YDRZ_Modal"),n.style.position="relative",n.style.width="100%",n.style.height=t.offsetHeight-e.offsetHeight-e.offsetTop+"px",this.k.appendChild(n),n):this.k;if(Array.isArray(o))for(var r=0;r

请稍候...

",document.body.appendChild(_0x2c5574),void _0x5ca6c4.authGetToken({data:{version:_0x1b41ab.version,maskPhone:_0x1b41ab.maskPhone,maskVal:this.I,appId:_0x1b41ab.appId,traceId:_0x1b41ab.traceId,accessToken:_0x1b41ab.accessToken,expandParams:_0x1b41ab.expandParams,isTest:_0x1b41ab.isTest,authPageType:_0x1b41ab.authPageType},success:n,error:e})):(_0x2dd7f0("未勾选协议",1500),void e({code:"508",msgId:_0x1b41ab.msgId,message:"用户未勾选协议"})):(_0x2dd7f0("未补齐4位号码",1500),void e({code:"507",msgId:_0x1b41ab.msgId,message:"用户未补齐4位号码"}))},generateInput:function(n,e,t,o,i){var r;document.all?r=null!=o&&""!=o?document.createElement(''):document.createElement(""+n+"

",(o=document.getElementsByClassName("ydrz-auth-phone")[0]).parentNode.insertBefore(t,o.nextSibling)):(t=document.createElement("div"),o=this.styleObj.errTipStyle,t.classList.add("ydrz-error-tip2-wrap"),t.id="YDRZErrorTips",t.innerHTML="

"+n+"

",this.setPageByOption(t,o,"errTipStyle"),document.body.appendChild(t),i=setTimeout(function(){document.body.removeChild(t),clearTimeout(i)},e)))},ifOverPage:function(){if("1"!=_0x1b41ab.authPageType)for(var n in this.T){n=this.T[n],n=document.getElementById(n);n.offsetWidth+n.offsetLeft>this.k.offsetWidth&&this.resetPage(n),n.offsetLeft<0&&this.resetPage(n)}},resetPage:function(n){var e=n.getAttribute("data-style");n.style.width=_0x4231be[e].width,n.style.left="0px",n.style.right="0px"}};var _0x4fd422=function(){var l,d,x,g,f,p,h,_,m,b,v={COLS:3,WIDTH:"33.3%",TYPE:1,KEYS:[1,2,3,4,5,6,7,8,9," ",0,"<"]},w=!1,y="";return{openKeyBoard:function(e,n,t,o,i,r){if(y=n,m=v,!l){(l=document.createElement("DIV")).className="qs-key-board-wrap",d=document.createElement("DIV"),x=document.createElement("TABLE"),g=document.createElement("TBODY"),d.className="qs-key-board",d.id="qs-keyboard-id",x.border="0";for(var a,c,s=0;s=e?y:y+b,i&&i(y||"")}}},closeKeyBoard:function o(n){{var e,t;w&&(e=document.getElementsByTagName("body")[0].style.paddingBottom,t=(0==document.documentElement.clientHeight?document.body:document.documentElement).clientHeight,document.getElementsByTagName("body")[0].style.paddingBottom=e==.3*t+"px"?"":parseFloat(e)-.3*t+"px",w=!1)}l&&(_.removeChild(l),l=null,_.removeEventListener("click",o))},delInput:function(n){y="",n&&n()}}}();_0x8160f.YDRZAuthLogin={getConnection:function(n){return _0x5ca6c4.getConnection(n)},getTokenInfo:function(n){_0x1b41ab.ifStopGetToken=!0,_0x5ca6c4.getTokenInfo(n)},authGetToken:function(n){_0x5ca6c4.authGetToken(n)},endGetToken:function(){_0x1b41ab.ifStopGetToken=!1},CustomControlsInit:function(n,e){_0x26e921=e,_0x5359a2=document.getElementById(n),_0x1b41ab.ifInitOptions=!0},authGetTokenByLayer:function(n,e){_0x923594&&_0x923594.getAuthToken(n,e)},authPageInit:function(n){_0x26e921=n},finger:function(){return _0x1b41ab.userInformation}}}(window);var extend=function extend(t,n){new _Object(n).O(function(n,e){t[n]=e})};function _Object(n){this.M=n}function _Array(n){this.L=n||[]}_Object.prototype={O:function(n){var e,t=this.M;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&n(e,t[e]);return this},F:function(){var n,e=this.M;for(n in e)if(Object.prototype.hasOwnProperty.call(e,n))return!1;return!0}},_Object.create=function(n){return"object"===_typeof(n)&&(Object.create?Object.create(n):((e=function e(){}).prototype=n,new e));var e},_Array.prototype={y:function(n){return this.L[n]},D:function(){return this.L.length},P:function(n,e){n=isNumber(e)?this.L.slice(n,e):this.L.slice(n);return new _Array(n)},N:function(n){return this.L.push(n),this},R:function(n,e){return this.L.splice(n,e||1)},z:function(n){return this.L.join(n)},B:function(n){return new _Array(this.L.concat(n))},Y:function(n){var e=this.L;if(e.map)return new _Array(e.map(n));for(var t=[],o=0,i=e.length;o/g,">");return e.innerHTML=n,this},en:function(n){var t=this.H,o=t.className?t.className.split(" "):[];return new _Array(isArray(n)?n:[n]).U(function(n){var e=PREFIX+n,n=o;-1===n.indexOf(e)&&(n.push(e),t.className=n.join(" "))}),this},on:function(n){var e=this.H,t=e.className.split(" ");return new _Array(isArray(n)?n:[n]).U(function(n){n=t.indexOf(PREFIX+n);-1"]],o=0;o<4;o++){e["tr.cl".concat(o)]={};for(var i=0;i<3;i++){var r=t[o][i];e["tr.cl".concat(o)]["td.shadow_".concat(r)]={}}}var a={},c={};"float"===n.OneLogin.product?a={".return-wrapper_onelogin":_objectSpread2({},n.OneLogin.showBack?{"i.return-icon":{},"span.return-text_onelogin":{}}:"")}:"popup"===n.OneLogin.product&&(c={".header-wrapper_onelogin":{".gt-pop-header-ct":{},".return-wrapper_onelogin":{}}});c={".geetest_box_wrap_onelogin":{".pupup-wrap_onelogin":{".header-wrap_onelogin":a,".wrap_onelogin":{".pop-header_onelogin":c,".gtlogo-wrap_onelogin":{},".gtnote_onelogin":{},".gtautoPhone_onelogin":{"span.gtautopre_onelogin":{},"span.inputval1":{},"span.inputval2":{},"span.inputval3":{},"span.inputval4":{},"span.gtautosuf_onelogin":{}},".gtest-cm-cus":{},".gtest-tip-ct":{},".gtest-btn_onelogin":{"span.gtest-text_onelogin":{},".loging_onelogin":{}},".gtonelogin-customer-wrapper":{".gtonelogin-customer-inner":{}},"p.operator_protocol_wrapper_onelogin":{"input.checkbox_protocol_onelogin":{},".protocol-warapper_onelogin":{"span.operator_protocol_wrapperp_onelogin":{},"a.o_protocol":{},"span.operator_protocol_wrapperand":{},"a.o_protocol1":{},"span.protocol_dot":{},"a.o_protocol2":{},"span.operator_protocol_wrapperanuse":{}}},".wrapper-footer_onelogin":{}},".gtfooter_onelogin":{".softkeyboard-wrap":{".qs-key-board_onelogin":{"table.gt_table":_objectSpread2({},e)}}},".toast_onelogin":{"i.toast-info-icon_onelogin":{},"span.toast-text_onelogin":{}}}}},c=compile(".gtonelogn",c,n.$1);n.jn(),n.dom=c,n.OneLogin.initType=n.OneLogin.product}},jn:function(){var n=this;n.options;var e=n.$1;e(".gtonelogn")&&e(".gtonelogn").sn().un(0),nextTick(function(){n.appendTo(new _Element(document.body)),n.makeText()})},close:function(){var e=this,t=e.$1;return new _Promise(function(n){e.clearVal(),t(".gtonelogn").sn().un(0)})},appendTo:function(n){var e=this.dom;(_Element.$(n)||new _Element(document.body)).pn(e)},open:function(){var n=this,e=n.$1;n.status;var t,o={left:0,center:"50%",right:"100%"};n.maskPhone&&e(".wrap_onelogin")&&(e(".gtest-btn_onelogin")&&e(".gtest-btn_onelogin").on("loading"),e(".wrap_onelogin").en("up").en("_".concat(n.OneLogin.product,"_wrap")),t=o[n.OneLogin.buttonPosition],e(".gtest-btn_onelogin").cn({left:t,transform:"translateX(-".concat(t,")"),width:n.OneLogin.buttonWidth,height:n.OneLogin.buttonHeight,"background-color":n.OneLogin.buttonBackgroundNormal}),e(".gtest-text_onelogin").cn({"font-size":n.OneLogin.buttonFontSize,color:n.OneLogin.fontColor}),o=o[n.OneLogin.customerPosition],n.OneLogin.canSwithch&&e(".gtonelogin-customer-inner").cn({left:o,transform:"translateX(-".concat(o,")")}),n.closeKeyBoard(),n.OneLogin.product&&e(".geetest_box_wrap_onelogin").en("_".concat(n.OneLogin.product)),n.Pn(),n.Fn())},Pn:function(){var t=this,o=t.$1,n=t.maskPhone.split("*"),e=n[0],i=n[n.length-1],n={1:{title:"《中国移动认证服务协议》",link:"https://wap.cmpassport.com/resources/html/contract.html"},2:{title:"《天翼账号服务协议与隐私政策》",link:"https://e.dlife.cn/sdk/agreement/detail.do?hidetop=true&appKey="},3:{title:"《中国联通提供认证服务》",link:"https://hs.wosms.cn/protocol/protocol.html"}},n=n[t.OneLogin.operator]||n[1];o(".gtautopre_onelogin").T(e),o(".gtautosuf_onelogin").T(i),o(".operator_protocol_wrapperp_onelogin").T("登录即同意"),2===t.OneLogin.operator&&(o(".geetest_box_wrap_onelogin").en("ct_auth_iframe"),t.OneLogin.canSwithch&&o(".gtonelogin-customer-inner").cn({display:"none"}),o(".gtest-tip-ct").T("若非本机号码,请返回并切换4G/5G网络使用"),"popup"===t.OneLogin.product&&(o(".gt-pop-header-ct").T("本机号码登录"),o(".gtlogo-wrap_onelogin").cn({display:"none"}))),(t.OneLogin.OLPrivacyTermItem1&&2===t.OneLogin.OLPrivacyTermItem1.length||t.OneLogin.OLPrivacyTermItem2&&2===t.OneLogin.OLPrivacyTermItem2.length)&&(o(".operator_protocol_wrapperand").T("和 "),t.OneLogin.OLPrivacyTermItem1&&o(".o_protocol1").T(t.OneLogin.OLPrivacyTermItem1[0]).gn({href:t.OneLogin.OLPrivacyTermItem1[1]}),t.OneLogin.OLPrivacyTermItem2&&t.OneLogin.OLPrivacyTermItem1&&o(".protocol_dot").T(" 、"),t.OneLogin.OLPrivacyTermItem2&&o(".o_protocol2").T(t.OneLogin.OLPrivacyTermItem2[0]).gn({href:t.OneLogin.OLPrivacyTermItem2[1]})),"6"===t.authLevel?(r=t.maskPhone&&t.maskPhoneNumber(t.maskPhone),o(".gtest-cm-cus").an(),o(".gtest-cm-cus").T(r),o(".gtautoPhone_onelogin").sn(),o(".gtest-btn_onelogin").en("active").cn({"background-color":t.OneLogin.buttonBackgroundActive||t.OneLogin.buttonBackgroundNormal}),o(".gtest-text_onelogin").cn({color:t.OneLogin.fontColorActive||t.OneLogin.fontColor}),t.OneLogin.authBtn=!1,t.OneLogin.keyboardOpen=!1):(o(".gtautoPhone_onelogin").cn({display:"flex"}),o(".gtest-cm-cus").sn(),o(".gtest-btn_onelogin").on("active")),o(".toast-text_onelogin").T("请勾选同意服务条款"),o(".operator_protocol_wrapperanuse").T(" 并使用本机号码登录");var r=t.OneLogin.backText||"返回";o(".return-text_onelogin")&&o(".return-text_onelogin").T(r),t.OneLogin.canSwithch&&o(".gtonelogin-customer-inner").T(t.OneLogin.customerSwitchText),t.OneLogin.logo&&o(".gtlogo-wrap_onelogin").cn({"background-image":"url(".concat(t.OneLogin.logo,")"),width:t.OneLogin.logoWidth}),o(".o_protocol").T(n.title).gn({href:n.link}),t.OneLogin.authBtn||2===t.OneLogin.operator&&"6"!==t.OneLogin.authLevel?o(".gtest-btn_onelogin").cn({display:"none"}):o(".gtest-btn_onelogin").cn({display:"inline-flex"}),o(".gtest-btn_onelogin").t("click",function(){var n=null,e=o(".checkbox_protocol_onelogin").Ln();"sumit"!==t.OneLogin.status.status&&(e&&!n?(o(".gtest-btn_onelogin").en("loading"),t.OneLogin.status.Nn("sumit")):(o(".toast_onelogin").en("_active"),o(".gtest-btn_onelogin").en("_noclick"),n=setTimeout(function(){o(".toast_onelogin").on("_active"),o(".gtest-btn_onelogin").on("_noclick"),clearTimeout(n)},2e3)))});for(var a=1;a<5;a++)o(".inputval".concat(a)).t("click",function(n){n.V()&&4!==t.maskVal.length||t.openKeyBoard()});o(".return-wrapper_onelogin")&&o(".return-wrapper_onelogin").t("click",function(){t.OneLogin.status.Nn("back")}),t.OneLogin.canSwithch&&o(".gtonelogin-customer-inner")&&o(".gtonelogin-customer-inner").t("click",function(){t.OneLogin.status.Nn("switch")}),(t.OneLogin.keyboardOpen||2===t.OneLogin.operator&&"6"!==t.OneLogin.authLevel)&&t.openKeyBoard()},makeText:function(){var i=this,r=i.$1;i.maskVal="",i.j=0;var n=i.OneLogin.app||"极验验证",e=i.OneLogin.buttonText||"登录";r(".shadow_").en("key-non-icon"),r(".shadow_>").en("del-icon"),r(".gtnote_onelogin").T("请填写完整号码并授权".concat(n,"使用")).cn({"font-size":i.OneLogin.appfontSize});for(var t=[1,2,3,4,5,6,7,8,9,"",0,">"],o=0;o"!==a&&r(".shadow_".concat(a)).T(a),r(".shadow_".concat(a)).t("click",function(n){n.q();var e=null,t=r(".checkbox_protocol_onelogin").Ln();if(!t||e)return r(".toast_onelogin").en("_active"),r(".gtest-btn_onelogin").en("_noclick"),void(e=setTimeout(function(){r(".toast_onelogin").on("_active"),r(".gtest-btn_onelogin").on("_noclick"),clearTimeout(e)},2e3));var o,t=n.V();0!==t&&""===t?"shadow_> geetest_onelogindel-icon"==n.J.target.className&&i.maskVal.length&&"sumit"!==i.OneLogin.status.status&&(i.delKey(t),i.j<4&&(r(".gtest-btn_onelogin").on("active").cn({"background-color":i.OneLogin.buttonBackgroundNormal}),r(".gtest-text_onelogin").cn({color:i.OneLogin.fontColor}))):i.j<4&&(i.j=i.j+1,i.setKey(i.j,t),i.maskVal+=t,r(".gtest-btn_onelogin").on("active").cn({"background-color":i.OneLogin.buttonBackgroundNormal}),r(".gtest-text_onelogin").cn({color:i.OneLogin.fontColor}),4===i.j&&(i.OneLogin.maskVal=i.maskVal,o=null,i.OneLogin.authBtn||2===i.OneLogin.operator?o=setTimeout(function(){i.OneLogin.status.Nn("sumit"),clearTimeout(o)},60):(r(".gtest-btn_onelogin").en("active").cn({"background-color":i.OneLogin.buttonBackgroundActive||i.OneLogin.buttonBackgroundNormal}),r(".gtest-text_onelogin").cn({color:i.OneLogin.fontColorActive||i.OneLogin.fontColor})),i.closeKeyBoard()))})}r(".gtest-text_onelogin").T(e)},setKey:function(n,e){(0,this.$1)(".inputval".concat(n)).T(e)},delKey:function(){var n=this,e=n.$1;n.j&&(e(".inputval".concat(n.j)).T(""),n.j=n.j-1,n.maskVal=n.maskVal.substr(0,n.maskVal.length-1)),n.OneLogin.maskVal=n.maskVal},clearVal:function(){var n=this,e=n.$1;if(n.maskVal.length)for(var t=0;t