!function(window,$){function parseCookieString(i,o){var n={};if(isString(i)&&i.length>0)for(var t,e,l,a=o?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(d){}else t=decode(c[r]),e="";t&&(n[t]=e)}return n}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,o){this.baseURL=o||Util.toDecorateURL("//udbproxy.ouj.com/"),this.UDBCallbacks=$.Callbacks("memory"),this.setAppid(i),this.init()}function ThirdLogin(i,o,n){this.baseURL=o||Util.toDecorateURL("//udbproxy.ouj.com/thirdlogin"),this.loginStyle=n||"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,o){validateCookieName(i),o="function"==typeof o?{converter:o}:o||{};var n=parseCookieString(document.cookie,!o.raw);return(o.converter||same)(n[i])},Cookie.set=function(i,o,n){validateCookieName(i),n=n||{};var t=n.expires,e=n.domain,l=n.path;n.raw||(o=encode(String(o)));var a=i+"="+o,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),n.secure&&(a+="; secure"),document.cookie=a,a},Cookie.remove=function(i,o){return o=o||{},o.expires=new Date(0),Cookie.set(i,1,o)};var dwClientIncompatible={isClient:function(){return!(!window.external||!window.external.OpenThirdLogin)},open:function(i,o){return dwClientIncompatible.isClient()?void window.external.OpenThirdLogin(i):window.open(i,o)},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:[]},showTips:{domainExcludeMap:["wan.ouj.com"]}},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")},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(o){0==o.code&&o.data?i&&i(!0):i&&i(!1)}})},getUsername:function(){var i=Util.getCookie("username");if(!i)return"";var o=i.split("_",2);if(!o||!o[0])return i;var n=Util.getCookie(o[0]+"_nickname");if(!n||"null"==n)return i;var t="";return t="newqq"==o[0]?"[QQ网友]":"qq"==o[0]?"[微信网友]":"sina"==o[0]?"[微博网友]":"[多玩网友]",t+n},getUid:function(){return Util.getCookie("lg_uid")||Util.getCookie("yyuid")},decorateURL:function(i){if(i){if(/^http/.test(i))return i;var o="http://";return/^https/.test(window.location.href)&&(o="https://"),o+window.location.host+i}i=window.location.href;var n=i.indexOf("#");return-1!=n&&(i=i.substring(0,n)),i},toDecorateURL:function(i){if(/^http/.test(i))return i;var o="http:";return/^https/.test(window.location.href)&&(o="https:"),o+i},intervalCheckLogin:function(i,o,n){this.intervalHandle&&clearInterval(this.intervalHandle),i||(i=100),o||(o=3e3);var t=this,e=function(){return n?t.isBind():t.isLogin()},l=function(){var i;return i=n?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>o&&clearInterval(t.intervalHandle)},i)}},handleSuccessURL:function(i,o,n){var t=function(){},e=function(){},l=!1;return"function"==typeof i&&(t=i,i=Util.handleUrl(),l=!0),i=this.decorateURL(i),"function"==typeof n?(e=function(){n(i),__ThirdLogin.showTip()},l=!0):e=function(){__ThirdLogin.showTip()},l&&(this.loginCallbacks.empty(),this.loginCallbacks.add(o),this.loginCallbacks.add(e),this.loginCallbacks.add(t),this.intervalCheckLogin()),i},handle2SuccessURL:function(i,o){var n=function(){},t=function(){},e=!1;return"function"==typeof i&&(n=i,i=Util.handleUrl(),e=!0),i=this.decorateURL(i),"function"==typeof o&&(t=function(){o(i)},e=!0),e&&(Util.removeCookie("lg_bind",{domain:".ouj.com",path:"/"}),this.bindCallbacks=$.Callbacks("memory"),this.bindCallbacks.add(n),this.bindCallbacks.add(t),this.intervalCheckLogin(null,null,"bind")),i},handleUrl:function(i){var o=window.location.href;return i=i||"udbSuccessCallback",o+=/\?/.test(o)?"&"+i:"?"+i},isMobile:function(){return!1},useMultiLogin:function(){for(var i=0,o=Config.multilogin.domainExcludeMap.length;o>i;i++){var n=Config.multilogin.domainExcludeMap[i];if(-1!=location.href.indexOf("ka.duowan.com/hd/"))return!0;if(-1!=location.hostname.indexOf(n))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},allowShowTips:function(){for(var i=Config.showTips.domainExcludeMap,o=0;o=0)return!1}return!0},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),isHezi:window.location.href.indexOf("hezi")>-1};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 o={PCWeb:"/lgn/js/oauth/udbsdk/pcweb/udb.sdk.pcweb.popup.min.js",MWeb:"/lgn/js/oauth/udbsdk/mweb/udb.sdk.mweb.embed.min.js"};o[i]||(i="PCWeb");var n=this,t=function(){window.UDB&&window.UDB.sdk&&window.UDB.sdk[i]&&n.UDBCallbacks.fire(window.UDB.sdk[i])};t()||$.ajax({type:"GET",url:Util.toDecorateURL("//res.udb.duowan.com/"+o[i]),success:function(){return t()},dataType:"script",cache:!0})},login:function(i){var o=this;i=Util.handleSuccessURL(i,function(){o.UDBCallbacks.add(function(i){i.popupCloseLgn&&i.popupCloseLgn()})}),o.UDBCallbacks.add(function(n){n.jsonpOpenLgn(o.getAuthorizeURL,o.callbackURL+encodeURIComponent(i),encodeURI(o.denyCallbackURL))})},embedLogin:function(i,o,n,t){var e=this,l=$(i);0!=l.length&&l.each(function(){var i=$(this);"function"==typeof o||o||(o=i.data("callback-url")),o=Util.handleSuccessURL(o,t),$.getJSON(e.getAuthorizeURL+"&jsonpcallback=?",{callbackURL:e.callbackURL+encodeURIComponent(o),denyCallbackURL:e.denyCallbackURL},function(o){return"1"!=o.success?void alert(o.errMsg):void i.append($('').attr("src",o.url+"&rdm="+Math.random()+"&UIStyle="+n))})})},logout:function(i){var o=this;Util.logoutCallbacks.empty(),Util.logoutCallbacks.add("function"==typeof i?i:function(){window.location.href=i}),$.getJSON(o.getDelCookieURL+"&jsonpcallback=?",function(i){return"1"!=i.success?void alert(i.errMsg):void(dwClientIncompatible.isClient()?(Util.removeCookie("dw_client_rewriteDomainCookie",{domain:".ouj.com",path:"/"}),Util.removeCookie("lg_uid",{domain:".ouj.com",path:"/"}),Util.removeCookie("yyuid",{domain:".ouj.com",path:"/"}),Util.removeCookie("ouid",{domain:".ouj.com",path:"/"}),window.external&&window.external.Logout&&window.external.Logout(),Util.logoutCallbacks.fire(),Util.logoutSuccCallbacks.fire(),Util.logoutCallbacks=$.Callbacks("memory")):o.UDBCallbacks.add(function(o){o.deleteCrossmainCookieWithCallBack(i.delCookieURL,function(){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()},wxLogin:function(i){this.loginOauth("weixin2",i,1)},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,o){this.bindOauth(i,o)},unBind:function(i,o){return i.loginType&&i.openid&&$.ajax({url:this.baseURL+"/?do=unbind",data:i,dataType:"jsonp"}).done(function(i){o&&o(i)}),this},getUser:function(i){$.ajax({url:Util.toDecorateURL("//udbproxy.ouj.com/getInfo"),dataType:"jsonp"}).done(function(o){i&&i(o)})},mobileLogin:function(i){this.loginOauth("yy",i)},loginOauth:function(i,o,n){var t=this,e=n?"dwAuthorizeURL":"dummy3AuthorizeURL";if(o=Util.handleSuccessURL(o,function(){t.closeLoginPopup()},function(i){t.reloadPage(i)}),"yy"==i)var l="//www.duowan.com/mlogin/?calbackUrl="+encodeURIComponent(o);else{/sid=\d+/g.test(o)&&(o=o.replace(/sid=\d+/g,""));var l=this.baseURL+"?do="+e+"&appid="+this.appid+"&loginType="+i+"&callbackUrl="+encodeURIComponent(o)}this.minWindow=dwClientIncompatible.open(l,"_loginWin"),dwClientIncompatible.focus(this.minWindow)},bindOauth:function(i,o){var n=this,t="bindAuthorizeURL";o=Util.handle2SuccessURL(o,function(i){n.reloadPage(i)});var e=this.baseURL+"?do="+t+"&appid="+this.appid+"&loginType="+i+"&callbackUrl="+encodeURIComponent(o);this.minWindow=dwClientIncompatible.open(e,"_loginWin"),dwClientIncompatible.focus(this.minWindow)},reloadPage:function(i){var o=this;this.minWindow&&dwClientIncompatible.close(this.minWindow),this.writeOtherDomainCookie(function(){i||window.location.reload(),/udbSuccessCallback/.test(i)?o.closeLoginPopup():window.location.href=i})},writeOtherDomainCookie:function(i){for(var o=["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"],n={},t="",e="",l=0;l去绑定\r\n ':'\r\n \r\n ',__p+='\r\n \r\n \r\n\r\n\r\n';return __p};$("body").append(""),$("body").append(loginTipTpl({isWap:Util.isWap,isBBS:Util.isBBS,isHezi:Util.isHezi}));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(),Util.isHezi&&window.open("login://close")}),this.yyLoginTip.on("click",".close",function(i){i.preventDefault(),that.yyLoginTip.hide(),that.loginMaskObj.hide(),Util.isHezi&&window.open("login://close")}).on("click",".dw-account-tip-cancel",function(i){i.preventDefault(),that.yyLoginTip.hide(),that.loginMaskObj.hide(),Util.isHezi&&window.open("login://close")}).on("click",".dw-account-tip-confirm",function(){that.yyLoginTip.hide(),that.loginMaskObj.hide()});return this.setNickName.on("click",".close",function(i){i.preventDefault(),that.setNickName.hide(),that.loginMaskObj.hide()}).on("click",".nickname-submit",function(){return!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:!0,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'}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.loginExtention("wechat")}):that.multiLoginPopupObj.on("click",".login-btn-wechat",function(){wechatClickCallback(that),that.loginExtention("wechat")})}else that.multiLoginPopupObj.on("click",".login-btn-wechat",function(i){i.preventDefault(),that.loginOauth(Util.isWx?"mp":"weixin",successURL,1),that.loginExtention("wechat")});return this.multiLoginPopupObj.on("click",".login-btn-yy",function(i){$(".udbsdk_login").on("click",".udbsdk_close",function(i){i.preventDefault(),Util.isHezi&&window.open("login://close")}),"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")),that.loginExtention("yy")}).on("click",".login-btn-qq",function(i){i.preventDefault(),that.loginOauth("qq",successURL,1),that.loginExtention("qq")}).on("click",".login-btn-weibo",function(i){i.preventDefault(),that.loginOauth("weibo",successURL,1),that.loginExtention("weibo")}).on("click",".login-btn-old",function(i){i.preventDefault(),that.closeLoginPopup(),that.login(successURL)}).on("click",".close",function(i){i.preventDefault(),that.closeLoginPopup(),Util.isHezi&&window.open("login://close")}),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';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';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 o="//ka.duowan.com/login/weixin/?type=1&url="+encodeURIComponent(location.href);$.get(o,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 o="//ka.duowan.com/qq/getUserInfo/?url="+encodeURIComponent(location.href);$.get(o,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(o){0==o.bindList.length?(i.yyLoginTip.show(),i.loginMaskObj.show()):Util.isHezi&&window.open("login://close")})}},showNickNameTip:function(i,o){var n=this.setNickNameTip.children(".input-tip-icon"),t=this.setNickNameTip.children("em");i?n.addClass("succ"):n.removeClass("succ"),t.text(o),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()},loginExtention:function(){return!0}};var _appid="",_baseURL="",_thirdLoginStyle="duowan",__UDBLogin=new UDBLogin(_appid,_baseURL),__ThirdLogin=new ThirdLogin(_appid,_baseURL,_thirdLoginStyle);Util.setDefaultSuccCb().checkLogin(),window.dwUDBProxy={login:function(i,o){try{return o&&(__UDBLogin.setAppid(o),__ThirdLogin.setAppid(o)),Util.useMultiLogin()?this.multiLogin(i):__UDBLogin.login(i)}catch(n){}},wxLogin:function(i,o){try{return o&&(__UDBLogin.setAppid(o),__ThirdLogin.setAppid(o)),Util.useMultiLogin()?__ThirdLogin.wxLogin(i):__UDBLogin.login(i)}catch(n){}},register:function(i){return __ThirdLogin.register(i)},kaLogin:function(i){return __ThirdLogin.kaLogin(i)},multiLogin:function(i){try{return __ThirdLogin.multiLogin(i)}catch(o){}},mobileLogin:function(i){return __ThirdLogin.mobileLogin(i)},logout:function(i){try{return __UDBLogin.logout(i)}catch(o){}},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(o){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,o){return __ThirdLogin.bind(i,o)},unBind:function(i,o){return __ThirdLogin.unBind(i,o)},isWap:Util.isWap,getUser:function(i){return __ThirdLogin.getUser(i)}},$(function(){__UDBLogin.embedLogin("#login-embed","","xelogin"),__UDBLogin.embedLogin("#mlogin-embed","","xemlogin")})}}(window,jQuery);