12 |
- !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<i.length;n++){var o=i[n];if(location.hostname.indexOf(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 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($('<iframe frameborder="0" scrolling="no" allowtransparency="true"></iframe>').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<n.length;l++)t=n[l],e=Util.getCookie(t),null!=e&&(o[t]=e);-1!=location.hostname.indexOf("ouj")?$.ajax({url:Util.toDecorateURL("//udbproxy.ouj.com/writeOujCookie"),data:o,dataType:"jsonp",complete:function(){i()}}):i()},initLoginTip:function(){if($(".account-login-mask").length)return this;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)}.dw-account-login-pop{position:fixed;top:50%;left:50%;z-index:20001;display:none;margin:-146px 0 0 -228px;width:455px;border-radius:3px;background:#fff;box-shadow:3px 3px 10px rgba(0,0,0,.3);font-family:Microsoft Yahei}.dw-account-h5-login{position:fixed;top:50%;left:50%;z-index:20001;display:none;margin:-146px 0 0 -228px;width:455px;border-radius:3px;background:#fff;font-family:Microsoft Yahei}.dw-account-h5-login .tt h3{color:#666;font-size:18px;display:flex;align-items:center}.dw-account-h5-login .tt h3::before,.dw-account-h5-login .tt h3::after{display:inline-block;content:'';width:60px;height:1px;background-color:#DDD}.dw-account-h5-login .tt span{margin-left:10px;margin-right:10px}.dw-account-h5-login .dw-login-inner{width:auto!important;display:flex;flex-direction:column;align-items:center}.dw-account-login-pop .close{position:absolute;top:0;right:-24px;width:14px;height:14px;background:url(http://pub.ouj.com/common//dwUDBProxy/img/close-icon_8635244.png) no-repeat;cursor:pointer;font-size:0}.dw-account-login-pop .close:hover{background-image:url(http://pub.ouj.com/common//dwUDBProxy/img/close-icon-hover_ae1378d.png)}.dw-login-wrap{background:#fff}.dw-login-inner{padding:0 0 25px;width:356px;margin:0 auto}.dw-login-inner h3{color:#000003;font-size:20px;line-height:32px;margin:40px 0 23px;text-align:center;font-weight:700}.dw-login-inner ul{overflow:hidden;margin:0 -43px 0 0;list-style:none;padding:0;text-align:center;font-size:0}.dw-login-inner li{display:inline-block;*display:inline;zoom:1;vertical-align:top;width:120px;margin-right:43px;cursor:pointer;color:#333}.dw-login-inner li span{font-size:14px}.dw-login-inner .login-btn-yy{width:88px;height:88px;background:url(http://pub.ouj.com/common//dwUDBProxy/img/icon-yy_86c2987.png) no-repeat}.dw-login-inner .login-btn-wechat{width:88px;height:88px;background:url(http://pub.ouj.com/common//dwUDBProxy/img/icon-wx_7091937.png) no-repeat;margin:0 auto}.dw-login-inner .login-btn-qq{width:88px;height:88px;background:url(http://pub.ouj.com/common//dwUDBProxy/img/icon-qq_d8c96af.png) no-repeat;margin:0 auto}.dw-login-inner li:hover{opacity:.85;color:#fa0}.dw-login-inner img{display:block;width:100%;overflow:hidden}.dw-login-inner p{text-align:center;line-height:46px;font-size:14px;margin:0}.dw-login-inner .dw-account-other-login{font-size:14px;line-height:36px;color:#333;text-align:left;padding-top:5px;overflow:hidden;border-top:1px dashed #e3e3e3}.dw-account-other-login button{background:transparent;border:0;outline:0;color:#0075a9;cursor:pointer}.dw-account-other-login .login-btn-old{float:right;line-height:38px;height:36px;background:transparent;border:0;outline:0;color:#0075a9;cursor:pointer;padding:0;padding-right:10px;background:url(http://pub.ouj.com/common//dwUDBProxy/img/gItem-more_c4400f2.png) no-repeat right center}.dw-account-login-pop.wap{width:305px;border-radius:6px;margin:-103px 0 0 -152px;overflow:hidden;font-family:PingFangSC-Regular,Microsoft Yahei}.dw-account-login-pop.wap .close{display:none}.wap .dw-login-inner{width:225px;padding:0}.wap .dw-login-inner h3{margin:20px 0 25px}.wap .dw-login-inner ul{margin-right:-30px;border-bottom:0}.wap .dw-login-inner li{width:55px;margin-right:30px}.wap .dw-login-inner .login-btn-yy{width:55px;height:55px;background-size:100%}.wap .dw-login-inner .login-btn-wechat{width:55px;height:55px;background-size:100%}.wap .dw-login-inner .login-btn-qq{width:55px;height:55px;background-size:100%}.wap .dw-login-inner p{font-size:12px;line-height:2.5;color:#414141}.wap .dw-account-other-login{font-size:15px;line-height:44px;border-width:1px 0;border-top:1px solid #e0e0e0;margin:0;text-align:center;color:#333}.wap .dw-account-other-login button{font-size:15px;color:#333}.wap.dw-account-login-pop .close{position:static;display:block;width:100%;height:45px;font-size:17px;line-height:45px;color:#007aff;text-align:center;border-top:1px solid #e0e0e0}.wap.dw-account-login-pop .close:hover{background:0 0}.dw-account-login-tip{position:fixed;top:50%;left:50%;z-index:20001;display:none;margin:-146px 0 0 -228px;width:455px;border-radius:3px;background:#fff;box-shadow:3px 3px 10px rgba(0,0,0,.3);font-family:Microsoft Yahei}.dw-account-login-tip.bbs-setnick{width:520px;margin-left:-260px}.dw-account-login-tip.bbs-setnick.bbs-theme .bbs-setnick-box{position:relative;background:#fff;overflow:hidden}.dw-account-login-tip.bbs-setnick.bbs-theme:before{content:'';position:absolute;left:-10px;top:-10px;bottom:-10px;right:-10px;background:#b0b0b0;background:rgba(0,0,0,.3);border-radius:10px}.dw-account-login-tip.bbs-theme .dw-account-tip-title{color:#369}.dw-account-login-tip.bbs-theme .close{top:11px;right:11px;width:24px;height:24px;background-image:url(http://pub.ouj.com/common//dwUDBProxy/img/bbs-theme-close_ab66e0f.png)}.dw-account-login-tip.bbs-theme .close:hover{background-image:url(http://pub.ouj.com/common//dwUDBProxy/img/bbs-theme-close-hover_6c7e09f.png)}.dw-account-login-tip.bbs-setnick.bbs-theme .dw-account-tip-tools{margin:47px 0 0;padding:21px 0;background-color:#e5ecf2}.dw-account-login-tip.bbs-theme .dw-account-tip-tools .dw-account-tip-confirm{width:119px;background-color:#236cb7}.dw-account-login-tip.bbs-theme .dw-account-tip-tools .dw-account-tip-confirm:hover{background-color:#245aa9;border-color:#245aa9}.dw-account-login-tip .close{position:absolute;top:0;right:-24px;width:14px;height:14px;background:url(http://pub.ouj.com/common//dwUDBProxy/img/close-icon_8635244.png) no-repeat;cursor:pointer;font-size:0}.dw-account-login-tip .close:hover{background-image:url(http://pub.ouj.com/common//dwUDBProxy/img/close-icon-hover_ae1378d.png)}.dw-account-login-tip .dw-account-tip-title{color:#000003;font-size:20px;line-height:32px;margin:40px 0 23px;text-align:center;font-weight:700}.dw-account-login-tip .login-succ-icon{display:inline-block;*display:inline;*zoom:1;vertical-align:top;width:27px;height:32px;margin-right:10px;background:url(http://pub.ouj.com/common//dwUDBProxy/img/login-succ-icon_39cf196.png) no-repeat 0 6px}.dw-account-login-tip .dw-account-tip-cont{font-size:16px;line-height:36px;color:#333;text-align:center}.dw-account-login-tip .dw-account-tip-cont-wan{font-size:16px;line-height:36px;color:#333;padding:0 30px}.dw-account-login-tip .dw-account-tip-cont-wan .text{text-indent:30px}.dw-account-login-tip .dw-account-tip-cont .dw-account-input-box{position:relative;width:274px;margin:0 auto}.dw-account-input-box .dw-account-input-tip{position:absolute;left:280px;top:0;width:112px;font-size:0;display:none}.dw-account-input-box .dw-account-input-tip .input-tip-icon{display:inline-block;*display:inline;*zoom:1;width:16px;height:16px;margin-right:5px;background:url(http://pub.ouj.com/common//dwUDBProxy/img/error-icon_bcd3446.png) no-repeat;vertical-align:top;margin-top:10px}.dw-account-input-box .dw-account-input-tip .input-tip-icon.succ{background-image:url(http://pub.ouj.com/common//dwUDBProxy/img/succ-icon_ca47602.png)}.dw-account-input-box .dw-account-input-tip em{display:inline-block;*display:inline;*zoom:1;width:90px;margin-top:7px;vertical-align:top;font-style:normal;font-size:14px;line-height:1.6;color:#666;text-align:left}.dw-account-login-tip .dw-account-tip-cont input{display:block;width:262px;height:32px;padding:0;padding-left:10px;border:1px solid #bdc3c7;border-radius:2px;font-size:14px;color:#333;line-height:34px}.dw-account-login-tip.bbs-setnick .dw-account-tip-tools{margin-top:30px}.dw-account-login-tip .dw-account-nickname-tip{width:262px;padding:5px;margin:20px auto 0;font-size:12px;line-height:20px;color:#666;border:1px solid #f3d19c;background-color:#fff6e9}.dw-account-login-tip .dw-account-tip-tools{font-size:0;text-align:center;margin:37px 0 50px}.dw-account-login-tip .dw-account-tip-tools a,.dw-account-login-tip .dw-account-tip-tools button{display:inline-block;*display:inline;*zoom:1;box-sizing:content-box;width:90px;height:32px;padding:0;margin:0 10px;background:transparent;font-size:14px;line-height:32px;color:#596d81;border:1px solid #596d81;border-radius:2px;outline:0;text-decoration:none;vertical-align:top;cursor:pointer}.dw-account-login-tip .dw-account-tip-tools .dw-account-tip-cancel:hover{background-color:#e9eff4}.dw-account-login-tip .dw-account-tip-tools .dw-account-tip-confirm{color:#fff;background-color:#596d81}.dw-account-login-tip .dw-account-tip-tools .dw-account-tip-confirm:hover{background-color:#7992ab;border-color:#7992ab}.wap.dw-account-login-tip.bbs-setnick{width:320px;margin:0;transform:translate(-50%,-50%)}.wap .dw-account-input-box .dw-account-input-tip{position:static;height:20px;width:100%;padding:5px 0 0;line-height:20px;text-align:left}.wap .dw-account-input-box .dw-account-input-tip .input-tip-icon{margin:3px 0}.wap .dw-account-input-box .dw-account-input-tip em{width:80%;margin-top:0}.wap .dw-account-login-tip .close{right:-20px}.wap.dw-account-login-tip .dw-account-nickname-tip{margin-top:10px}@media screen and (max-width:374px){.wap.dw-account-login-tip.bbs-setnick{width:280px}.wap.dw-account-login-tip .close{right:-18px}}",loginTipTpl=function(obj){{var __t,__p="";Array.prototype.join}with(obj||{})__p+='<!--登录成功的提示-->\r\n<div class="account-login-mask" style="display:none;"></div>\r\n<div class="dw-account-login-tip wan-style" id="yyLoginTip">\r\n <div class="dw-account-tip-title">多玩游戏大厅绑定提示</div>\r\n <div class="dw-account-tip-cont-wan">\r\n <p>尊敬的用户:</p>\r\n <p class="text">我们将对多玩游戏"帐号体系"进行调整,12月31日调整后将不支持通过YY帐号进行登录游戏,请您及时将"YY"帐号进行绑定为"微信"或"QQ"帐号。\r\n </p>\r\n </div>\r\n <div class="dw-account-tip-tools">\r\n <!-- <button class="dw-account-tip-cancel">跳过</button> -->\r\n <!-- <a href="http://grzx.duowan.com.webdev.ouj.com/index.php?r=default/bind" target="_blank" class="dw-account-tip-confirm" title="去绑定第三方账号">去绑定</a> -->\r\n ',__p+=isHezi?'\r\n <a href="http://account.duowan.com/wotbind" target="_blank" class="dw-account-tip-confirm" title="去绑定第三方账号">去绑定</a>\r\n ':'\r\n <a href="http://account.duowan.com/bind" target="_blank" class="dw-account-tip-confirm" title="去绑定第三方账号">去绑定</a>\r\n ',__p+='\r\n </div>\r\n <!-- <a class="close" title="关闭">退出</a> -->\r\n</div>\r\n\r\n<div class="dw-account-login-tip bbs-setnick '+(null==(__t=isBBS&&"bbs-theme")?"":__t)+" "+(null==(__t=isWap&&"wap")?"":__t)+'" id="setNickNameTip">\r\n <div class="bbs-setnick-box">\r\n <div class="dw-account-tip-title">请确定您的昵称</div>\r\n <div class="dw-account-tip-cont">\r\n <div class="dw-account-input-box">\r\n <input type="text" placeholder="请输入您的昵称" />\r\n <div class="dw-account-input-tip">\r\n <i class="input-tip-icon succ"></i>\r\n <em>已存在</em>\r\n </div>\r\n </div>\r\n <div class="dw-account-nickname-tip">\r\n 昵称要求6-15个字符,且第一个字符必须是中文允许使用汉字、数字、字母以及|、。-等符号\r\n </div>\r\n </div>\r\n <div class="dw-account-tip-tools">\r\n <button class="dw-account-tip-confirm nickname-submit">确认</button>\r\n <button class="dw-account-tip-confirm nickname-logout">退出登录</button>\r\n </div>\r\n <a class="close" title="关闭">退出</a>\r\n </div>\r\n</div>';return __p};$("body").append("<style>"+cssStyle+"</style>"),$("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<div class="dw-account-h5-login '+(null==(__t=wap&&"wap")?"":__t)+'">\r\n <div class="dw-login-wrap">\r\n <div class="dw-login-inner">\r\n <div class="tt">\r\n <h3><span>第三方登录</span></h3>\r\n </div>\r\n <ul>\r\n ',dropYYLogin||(__p+='\r\n <li>\r\n <div class="login-btn-yy" title="YY'+(null==(__t=typeText)?"":__t)+'"></div>\r\n <p>YY'+(null==(__t=typeText)?"":__t)+"</p>\r\n </li>\r\n "),__p+='\r\n \r\n <li style="margin-right:40px;">\r\n <div class="login-btn-qq" title="QQ'+(null==(__t=typeText)?"":__t)+'"></div>\r\n <p>QQ'+(null==(__t=typeText)?"":__t)+'</p>\r\n </li>\r\n <li>\r\n <div class="login-btn-wechat" title="微信'+(null==(__t=typeText)?"":__t)+'"></div>\r\n <p>微信'+(null==(__t=typeText)?"":__t)+'</p>\r\n </li>\r\n </ul>\r\n <!-- <a href="http://yxdt.duowan.com/1912/440606841331.html" style="text-align:center;display: block;" target="_blank">关于多玩游戏YY帐号体系调整公告</a> -->\r\n ',wap||dropSinaLogin||(__p+='\r\n <p class="dw-account-other-login">\r\n ',"login"==type&&(__p+='\r\n <button type="button" class="login-btn-old" title="旧版第三方登录">旧版第三方登录</button>\r\n '),__p+="\r\n 其它"+(null==(__t=typeText)?"":__t)+'方式:<button type="button" class="login-btn-weibo" title="新浪微博'+(null==(__t=typeText)?"":__t)+'">新浪微博</button>\r\n </p>\r\n '),__p+="\r\n </div>\r\n </div>\r\n ",wap&&!dropSinaLogin&&(__p+='\r\n <p class="dw-account-other-login">\r\n <button type="button" class="login-btn-weibo">新浪微博</button>\r\n </p>\r\n '),__p+="\r\n\r\n <!-- ",dropYYLogin&&(__p+='\r\n <p class="dw-account-other-login">\r\n <button type="button" class="login-btn-yy">YY登录</button>\r\n </p>\r\n '),__p+=" -->\r\n</div>\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<div class="dw-account-login-pop '+(null==(__t=wap&&"wap")?"":__t)+'">\r\n <div class="dw-login-wrap">\r\n <div class="dw-login-inner">\r\n <h3>请选择您的'+(null==(__t=typeText)?"":__t)+"方式</h3>\r\n <ul>\r\n ",dropYYLogin||(__p+='\r\n <li>\r\n <div class="login-btn-yy" title="YY'+(null==(__t=typeText)?"":__t)+'"></div>\r\n <p>YY'+(null==(__t=typeText)?"":__t)+"</p>\r\n </li>\r\n "),__p+='\r\n \r\n <li>\r\n <div class="login-btn-qq" title="QQ'+(null==(__t=typeText)?"":__t)+'"></div>\r\n <p>QQ'+(null==(__t=typeText)?"":__t)+'</p>\r\n </li>\r\n <li>\r\n <div class="login-btn-wechat" title="微信'+(null==(__t=typeText)?"":__t)+'"></div>\r\n <p>微信'+(null==(__t=typeText)?"":__t)+'<span> (推荐)</span></p>\r\n </li>\r\n </ul>\r\n <!-- <a href="http://yxdt.duowan.com/1912/440606841331.html" style="text-align:center;display: block;" target="_blank">关于多玩游戏YY帐号体系调整公告</a> -->\r\n <p style="line-height: 18px;color: #666;font-size: 12px;">提示:“QQ登录”不支持扫码登录,请选择账号密码登录</p>\r\n ',wap||dropSinaLogin||(__p+='\r\n <p class="dw-account-other-login">\r\n ',"login"==type&&(__p+='\r\n <button type="button" class="login-btn-old" title="旧版第三方登录">旧版第三方登录</button>\r\n '),__p+="\r\n 其它"+(null==(__t=typeText)?"":__t)+'方式:<button type="button" class="login-btn-weibo" title="新浪微博'+(null==(__t=typeText)?"":__t)+'">新浪微博</button>\r\n </p>\r\n '),__p+="\r\n </div>\r\n </div>\r\n ",wap&&!dropSinaLogin&&(__p+='\r\n <p class="dw-account-other-login">\r\n <button type="button" class="login-btn-weibo">新浪微博</button>\r\n </p>\r\n '),__p+="\r\n\r\n <!-- ",dropYYLogin&&(__p+='\r\n <p class="dw-account-other-login">\r\n <button type="button" class="login-btn-yy">YY登录</button>\r\n </p>\r\n '),__p+=' -->\r\n <a class="close" title="关闭">退出</a>\r\n</div>\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+='<div class="account-login-mask" style="display:none;"></div>\r\n<div class="account-login-pop">\r\n <div class="login">\r\n <div class="login-main">\r\n <div class="login-hd">\r\n <a class="tab-btn active" id="login-btn">登录</a>\r\n <a class="tab-btn" id="register-btn" href="https://aq.yy.com/p/reg/mobile.do?fromadv=lgn&appid=5764" target="_blank">注册</a>\r\n <i class="line" id="line"></i>\r\n </div>\r\n <div class="login-bd">\r\n <div class="login-content">\r\n <div class="tab-unit" style="display:block;">\r\n <div id="login-tab">\r\n <h2 class="login-title">帐号登录</h2>\r\n <div id="udbsdk_login_content">\r\n <div id="udbsdk_login_normal" class="udbsdk_login" style="display: block;">\r\n </div>\r\n </div> \r\n </div>\r\n </div>\r\n </div>\r\n <i class="login-loading"></i>\r\n </div>\r\n </div>\r\n <div class="login-sidebar">\r\n <h2 class="title">合作账号登录</h2>\r\n <div class="other-login">\r\n <a class="login-btn login-btn-wechat clickstat" eid="click/nav/weixinlogin" eid_desc="点击/导航/微信账号登录"><i class="icon"></i>微信帐号登录</a>\r\n <a class="login-btn login-btn-qq hiido_stat clickstat" hiido_code="10003435" eid="click/nav/qqlogin" eid_desc="点击/导航/QQ账号登录" login-type="qq"><i class="icon"></i>QQ帐号登录</a>\r\n <a class="login-btn login-btn-weibo hiido_stat clickstat" hiido_code="10003437" eid="click/nav/weibologin" eid_desc="点击/导航/新浪微博登录" login-type="weibo"><i class="icon"></i>微博帐号登录</a>\r\n </div>\r\n </div>\r\n </div>\r\n <a class="close" title="关闭"></a>\r\n</div>';return __p}();$("body").append("<style>"+cssStyle+"</style>"),$("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+='<div class="account-login-mask" style="display:none;"></div>\r\n<div class="account-login-pop">\r\n <div class="login">\r\n <div class="login-main">\r\n <div class="login-hd">\r\n <a class="tab-btn active" id="login-btn">登录</a>\r\n <a class="tab-btn" id="register-btn" href="https://aq.yy.com/p/reg/mobile.do?fromadv=lgn&appid=5764" target="_blank">注册</a>\r\n <i class="line" id="line"></i>\r\n </div>\r\n <div class="login-bd">\r\n <div class="login-content">\r\n <div class="tab-unit" style="display:block;">\r\n <div id="login-tab">\r\n <h2 class="login-title">帐号登录</h2>\r\n <div id="udbsdk_login_content">\r\n <div id="udbsdk_login_normal" class="udbsdk_login" style="display: block;">\r\n </div>\r\n </div> \r\n </div>\r\n </div>\r\n </div>\r\n <i class="login-loading"></i>\r\n </div>\r\n </div>\r\n <div class="login-sidebar">\r\n <h2 class="title">合作账号登录</h2>\r\n <div class="other-login">\r\n <a class="login-btn login-btn-wechat clickstat" eid="click/nav/weixinlogin" eid_desc="点击/导航/微信账号登录"><i class="icon"></i>微信帐号登录</a>\r\n <a class="login-btn login-btn-qq hiido_stat clickstat" hiido_code="10003435" eid="click/nav/qqlogin" eid_desc="点击/导航/QQ账号登录" login-type="qq"><i class="icon"></i>QQ帐号登录</a>\r\n <a class="login-btn login-btn-weibo hiido_stat clickstat" hiido_code="10003437" eid="click/nav/weibologin" eid_desc="点击/导航/新浪微博登录" login-type="weibo"><i class="icon"></i>微博帐号登录</a>\r\n </div>\r\n </div>\r\n </div>\r\n <a class="close" title="关闭"></a>\r\n</div>';return __p}(),$loginPopupTpl=$(loginPopupTpl);$loginPopupTpl.find(".login-btn-weibo").remove(),$("body").append("<style>"+cssStyle+"</style>"),$("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);
|