text: define("passport:page/register/register",["require","exports","module","common:widget/oui/lib/jquery/1.9.1/jquery","common:widget/oui/rsa/index","common:widget/oui/widgets/widgets","common:widget/oui/arale/tip/1.1.4/tip"],function(e){{var o=e("common:widget/oui/lib/jquery/1.9.1/jquery"),a=e("common:widget/oui/rsa/index"),i=e("common:widget/oui/widgets/widgets"),s=i.Form,t=i.pswLevel;e("common:widget/oui/arale/tip/1.1.4/tip")}window.parent!=window&&(window.top.location.href=location.href);for(var n=location.search.substring(1),d=n.split("&"),r=0;r<d.length;r++){var l=d[r].split("=");if(l.length&&2==l.length){var c=l[0],u=l[1];"registerSource"==c?o("#registerSource").val(u):o("#inviteCode").val(u)}}o(function(){function e(){o("#password").on("keyup",function(){var e=o(this).val(),a=t(e);switch(a.level){case"强":d.removeClass().addClass("high");break;case"中":d.removeClass().addClass("mid");break;case"弱":d.removeClass().addClass("low")}d.show()}).on("blur",function(){})}function i(){var e=o("#passwordEye"),a=o("#password");e.on("click",function(){o(this).hasClass("password-eye-close")?(a.attr("type","text"),o(this).removeClass("password-eye-close").addClass("password-eye-open")):(a.attr("type","password"),o(this).removeClass("password-eye-open").addClass("password-eye-close"))})}var n,d=o(".psw-range div");s.ui.init(),e(),i(),o("#reg").length&&s.validate({target:"#reg",showTip:o("#reg").data("showtip")===!0?!0:!1,before:function(){n||(n=s.sendPhoneCode("phone","getMobileCode","/sendPhoneCode.action?checkCode=regNew&phone=",{onStart:function(){o("#code-label").hide()},randcodeValidate:"#randCode"})),s.randImage(),o("#refreshCode").click(function(){o("#randImage").trigger("click")})},inputTheme:!0,showSingleError:!0,validateData:{ignore:".ignore",success:function(e){"nickName"==e.attr("for")&&e.html("此昵称将用作展示，一旦注册成功不能修改"),"phone"==e.attr("for")&&e.html("请保持手机畅通，以便完成手机信息验证"),e.addClass("valid")},submitHandler:function(e){var i=o("#mobileCode").val(),t=o("#phone").val();o.get("/account/checkCode.action?mobileCode="+i+"&code="+i+"&mobile="+t,function(i){if("false"==i.result){var n=i.message;n?o("#code-label").text(n).show():o("#code-label").show()}else o("#code-label").hide(),o(e).find("input[name=passwordRsa]").val(a(o(e).find("input[name=password]").val())),s.ajaxSubmit(o(e),{msgafter:"#"+o(e).find("input[type='submit']")[0].id,success:function(e){0===e.status?(o("#username_step2")&&o("#username_step2").val(t),o("#registerSucForm").submit()):this.msg(e.message,"warn")}})})}}});s.checkCode({ele:o("#randCode"),data:{code:function(){return o("#randCode").val()}},success:function(){o(".validCode").show()},failed:function(){o(".validCode").hide()}}),o("#randCode").on("keyup",function(){var e=o("#randCode").valid();e?o(".validCode").show():o(".validCode").hide()}),o("body")[0].scrollTop=0})});