!function(window,$){function parseCookieString(i,n){var o={};if(isString(i)&&i.length>0)for(var t,e,l,a=n?decode:same,c=i.split(/;\s/g),r=0,p=c.length;p>r;r++){if(l=c[r].match(/([^=]+)=/i),l instanceof Array)try{t=decode(l[1]),e=a(c[r].substring(l[1].length+1))}catch(s){}else t=decode(c[r]),e="";t&&(o[t]=e)}return o}function isString(i){return"string"==typeof i}function isNonEmptyString(i){return isString(i)&&""!==i}function validateCookieName(i){if(!isNonEmptyString(i))throw new TypeError("Cookie name must be a non-empty string")}function same(i){return i}function UDBLogin(i,n){this.baseURL=n||Util.toDecorateURL("//udbproxy.ouj.com/"),this.UDBCallbacks=$.Callbacks("memory"),this.setAppid(i),this.init()}function ThirdLogin(i,n,o){this.baseURL=n||Util.toDecorateURL("//udbproxy.ouj.com/thirdlogin"),this.loginStyle=o||"duowan",this.callbackURL="",this.denyCallbackURL="",this.minWindow=null,this.loginPopupObj=null,this.loginMaskObj=null,this.yyLoginTip=null,this.type="login",this.setAppid(i),this.init()}if(!/(\?|\&)platform=wxminiprogram(&*|$)/.test(location.href)&&!window.dwUDBProxy){var Cookie={},decode=decodeURIComponent,encode=encodeURIComponent;Cookie.get=function(i,n){validateCookieName(i),n="function"==typeof n?{converter:n}:n||{};var o=parseCookieString(document.cookie,!n.raw);return(n.converter||same)(o[i])},Cookie.set=function(i,n,o){validateCookieName(i),o=o||{};var t=o.expires,e=o.domain,l=o.path;o.raw||(n=encode(String(n)));var a=i+"="+n,c=t;return"number"==typeof c&&(c=new Date,c.setDate(c.getDate()+t)),c instanceof Date&&(a+="; expires="+c.toUTCString()),isNonEmptyString(e)&&(a+="; domain="+e),isNonEmptyString(l)&&(a+="; path="+l),o.secure&&(a+="; secure"),document.cookie=a,a},Cookie.remove=function(i,n){return n=n||{},n.expires=new Date(0),Cookie.set(i,1,n)};var dwClientIncompatible={isClient:function(){return!(!window.external||!window.external.OpenThirdLogin)},open:function(i,n){return dwClientIncompatible.isClient()?void window.external.OpenThirdLogin(i):window.open(i,n)},focus:function(i){dwClientIncompatible.isClient()||i&&i.focus()},close:function(i){dwClientIncompatible.isClient()?window.external.CloseThirdLogin():i&&i.close()}},Config={multilogin:{domainMap:["ouj.com"],domainExcludeMap:["ka.duowan.com","kaplus.duowan.com"],urlMap:[]}},Util={loginCallbacks:$.Callbacks("memory"),loginSuccCallbacks:$.Callbacks("memory"),bindCallbacks:$.Callbacks("memory"),bindSuccCallbacks:$.Callbacks("memory"),logoutCallbacks:$.Callbacks("memory"),logoutSuccCallbacks:$.Callbacks("memory"),intervalHandle:0,getCookie:Cookie.get,setCookie:Cookie.set,removeCookie:Cookie.remove,setDefaultSuccCb:function(){return this},isLogin:function(){return Util.getCookie("lg_uid")||Util.getCookie("yyuid")||Util.getCookie("ouid")},isBind:function(){return 1==Util.getCookie("lg_bind")},isKaLogin:function(i){Util.getCookie("user_id")?i&&i(!0):$.ajax({url:Util.toDecorateURL("//ka.duowan.com/user/checkLogin?createIfNx=0"),dataType:"jsonp",success:function(n){0==n.code&&n.data?i&&i(!0):i&&i(!1)}})},getUsername:function(){var i=Util.getCookie("username");if(!i)return"";var n=i.split("_",2);if(!n||!n[0])return i;var o=Util.getCookie(n[0]+"_nickname");if(!o||"null"==o)return i;var t="";return t="newqq"==n[0]?"[QQ网友]":"qq"==n[0]?"[微信网友]":"sina"==n[0]?"[微博网友]":"[多玩网友]",t+o},getUid:function(){return Util.getCookie("lg_uid")||Util.getCookie("yyuid")||Util.getCookie("ouid")},decorateURL:function(i){if(i){if(/^http/.test(i))return i;var n="http://";return/^https/.test(window.location.href)&&(n="https://"),n+window.location.host+i}i=window.location.href;var o=i.indexOf("#");return-1!=o&&(i=i.substring(0,o)),i},toDecorateURL:function(i){if(/^http/.test(i))return i;var n="http:";return/^https/.test(window.location.href)&&(n="https:"),n+i},intervalCheckLogin:function(i,n,o){this.intervalHandle&&clearInterval(this.intervalHandle),i||(i=100),n||(n=3e3);var t=this,e=function(){return o?t.isBind():t.isLogin()},l=function(){var i;return i=o?function(){t.bindCallbacks.fire(),t.bindSuccCallbacks.fire(),t.bindCallbacks=$.Callbacks("memory")}:function(){t.loginCallbacks.fire(),t.loginSuccCallbacks.fire(Util.getUserInfo()),t.loginCallbacks=$.Callbacks("memory")}}();if(e())l();else{var a=0;t.intervalHandle=setInterval(function(){a++,e()&&(l(),clearInterval(t.intervalHandle)),a>n&&clearInterval(t.intervalHandle)},i)}},handleSuccessURL:function(i,n,o){var t=function(){},e=function(){},l=!1;return"function"==typeof i&&(t=i,i=Util.handleUrl(),l=!0),i=this.decorateURL(i),"function"==typeof o?(e=function(){o(i),__ThirdLogin.showTip()},l=!0):e=function(){__ThirdLogin.showTip()},l&&(this.loginCallbacks.empty(),this.loginCallbacks.add(n),this.loginCallbacks.add(e),this.loginCallbacks.add(t),this.intervalCheckLogin()),i},handle2SuccessURL:function(i,n){var o=function(){},t=function(){},e=!1;return"function"==typeof i&&(o=i,i=Util.handleUrl(),e=!0),i=this.decorateURL(i),"function"==typeof n&&(t=function(){n(i)},e=!0),e&&(Util.removeCookie("lg_bind",{domain:".ouj.com",path:"/"}),this.bindCallbacks=$.Callbacks("memory"),this.bindCallbacks.add(o),this.bindCallbacks.add(t),this.intervalCheckLogin(null,null,"bind")),i},handleUrl:function(i){var n=window.location.href;return i=i||"udbSuccessCallback",n+=/\?/.test(n)?"&"+i:"?"+i},isMobile:function(){return!1},useMultiLogin:function(){for(var i=0,n=Config.multilogin.domainExcludeMap.length;n>i;i++){var o=Config.multilogin.domainExcludeMap[i];if(-1!=location.href.indexOf("ka.duowan.com/hd/"))return!0;if(-1!=location.hostname.indexOf(o))return!1}for(var i in Config.multilogin.domainMap)if(-1!=location.hostname.indexOf(Config.multilogin.domainMap[i]))return!0;for(var i in Config.multilogin.urlMap)if(location.href==Config.multilogin.urlMap[i])return!0;return!1},checkLogin:function(){return this.isLogin()&&this.loginSuccCallbacks.fire(this.getUserInfo()),this},getUserInfo:function(){var i={};return i.username=this.getUsername(),i.yyuid=Util.getUid(),i},isWap:/Android|webOS|iPhone|Windows Phone|iPod|BlackBerry|SymbianOS/i.test(window.navigator.userAgent),isBBS:/bbs./.test(location.host),isWx:"micromessenger"==window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i)};UDBLogin.prototype={init:function(){this.loadUDBSdk(Util.isMobile()?"MWeb":"PCWeb")},setAppid:function(i){this.appid=i||1e3,this.getAuthorizeURL=this.baseURL+"getAuthorizeURL?appid="+this.appid,this.callbackURL=this.baseURL+"callback?appid="+this.appid+"&successURL=",this.denyCallbackURL=this.baseURL+"denyCallback?appid="+this.appid,this.getDelCookieURL=this.baseURL+"getDelCookieURL?appid="+this.appid},loadUDBSdk:function(i){var n={PCWeb:"/lgn/js/oauth/udbsdk/pcweb/udb.sdk.pcweb.popup.min.js",MWeb:"/lgn/js/oauth/udbsdk/mweb/udb.sdk.mweb.embed.min.js"};n[i]||(i="PCWeb");var o=this,t=function(){window.UDB&&window.UDB.sdk&&window.UDB.sdk[i]&&o.UDBCallbacks.fire(window.UDB.sdk[i])};t()||$.ajax({type:"GET",url:Util.toDecorateURL("//res.udb.duowan.com/"+n[i]),success:function(){return t()},dataType:"script",cache:!0})},login:function(i){var n=this;i=Util.handleSuccessURL(i,function(){n.UDBCallbacks.add(function(i){i.popupCloseLgn&&i.popupCloseLgn()})}),n.UDBCallbacks.add(function(o){o.jsonpOpenLgn(n.getAuthorizeURL,n.callbackURL+encodeURIComponent(i),encodeURI(n.denyCallbackURL))})},embedLogin:function(i,n,o,t){var e=this,l=$(i);0!=l.length&&l.each(function(){var i=$(this);"function"==typeof n||n||(n=i.data("callback-url")),n=Util.handleSuccessURL(n,t),$.getJSON(e.getAuthorizeURL+"&jsonpcallback=?",{callbackURL:e.callbackURL+encodeURIComponent(n),denyCallbackURL:e.denyCallbackURL},function(n){return"1"!=n.success?void alert(n.errMsg):void i.append($('').attr("src",n.url+"&rdm="+Math.random()+"&UIStyle="+o))})})},logout:function(i){var n=this;Util.logoutCallbacks.empty(),Util.logoutCallbacks.add("function"==typeof i?i:function(){window.location.href=i}),$.getJSON(n.getDelCookieURL+"&jsonpcallback=?",function(i){return"1"!=i.success?void alert(i.errMsg):void n.UDBCallbacks.add(function(n){n.deleteCrossmainCookieWithCallBack(i.delCookieURL,function(){dwClientIncompatible.isClient()?window.external.Logout():(Util.logoutCallbacks.fire(),Util.logoutSuccCallbacks.fire(),Util.logoutCallbacks=$.Callbacks("memory"))})})}),$.getJSON("//udbproxy.ouj.com/deleteoujCookie?callback=?")},kaLogout:function(){$.ajax({url:Util.toDecorateURL("//ka.duowan.com/user/logout"),dataType:"jsonp",success:function(i){0==i.code?location.reload():alert(i.msg)}})}},ThirdLogin.prototype={init:function(){},setAppid:function(i){this.appid=i||1e3},multiLogin:function(i){this.initMutilLoginPopup(i),this.multiLoginPopupObj.show(),this.loginMaskObj.show()},login:function(i){this.initDuowanLoginPopup(i),this.loginPopupObj.show(),this.loginMaskObj.show()},register:function(i){this.initMutilLoginPopup(i,"register"),this.multiLoginPopupObj.show(),this.loginMaskObj.show()},kaLogin:function(i){this.initKaLoginPopup(i),this.loginPopupObj.show(),this.loginMaskObj.show()},bind:function(i,n,o){this.bindOauth(i,n,o)},unBind:function(i,n){return i.loginType&&i.openid&&$.ajax({url:this.baseURL+"/?do=unbind",data:i,dataType:"jsonp"}).done(function(i){n&&n(i)}),this},getUser:function(i){$.ajax({url:Util.toDecorateURL("//udbproxy.ouj.com/getInfo"),dataType:"jsonp"}).done(function(n){i&&i(n)})},mobileLogin:function(i){this.loginOauth("yy",i)},loginOauth:function(i,n,o){var t=this,e=o?"dwAuthorizeURL":"dummy3AuthorizeURL";n=Util.handleSuccessURL(n,function(){t.closeLoginPopup()},function(i){t.reloadPage(i)});var l=this.baseURL+"?do="+e+"&appid="+this.appid+"&loginType="+i+"&callbackUrl="+encodeURIComponent(n);this.minWindow=dwClientIncompatible.open(l,"_loginWin"),dwClientIncompatible.focus(this.minWindow)},bindOauth:function(i,n,o){o&&(this.appid=1009);var t=this,e="bindAuthorizeURL";n=Util.handle2SuccessURL(n,function(i){t.reloadPage(i)});var l=this.baseURL+"?do="+e+"&appid="+this.appid+"&loginType="+i+"&callbackUrl="+encodeURIComponent(n);this.minWindow=window.open(l,"_loginWin"),this.minWindow.focus(this.minWindow)},reloadPage:function(i){var n=this;this.minWindow&&dwClientIncompatible.close(this.minWindow),this.writeOtherDomainCookie(function(){i||window.location.reload(),/udbSuccessCallback/.test(i)?n.closeLoginPopup():window.location.href=i})},writeOtherDomainCookie:function(i){for(var n=["udb_n","udb_l","udb_oar","yyuid","username","password","osinfo","oauthCookie","newqq_nickname","qq_nickname","sina_nickname","lg_uid","lg_openid","lg_type","lg_token"],o={},t="",e="",l=0;l\r\n
\r\n \r\n \r\n \r\n 退出\r\n
\r\n';return __p};$("body").append(""),$("body").append(loginTipTpl({isWap:Util.isWap,isBBS:Util.isBBS}));var that=this;this.loginMaskObj=$(".account-login-mask"),this.yyLoginTip=$("#yyLoginTip"),this.setNickName=$("#setNickNameTip"),this.setNickNameTip=$(".dw-account-input-tip"),this.loginMaskObj.on("click",function(){that.closeLoginPopup()}),this.yyLoginTip.on("click",".close",function(i){i.preventDefault(),that.yyLoginTip.hide(),that.loginMaskObj.hide()}).on("click",".dw-account-tip-cancel",function(i){i.preventDefault(),that.yyLoginTip.hide(),that.loginMaskObj.hide()});var nicking=!1;return this.setNickName.on("click",".close",function(i){i.preventDefault(),that.setNickName.hide(),that.loginMaskObj.hide()}).on("click",".nickname-submit",function(i){i.preventDefault();var n=that.setNickName.data("sign");if(!nicking&&n){var o=that.setNickName.find("input").eq(0).val();o||that.showNickNameTip(0,"昵称不能为空")}}).on("click",".nickname-logout",function(){__UDBLogin.logout("")}),this},initMutilLoginPopup:function(successURL,type){if(type=type||"login",this.initLoginTip(),this.type==type&&this.multiLoginPopupObj)return this;this.type=type;var wxCustomization="object"==typeof successURL,loginConfig={wap:Util.isWap,type:type,dropYYLogin:!1,dropSinaLogin:!0};wxCustomization&&Util.isWap&&(loginConfig.dropYYLogin=!0);var loginPopupTpl=function(obj){{var __t,__p="";Array.prototype.join}with(obj||{}){__p+="";var typeText="register"==type?"注册":"登录";__p+='\r\n
\r\n \r\n ",wap&&(__p+='\r\n \r\n '),__p+="\r\n\r\n ",dropYYLogin&&(__p+='\r\n \r\n '),__p+='\r\n 退出\r\n
\r\n'}return __p}(loginConfig);if(this.multiLoginPopupObj)return this.multiLoginPopupObj.html($(loginPopupTpl).html()),this;$("body").append(loginPopupTpl);var that=this;if(this.multiLoginPopupObj=$(".dw-account-login-pop"),wxCustomization){var wechatClickCallback=successURL.wechatClickCallback;successURL=successURL.defaultCallbck,Util.isWx?that.multiLoginPopupObj.on("click",".login-btn-wechat",function(i){i.preventDefault(),that.loginOauth("mp",successURL,1)}):that.multiLoginPopupObj.on("click",".login-btn-wechat",function(){wechatClickCallback(that)})}else that.multiLoginPopupObj.on("click",".login-btn-wechat",function(i){i.preventDefault(),that.loginOauth(Util.isWx?"mp":"weixin",successURL,1)});return this.multiLoginPopupObj.on("click",".login-btn-yy",function(i){"login"==that.type?Util.isWap?__ThirdLogin.mobileLogin(successURL):(i.preventDefault(),that.closeLoginPopup(),__UDBLogin.login(successURL)):window.open(Util.toDecorateURL("//aq.yy.com/p/reg/mobile.do?fromadv=navigator"))}).on("click",".login-btn-qq",function(i){i.preventDefault(),that.loginOauth("qq",successURL,1)}).on("click",".login-btn-weibo",function(i){i.preventDefault(),that.loginOauth("weibo",successURL,1)}).on("click",".login-btn-old",function(i){i.preventDefault(),that.closeLoginPopup(),that.login(successURL)}).on("click",".close",function(i){i.preventDefault(),that.closeLoginPopup()}),this},initDuowanLoginPopup:function(successURL){if(this.initLoginTip(),0==$(".account-login-pop").length){var cssStyle=".account-login-mask{position:fixed;top:0;left:0;z-index:20000;width:100%;height:100%;background-color:#000;opacity:.5;zoom:1;-moz-opacity:.5;filter:alpha(opacity=50)}.account-login-pop a{color:#333}.account-login-pop a:hover{text-decoration:none}.account-login-pop{position:fixed;top:50%;left:50%;z-index:20001;display:none;margin:-174px 0 0 -260px;width:520px;border-radius:3px;background:#fff;box-shadow:3px 3px 10px rgba(0,0,0,.3);font-family:Microsoft Yahei}.account-login-pop .login{position:relative;padding:10px 20px;background:url(http://pub.ouj.com/common//dwUDBProxy/img/login_bg_b2df113.jpg) bottom right no-repeat}.account-login-pop #login-tab{position:relative}.account-login-pop .login-title{position:absolute;top:9pt;left:5px;width:75pt;color:#333;font-weight:400;font-size:1pc;line-height:28px}.account-login-pop .login-hd{position:relative;height:38px;border-bottom:2px solid #d8d8d8;font-size:18px;line-height:38px}.login-hd .tab-btn{display:inline-block;width:5pc;color:#333;text-align:center;font-size:18px;cursor:pointer}.login-hd .tab-btn.active,.login-hd .tab-btn:hover{color:#ff630e}.login-hd .line{position:absolute;top:38px;left:0;width:5pc;height:2px;background:#ff630e;-webkit-transition:left .5s cubic-bezier(0.175,.885,.32,1.175);transition:left .5s cubic-bezier(0.175,.885,.32,1.175)}.account-login-pop .login-bd{min-height:268px}.login-bd .tab-unit{display:none}#udbsdk_login_content{height:180px}.account-login-pop .register-tab{display:none;padding-bottom:20px}.account-login-pop .login-sidebar{position:absolute;top:4pc;right:40px;padding-left:2pc;height:255px;border-left:1px solid #f0f0f0}.login-sidebar .title{color:#909090;font-weight:400;font-size:14px;line-height:2pc}.account-login-pop .close{position:absolute;top:20px;right:20px;width:13px;height:13px;background-repeat:no-repeat;cursor:pointer}.other-login{font-size:9pt}.other-login .login-btn{display:block;margin-bottom:15px;padding-left:14px;width:111px;height:36px;border-radius:2px;color:#fff;text-align:left;line-height:36px;cursor:pointer}.other-login .login-btn .icon{float:left;margin:9px 4px 0 0;width:22px;height:18px}.other-login .login-btn.login-btn-wechat{background:#46c33d}.other-login .login-btn.login-btn-wechat .icon{background-repeat:no-repeat}.other-login .login-btn.login-btn-wechat:hover{background:#4fcd46}.other-login .login-btn.login-btn-wechat:active{background:#43be3a}.other-login .login-btn.login-btn-qq{background:#3fa6ee}.other-login .login-btn.login-btn-qq .icon{background-repeat:no-repeat}.other-login .login-btn.login-btn-qq:hover{background:#46b0fa}.other-login .login-btn.login-btn-qq:active{background:#46a4e6}.other-login .login-btn.login-btn-weibo{background:#f75b66}.other-login .login-btn.login-btn-weibo .icon{background-repeat:no-repeat}.other-login .login-btn.login-btn-weibo:hover{background:#ff646f}.other-login .login-btn.login-btn-weibo:active{background:#f25661}#use-mail,#use-phone{color:#666;cursor:pointer}.udbsdk_frm{position:relative;z-index:333}.login-loading{position:absolute;top:45%;left:155px;display:none;width:1pc;height:1pc;background:url(http://pub.ouj.com/common//dwUDBProxy/img/loading_32f2e70.gif) no-repeat}.account-login-pop .close{background-position:-22pc 0}.other-login .login-btn.login-btn-wechat .icon{background-position:-343px -1pc}.other-login .login-btn.login-btn-qq .icon{background-position:-343px -37px}.other-login .login-btn.login-btn-weibo .icon{background-position:-343px -58px}.account-login-pop .close,.other-login .login-btn.login-btn-qq .icon,.other-login .login-btn.login-btn-wechat .icon,.other-login .login-btn.login-btn-weibo .icon{background-image:url(http://pub.ouj.com/common//dwUDBProxy/img/head_84b9690.png)}.account-login-pop iframe{width:300px;height:240px}",loginPopupTpl=function(obj){{var __p="";Array.prototype.join}with(obj||{})__p+='\r\n
\r\n \r\n \r\n
'; return __p}();$("body").append(""),$("body").append(loginPopupTpl);var that=this;that.loginPopupObj=$(".account-login-pop"),__UDBLogin.embedLogin("#udbsdk_login_content .udbsdk_login",successURL,"xelogin",function(){that.closeLoginPopup()}),that.loginPopupObj.on("click",".login-btn-wechat",function(i){i.preventDefault(),that.loginOauth("weixin",successURL)}).on("click",".login-btn-qq",function(i){i.preventDefault(),that.loginOauth("qq",successURL)}).on("click",".login-btn-weibo",function(i){i.preventDefault(),that.loginOauth("weibo",successURL)}).on("click",".close",function(i){i.preventDefault(),that.closeLoginPopup()})}},initKaLoginPopup:function(successURL){if(0==$(".account-login-pop").length){var cssStyle=".account-login-mask{position:fixed;top:0;left:0;z-index:20000;width:100%;height:100%;background-color:#000;opacity:.5;zoom:1;-moz-opacity:.5;filter:alpha(opacity=50)}.account-login-pop a{color:#333}.account-login-pop a:hover{text-decoration:none}.account-login-pop{position:fixed;top:50%;left:50%;z-index:20001;display:none;margin:-174px 0 0 -260px;width:520px;border-radius:3px;background:#fff;box-shadow:3px 3px 10px rgba(0,0,0,.3);font-family:Microsoft Yahei}.account-login-pop .login{position:relative;padding:10px 20px;background:url(http://pub.ouj.com/common//dwUDBProxy/img/login_bg_b2df113.jpg) bottom right no-repeat}.account-login-pop #login-tab{position:relative}.account-login-pop .login-title{position:absolute;top:9pt;left:5px;width:75pt;color:#333;font-weight:400;font-size:1pc;line-height:28px}.account-login-pop .login-hd{position:relative;height:38px;border-bottom:2px solid #d8d8d8;font-size:18px;line-height:38px}.login-hd .tab-btn{display:inline-block;width:5pc;color:#333;text-align:center;font-size:18px;cursor:pointer}.login-hd .tab-btn.active,.login-hd .tab-btn:hover{color:#ff630e}.login-hd .line{position:absolute;top:38px;left:0;width:5pc;height:2px;background:#ff630e;-webkit-transition:left .5s cubic-bezier(0.175,.885,.32,1.175);transition:left .5s cubic-bezier(0.175,.885,.32,1.175)}.account-login-pop .login-bd{min-height:268px}.login-bd .tab-unit{display:none}#udbsdk_login_content{height:180px}.account-login-pop .register-tab{display:none;padding-bottom:20px}.account-login-pop .login-sidebar{position:absolute;top:4pc;right:40px;padding-left:2pc;height:255px;border-left:1px solid #f0f0f0}.login-sidebar .title{color:#909090;font-weight:400;font-size:14px;line-height:2pc}.account-login-pop .close{position:absolute;top:20px;right:20px;width:13px;height:13px;background-repeat:no-repeat;cursor:pointer}.other-login{font-size:9pt}.other-login .login-btn{display:block;margin-bottom:15px;padding-left:14px;width:111px;height:36px;border-radius:2px;color:#fff;text-align:left;line-height:36px;cursor:pointer}.other-login .login-btn .icon{float:left;margin:9px 4px 0 0;width:22px;height:18px}.other-login .login-btn.login-btn-wechat{background:#46c33d}.other-login .login-btn.login-btn-wechat .icon{background-repeat:no-repeat}.other-login .login-btn.login-btn-wechat:hover{background:#4fcd46}.other-login .login-btn.login-btn-wechat:active{background:#43be3a}.other-login .login-btn.login-btn-qq{background:#3fa6ee}.other-login .login-btn.login-btn-qq .icon{background-repeat:no-repeat}.other-login .login-btn.login-btn-qq:hover{background:#46b0fa}.other-login .login-btn.login-btn-qq:active{background:#46a4e6}.other-login .login-btn.login-btn-weibo{background:#f75b66}.other-login .login-btn.login-btn-weibo .icon{background-repeat:no-repeat}.other-login .login-btn.login-btn-weibo:hover{background:#ff646f}.other-login .login-btn.login-btn-weibo:active{background:#f25661}#use-mail,#use-phone{color:#666;cursor:pointer}.udbsdk_frm{position:relative;z-index:333}.login-loading{position:absolute;top:45%;left:155px;display:none;width:1pc;height:1pc;background:url(http://pub.ouj.com/common//dwUDBProxy/img/loading_32f2e70.gif) no-repeat}.account-login-pop .close{background-position:-22pc 0}.other-login .login-btn.login-btn-wechat .icon{background-position:-343px -1pc}.other-login .login-btn.login-btn-qq .icon{background-position:-343px -37px}.other-login .login-btn.login-btn-weibo .icon{background-position:-343px -58px}.account-login-pop .close,.other-login .login-btn.login-btn-qq .icon,.other-login .login-btn.login-btn-wechat .icon,.other-login .login-btn.login-btn-weibo .icon{background-image:url(http://pub.ouj.com/common//dwUDBProxy/img/head_84b9690.png)}.account-login-pop iframe{width:300px;height:240px}",loginPopupTpl=function(obj){{var __p="";Array.prototype.join}with(obj||{})__p+='\r\n
\r\n \r\n \r\n
';return __p}(),$loginPopupTpl=$(loginPopupTpl);$loginPopupTpl.find(".login-btn-weibo").remove(),$("body").append(""),$("body").append($loginPopupTpl);var that=this;that.loginPopupObj=$(".account-login-pop"),that.loginMaskObj=$(".account-login-mask"),__UDBLogin.embedLogin("#udbsdk_login_content .udbsdk_login",successURL,"xelogin",function(){that.closeLoginPopup()}),that.loginMaskObj.on("click",function(){that.closeLoginPopup()}),that.loginPopupObj.on("click",".login-btn-wechat",function(i){i.preventDefault();var n="//ka.duowan.com/login/weixin/?type=1&url="+encodeURIComponent(location.href);$.get(n,function(i){i.result?alert("登录成功"):-7===i.code||-5===i.code?location.href=i.data:alert(i.msg)},"jsonp")}).on("click",".login-btn-qq",function(i){i.preventDefault();var n="//ka.duowan.com/qq/getUserInfo/?url="+encodeURIComponent(location.href);$.get(n,function(i){i.result?alert("登录成功"):-7===i.code||-5===i.code?location.href=i.data:alert(i.msg)},"jsonp")}).on("click",".close",function(i){i.preventDefault(),that.closeLoginPopup()})}},showTip:function(){if(!Util.isWap){var i=this;this.getUser(function(n){0==n.bindList.length&&(i.yyLoginTip.show(),i.loginMaskObj.show())})}},showNickNameTip:function(i,n){var o=this.setNickNameTip.children(".input-tip-icon"),t=this.setNickNameTip.children("em");i?o.addClass("succ"):o.removeClass("succ"),t.text(n),this.setNickNameTip.show()},closeLoginPopup:function(){this.multiLoginPopupObj&&this.multiLoginPopupObj.hide(),this.loginPopupObj&&this.loginPopupObj.hide(),this.loginMaskObj&&this.loginMaskObj.hide(),this.setNickName&&this.setNickName.hide(),this.yyLoginTip&&this.yyLoginTip.hide()}};var _appid="",_baseURL="",_thirdLoginStyle="duowan",__UDBLogin=new UDBLogin(_appid,_baseURL),__ThirdLogin=new ThirdLogin(_appid,_baseURL,_thirdLoginStyle);Util.setDefaultSuccCb().checkLogin(),window.dwUDBProxy={login:function(i,n){try{return n&&(__UDBLogin.setAppid(n),__ThirdLogin.setAppid(n)),Util.useMultiLogin()?this.multiLogin(i):__UDBLogin.login(i)}catch(o){}},register:function(i){return __ThirdLogin.register(i)},kaLogin:function(i){return __ThirdLogin.kaLogin(i)},multiLogin:function(i){try{return __ThirdLogin.multiLogin(i)}catch(n){}},mobileLogin:function(i){return __ThirdLogin.mobileLogin(i)},logout:function(i){try{return __UDBLogin.logout(i)}catch(n){}},kaLogout:function(){try{return __UDBLogin.kaLogout()}catch(i){}},isLogin:function(){try{return Util.isLogin()}catch(i){return!1}},isKaLogin:Util.isKaLogin,getCookie:function(i){try{return"username"==i?Util.getUsername():Util.getCookie(i)}catch(n){return""}},getUsername:function(){return Util.getUsername()},getUid:Util.getUid,add:function(i){Util.loginSuccCallbacks.add(i)},addBind:function(i){Util.bindSuccCallbacks.add(i)},addLogout:function(i){Util.logoutSuccCallbacks.add(i)},bind:function(i,n,o){return __ThirdLogin.bind(i,n,o)},unBind:function(i,n){return __ThirdLogin.unBind(i,n)},isWap:Util.isWap,getUser:function(i){return __ThirdLogin.getUser(i)}},$(function(){__UDBLogin.embedLogin("#login-embed","","xelogin"),__UDBLogin.embedLogin("#mlogin-embed","","xemlogin")})}}(window,jQuery);