!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),p=0,r=c.length;r>p;p++){if(l=c[p].match(/([^=]+)=/i),l instanceof Array)try{t=decode(l[1]),e=a(c[p].substring(l[1].length+1))}catch(s){}else t=decode(c[p]),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:[]},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(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")},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},allowShowTips:function(){for(var i=Config.showTips.domainExcludeMap,n=0;n=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 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(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")):n.UDBCallbacks.add(function(n){n.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()},h5MultiLogin:function(i){this.initMutilH5LoginPopup(i),this.multiLoginPopupObj.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){this.bindOauth(i,n)},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";if(n=Util.handleSuccessURL(n,function(){t.closeLoginPopup()},function(i){t.reloadPage(i)}),"yy"==i)var l="//www.duowan.com/mlogin/?calbackUrl="+encodeURIComponent(n);else{/sid=\d+/g.test(n)&&(n=n.replace(/sid=\d+/g,""));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){var o=this,t="bindAuthorizeURL";n=Util.handle2SuccessURL(n,function(i){o.reloadPage(i)});var e=this.baseURL+"?do="+t+"&appid="+this.appid+"&loginType="+i+"&callbackUrl="+encodeURIComponent(n);this.minWindow=dwClientIncompatible.open(e,"_loginWin"),dwClientIncompatible.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 ',__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},initMutilH5LoginPopup: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-h5-login"),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},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 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()):Util.isHezi&&window.open("login://close")})}},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()},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,n){try{return n&&(__UDBLogin.setAppid(n),__ThirdLogin.setAppid(n)),Util.useMultiLogin()?this.multiLogin(i):__UDBLogin.login(i)}catch(o){}},h5Login:function(i,n){try{return n&&(__UDBLogin.setAppid(n),__ThirdLogin.setAppid(n)),Util.useMultiLogin()?__ThirdLogin.h5MultiLogin(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){return __ThirdLogin.bind(i,n)},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);