123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654 |
- (function(win, doc) {
- var md5=window.md5||{};!function(){function r(r){return C(t(A(r),r.length*S))}function t(r,t){r[t>>5]|=128<<t%32,r[(t+64>>>9<<4)+14]=t;for(var n=1732584193,h=-271733879,u=-1732584194,A=271733878,d=0;d<r.length;d+=16){var C=n,i=h,g=u,v=A;n=e(n,h,u,A,r[d+0],7,-680876936),A=e(A,n,h,u,r[d+1],12,-389564586),u=e(u,A,n,h,r[d+2],17,606105819),h=e(h,u,A,n,r[d+3],22,-1044525330),n=e(n,h,u,A,r[d+4],7,-176418897),A=e(A,n,h,u,r[d+5],12,1200080426),u=e(u,A,n,h,r[d+6],17,-1473231341),h=e(h,u,A,n,r[d+7],22,-45705983),n=e(n,h,u,A,r[d+8],7,1770035416),A=e(A,n,h,u,r[d+9],12,-1958414417),u=e(u,A,n,h,r[d+10],17,-42063),h=e(h,u,A,n,r[d+11],22,-1990404162),n=e(n,h,u,A,r[d+12],7,1804603682),A=e(A,n,h,u,r[d+13],12,-40341101),u=e(u,A,n,h,r[d+14],17,-1502002290),h=e(h,u,A,n,r[d+15],22,1236535329),n=o(n,h,u,A,r[d+1],5,-165796510),A=o(A,n,h,u,r[d+6],9,-1069501632),u=o(u,A,n,h,r[d+11],14,643717713),h=o(h,u,A,n,r[d+0],20,-373897302),n=o(n,h,u,A,r[d+5],5,-701558691),A=o(A,n,h,u,r[d+10],9,38016083),u=o(u,A,n,h,r[d+15],14,-660478335),h=o(h,u,A,n,r[d+4],20,-405537848),n=o(n,h,u,A,r[d+9],5,568446438),A=o(A,n,h,u,r[d+14],9,-1019803690),u=o(u,A,n,h,r[d+3],14,-187363961),h=o(h,u,A,n,r[d+8],20,1163531501),n=o(n,h,u,A,r[d+13],5,-1444681467),A=o(A,n,h,u,r[d+2],9,-51403784),u=o(u,A,n,h,r[d+7],14,1735328473),h=o(h,u,A,n,r[d+12],20,-1926607734),n=a(n,h,u,A,r[d+5],4,-378558),A=a(A,n,h,u,r[d+8],11,-2022574463),u=a(u,A,n,h,r[d+11],16,1839030562),h=a(h,u,A,n,r[d+14],23,-35309556),n=a(n,h,u,A,r[d+1],4,-1530992060),A=a(A,n,h,u,r[d+4],11,1272893353),u=a(u,A,n,h,r[d+7],16,-155497632),h=a(h,u,A,n,r[d+10],23,-1094730640),n=a(n,h,u,A,r[d+13],4,681279174),A=a(A,n,h,u,r[d+0],11,-358537222),u=a(u,A,n,h,r[d+3],16,-722521979),h=a(h,u,A,n,r[d+6],23,76029189),n=a(n,h,u,A,r[d+9],4,-640364487),A=a(A,n,h,u,r[d+12],11,-421815835),u=a(u,A,n,h,r[d+15],16,530742520),h=a(h,u,A,n,r[d+2],23,-995338651),n=c(n,h,u,A,r[d+0],6,-198630844),A=c(A,n,h,u,r[d+7],10,1126891415),u=c(u,A,n,h,r[d+14],15,-1416354905),h=c(h,u,A,n,r[d+5],21,-57434055),n=c(n,h,u,A,r[d+12],6,1700485571),A=c(A,n,h,u,r[d+3],10,-1894986606),u=c(u,A,n,h,r[d+10],15,-1051523),h=c(h,u,A,n,r[d+1],21,-2054922799),n=c(n,h,u,A,r[d+8],6,1873313359),A=c(A,n,h,u,r[d+15],10,-30611744),u=c(u,A,n,h,r[d+6],15,-1560198380),h=c(h,u,A,n,r[d+13],21,1309151649),n=c(n,h,u,A,r[d+4],6,-145523070),A=c(A,n,h,u,r[d+11],10,-1120210379),u=c(u,A,n,h,r[d+2],15,718787259),h=c(h,u,A,n,r[d+9],21,-343485551),n=f(n,C),h=f(h,i),u=f(u,g),A=f(A,v)}return Array(n,h,u,A)}function n(r,t,n,e,o,a){return f(u(f(f(t,r),f(e,a)),o),n)}function e(r,t,e,o,a,c,h){return n(t&e|~t&o,r,t,a,c,h)}function o(r,t,e,o,a,c,h){return n(t&o|e&~o,r,t,a,c,h)}function a(r,t,e,o,a,c,h){return n(t^e^o,r,t,a,c,h)}function c(r,t,e,o,a,c,h){return n(e^(t|~o),r,t,a,c,h)}function h(r,n){var e=A(r);e.length>16&&(e=t(e,r.length*S));for(var o=Array(16),a=Array(16),c=0;16>c;c++)o[c]=909522486^e[c],a[c]=1549556828^e[c];var h=t(o.concat(A(n)),512+n.length*S);return t(a.concat(h),640)}function f(r,t){var n=(65535&r)+(65535&t),e=(r>>16)+(t>>16)+(n>>16);return e<<16|65535&n}function u(r,t){return r<<t|r>>>32-t}function A(r){for(var t=Array(),n=(1<<S)-1,e=0;e<r.length*S;e+=S)t[e>>5]|=(r.charCodeAt(e/S)&n)<<e%32;return t}function d(r){for(var t="",n=(1<<S)-1,e=0;e<32*r.length;e+=S)t+=String.fromCharCode(r[e>>5]>>>e%32&n);return t}function C(r){for(var t=m?"0123456789ABCDEF":"0123456789abcdef",n="",e=0;e<4*r.length;e++)n+=t.charAt(r[e>>2]>>e%4*8+4&15)+t.charAt(r[e>>2]>>e%4*8&15);return n}function i(r){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="",e=0;e<4*r.length;e+=3)for(var o=(r[e>>2]>>8*(e%4)&255)<<16|(r[e+1>>2]>>8*((e+1)%4)&255)<<8|r[e+2>>2]>>8*((e+2)%4)&255,a=0;4>a;a++)n+=8*e+6*a>32*r.length?s:t.charAt(o>>6*(3-a)&63);return n}function g(r){function t(r,t){var n=r<<t|r>>>32-t;return n}function n(r){var t,n,e="";for(t=7;t>=0;t--)n=r>>>4*t&15,e+=n.toString(16);return e}function e(r){r=r.replace(/\r\n/g,"\n");for(var t="",n=0;n<r.length;n++){var e=r.charCodeAt(n);128>e?t+=String.fromCharCode(e):e>127&&2048>e?(t+=String.fromCharCode(e>>6|192),t+=String.fromCharCode(63&e|128)):(t+=String.fromCharCode(e>>12|224),t+=String.fromCharCode(e>>6&63|128),t+=String.fromCharCode(63&e|128))}return t}var o,a,c,h,f,u,A,d,C,i=new Array(80),g=1732584193,v=4023233417,l=2562383102,m=271733878,s=3285377520;r=e(r);var S=r.length,b=new Array;for(a=0;S-3>a;a+=4)c=r.charCodeAt(a)<<24|r.charCodeAt(a+1)<<16|r.charCodeAt(a+2)<<8|r.charCodeAt(a+3),b.push(c);switch(S%4){case 0:a=2147483648;break;case 1:a=r.charCodeAt(S-1)<<24|8388608;break;case 2:a=r.charCodeAt(S-2)<<24|r.charCodeAt(S-1)<<16|32768;break;case 3:a=r.charCodeAt(S-3)<<24|r.charCodeAt(S-2)<<16|r.charCodeAt(S-1)<<8|128}for(b.push(a);b.length%16!=14;)b.push(0);for(b.push(S>>>29),b.push(S<<3&4294967295),o=0;o<b.length;o+=16){for(a=0;16>a;a++)i[a]=b[o+a];for(a=16;79>=a;a++)i[a]=t(i[a-3]^i[a-8]^i[a-14]^i[a-16],1);for(h=g,f=v,u=l,A=m,d=s,a=0;19>=a;a++)C=t(h,5)+(f&u|~f&A)+d+i[a]+1518500249&4294967295,d=A,A=u,u=t(f,30),f=h,h=C;for(a=20;39>=a;a++)C=t(h,5)+(f^u^A)+d+i[a]+1859775393&4294967295,d=A,A=u,u=t(f,30),f=h,h=C;for(a=40;59>=a;a++)C=t(h,5)+(f&u|f&A|u&A)+d+i[a]+2400959708&4294967295,d=A,A=u,u=t(f,30),f=h,h=C;for(a=60;79>=a;a++)C=t(h,5)+(f^u^A)+d+i[a]+3395469782&4294967295,d=A,A=u,u=t(f,30),f=h,h=C;g=g+h&4294967295,v=v+f&4294967295,l=l+u&4294967295,m=m+A&4294967295,s=s+d&4294967295}var C=n(g)+n(v)+n(l)+n(m)+n(s);return C.toLowerCase()}function v(r){var t,n,e,o,a,c,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(e=r.length,n=0,t="";e>n;){if(o=255&r.charCodeAt(n++),n==e){t+=h.charAt(o>>2),t+=h.charAt((3&o)<<4),t+="==";break}if(a=r.charCodeAt(n++),n==e){t+=h.charAt(o>>2),t+=h.charAt((3&o)<<4|(240&a)>>4),t+=h.charAt((15&a)<<2),t+="=";break}c=r.charCodeAt(n++),t+=h.charAt(o>>2),t+=h.charAt((3&o)<<4|(240&a)>>4),t+=h.charAt((15&a)<<2|(192&c)>>6),t+=h.charAt(63&c)}return t}function l(r,t){for(var n="",e=0,o=r.length,a=t.length;o>e&&!(e>=a);e++)n+=String.fromCharCode(r.charCodeAt(e)^t.charCodeAt(e));return n}md5.xor=l,md5.sha1=g,md5.hex_md5=r,md5.base64encode=v;var m=0,s="",S=8}();;
- var cssStyle = ".dw-mini-popup-wrap{position:fixed;right:-380px;bottom:0;width:300px;height:426px;background:#fff;box-shadow:0 0 3px 0 #dcdcdc;*border:1px solid #f6f6f6;font-family:\"Microsoft Yahei\";z-index:1001;text-align:left}.dw-mini-popup-wrap.show{right:0}.dw-mini-popup{position:relative;width:100%;height:100%}.dw-mini-popup ul{list-style:none;margin:0;padding:0}.dw-mini-popup a{text-decoration:none}.dw-mini-popup .footer-shadow{position:absolute;left:0;width:100%;bottom:0;background-color:#000;background-color:rgba(0,0,0,.8);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);color:#fff;font:12px/24px Simsun;text-align:center}.dw-mini-popup .news-image{display:block;width:100%;border:0}.dw-mini-popup .news-link{position:relative;display:block;color:#333;overflow:hidden}.dw-mini-popup .dw-popup-title{height:40px;padding-left:10px;background:#e94646;overflow:hidden}.dw-popup-title .popup-title{float:left;height:100%}.dw-popup-title .dw-popup-hide{float:right;width:8px;height:40px;padding:0 10px;background:url(http://pub.ouj.com/common//newsPopup/assets/popup_hide_daaa1a4.png) no-repeat center;cursor:pointer}.dw-popup-title .dw-popup-hide:hover{background-color:#ed6c6c}.dw-popup-title .web-address{float:left;cursor:pointer}.dw-popup-title .dw-popup-icon{float:left;height:40px;width:26px;background:url(http://pub.ouj.com/common//newsPopup/assets/dw_mini_popup_logo_558e01d.png) no-repeat center}.dw-popup-title .popup-title .dw-name{float:left;width:60px;height:20px;background:url(http://pub.ouj.com/common//newsPopup/assets/dw_big_text_1c49840.png) no-repeat center;margin:10px 5px;color:#fff}.dw-popup-title .popup-title .dw-popup-tip{float:left;margin-top:18px;*margin-top:16px;font:12px/1 SimSun;color:#ffc0c0}.dw-mini-popup .dw-mini-popup-nav{border-bottom:1px solid #e3e3e3;background:#fafafa;font-size:14px;line-height:33px;text-align:center}.dw-mini-popup .dw-mini-popup-nav .dw-mini-nav-list{height:34px;margin:0 -30px 0 0}.dw-mini-popup .dw-mini-popup-nav .dw-mini-nav-item{position:relative;display:inline-block;*display:inline;*zoom:1;margin-right:30px;color:#333;cursor:pointer}.dw-mini-popup .dw-mini-popup-nav .have-award:after{content:'';position:absolute;left:-5px;top:0;height:100%;width:42px;background:#fafafa url(http://pub.ouj.com/common//newsPopup/assets/kadow_active_41043b5.gif) no-repeat left center}.dw-mini-popup .dw-mini-popup-nav .dw-mini-nav-item.active{border-bottom:2px solid #e94646;font-weight:700;color:#e94646}.dw-mini-popup .dw-mini-popup-content{overflow:hidden}.dw-mini-news-panel{display:none}.dw-mini-news-panel.active{display:block}.popup-vital-news{padding:10px 10px 0}.popup-vital-news .big-news-wrap{width:278px;height:156px;position:relative}.popup-vital-news .big-news-wrap .big-news{display:block;height:100%;overflow:hidden}.popup-vital-news .big-news-wrap .footer-shadow{height:24px}.popup-vital-news .main-news-wrap{overflow:hidden;margin-top:10px}.popup-vital-news .main-news-wrap .middle-news-wrap{float:left;width:116px}.middle-news-wrap .middle-news-item{position:relative;height:78px;margin-bottom:10px;overflow:hidden}.middle-news-wrap .middle-news-item .zhibo-icon{position:absolute;top:0;right:0;font-size:12px;font-style:normal;font:12px/1 Simsun;padding:3px;color:#fff;line-height:1;z-index:9;background-color:#e94646}.middle-news-wrap .news-link{height:100%}.middle-news-wrap .middle-news-item .footer-shadow{height:24px}.popup-vital-news .main-news-wrap .text-news-wrap{float:left;width:150px;margin-left:10px;font-size:0;color:#333;overflow:hidden}.text-news-list li{overflow:hidden;*zoom:1}.text-news-list .first-news a{font-size:14px;font-weight:700;line-height:24px;color:#e94646}.text-news-list a{display:block;height:24px;font-size:12px;line-height:24px;color:#333;overflow:hidden;text-overflow:clip;*zoom:1}.text-news-list a:hover{color:#e94646;text-decoration:underline}.text-news-list .type-news{font-family:SimSun}.text-news-list .type-news i{float:left}.text-news-list .type-news.normal-type i,.text-news-list .type-news.red-type i{width:2px;height:2px;margin:13px 5px 0 0;background-color:#f60}.text-news-list .type-news.red-type a{color:#e94646}.text-news-list .type-news.video-type i,.text-news-list .type-news.image-type i{width:20px;height:24px;background-color:#ff7d1a}.text-news-list .type-news.video-type i{background:url(http://pub.ouj.com/common//newsPopup/assets/news_type_video_c0c01d2.png) no-repeat left center}.text-news-list .type-news.image-type i{background:url(http://pub.ouj.com/common//newsPopup/assets/news_type_image_90a12e7.png) no-repeat left center}.popup-videos-wrap .dw-mini-video-list{margin-right:-10px;padding:10px 10px 0;border-bottom:1px solid #e3e3e3;font-family:Simsun;overflow:hidden}.popup-videos-wrap .dw-mini-video-item{float:left;width:134px;margin-right:10px}.popup-videos-wrap .dw-mini-video-item .play-icon{position:absolute;width:16px;height:16px;background-image:url(http://pub.ouj.com/common//newsPopup/assets/play_icon_efee776.png);left:5px;top:50px}.popup-videos-wrap .news-image{height:73px}.popup-videos-wrap .news-title{margin:0;height:32px;font:12px/32px PingFang sc,\"Helvetica Neue\",Helvetica,Tahoma,Arial,SimSun,TW-Sung,\"WenQuanYi Bitmap Song\",\"AR PL UMing CN\",\"AR PL UMing HK\",\"AR PL UMing TW\",\"AR PL UMing TW MBE\",serif;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}.popup-videos-wrap .more-news{font:12px/25px Simsun;text-align:center}.more-news .news-link{color:#333}.more-news .news-link:hover{color:#e94646}.popup-photo-gallery{font-family:Simsun}.popup-photo-gallery .big-text-news{height:38px;margin-top:3px;font-size:14px;font-weight:700;line-height:38px;text-align:center;overflow:hidden}.big-text-news .news-link{color:#e94646}.popup-photo-gallery .dw-mini-video-list{margin-right:-10px;padding:0 10px;border-bottom:1px solid #e3e3e3;overflow:hidden}.popup-photo-gallery .dw-mini-video-item{float:left;width:134px;margin-right:10px}.popup-photo-gallery .news-image{height:92px}.popup-photo-gallery .news-title{height:36px;margin:7px 0;font-size:12px;line-height:18px;overflow:hidden;width:100%}.popup-photo-gallery .more-news{font-size:12px;line-height:25px;text-align:center}.popup-kadou-wrap{padding:5px 15px 0}.popup-kadou-wrap .base-btn{display:block;border:0;padding:0;margin:0 auto;background-color:transparent;outline:0}.popup-kadou-wrap .kadou-box{height:228px;overflow:hidden}.popup-kadou-wrap .kadou-info-box .kadou-info{text-align:center;font-size:0;line-height:30px;margin-bottom:3px}.popup-kadou-wrap .kadou-info-box .kadou-icon{display:inline-block;*display:inline;*zoom:1;width:20px;height:20px;vertical-align:middle;background:url(http://pub.ouj.com/common//newsPopup/assets/kadou_icon_0a28d35.png) no-repeat center}.popup-kadou-wrap .kadou-info-box .kadou-num{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;font-size:14px;line-height:30px;color:#333;font-style:normal}.popup-kadou-wrap .kadou-info-box .daliy-lottery{width:100%;height:36px;line-height:36px;text-align:center;font-size:14px;color:#fff;cursor:pointer;border-radius:3px;background-color:#ffb018}.popup-kadou-wrap .kadou-info-box .daliy-lottery.lottery-finished{background-color:#c8c8c8}.popup-kadou-wrap .not-login-box{margin-top:10px}.popup-kadou-wrap .not-login-box .login-btn{width:100%;height:34px;border:1px solid #e94646;line-height:34px;text-align:center;font-size:14px;color:#ec6969;cursor:pointer;border-radius:3px}.popup-kadou-wrap .not-login-box .register-btn{width:100%;height:26px;line-height:36px;text-align:center;font-size:12px;color:#333;cursor:pointer;overflow:hidden}.popup-kadou-wrap .box-hd{*zoom:1}.popup-kadou-wrap .box-hd:before,.popup-kadou-wrap .box-hd:after{content:'';display:table;line-height:0}.popup-kadou-wrap .box-hd:after{clear:both}.popup-kadou-wrap .box-hd h3{float:left;margin:0;font-size:14px;line-height:40px;color:#999;font-weight:400}.popup-kadou-wrap .box-hd a{float:right;padding-right:13px;font-size:14px;line-height:40px;color:#999;background:url(http://pub.ouj.com/common//newsPopup/assets/arrow_icon_8526d9c.png) no-repeat right center}.popup-kadou-wrap .task-list li{margin-bottom:7px;height:24px;font-size:12px;line-height:24px;*zoom:1}.popup-kadou-wrap .task-list li a{vertical-align:top}.popup-kadou-wrap .task-list li.last-task{margin-bottom:0}.popup-kadou-wrap .task-list li:before,.popup-kadou-wrap .task-list li:after{content:\"\";display:table;line-height:0}.popup-kadou-wrap .task-list li:after{clear:both}.popup-kadou-wrap .task-list .task-name{float:left;white-space:nowrap;word-wrap:normal;overflow:hidden;text-overflow:ellipsis;text-align:left;color:#333;width:213px;line-height:24px;text-decoration:none}.popup-kadou-wrap .task-list .state-finished,.popup-kadou-wrap .task-list .state-notyet,.popup-kadou-wrap .task-list .state-ing{float:right;width:53px;height:22px;border:1px solid #e94646;text-align:center;color:#fff;background-color:#e94646;line-height:22px;border-radius:2px;cursor:pointer}.popup-kadou-wrap .task-list .state-ing:hover,.popup-kadou-wrap .task-list .state-notyet:hover,.popup-kadou-wrap .task-list .state-finished:hover{opacity:.8}.popup-kadou-wrap .task-list .state-notyet{color:#e94646;background-color:transparent}.popup-kadou-wrap .task-list .state-finished{border:1px solid #bebebe;background-color:transparent;color:#c6c6c6}.popup-kadou-wrap .exchange-list{font-size:0;margin-right:-4px}.popup-kadou-wrap .exchange-list li{display:inline-block;*display:inline;*zoom:1;vertical-align:top;width:62px;height:62px;border:1px solid #bebebe;margin-right:4px}.popup-kadou-wrap .exchange-list li a,.popup-kadou-wrap .exchange-list li img{position:relative;display:block;width:100%;height:100%}.popup-kadou-wrap .exchange-list .exchange-gold{position:absolute;left:0;bottom:0;width:100%;height:17px;font-size:12px;line-height:17px;color:#fff;text-align:center;background:url(http://pub.ouj.com/common//newsPopup/assets/shadow_icon_f3abc38.png) repeat-x;font-style:normal}.dw-mini-popup-littleboy{width:60px;height:90px;position:absolute;bottom:0;left:-52px;cursor:pointer;background:url(http://pub.ouj.com/common//newsPopup/assets/dw_news_littleboy_15b83cd.png) no-repeat}.dw-mini-popup-littleboy:hover{animation:boybounce .8s 1 ease backwards}@keyframes boybounce{0%,100%,20%,50%,80%{-webkit-transform:translateY(0);transform:translateY(0)}40%{-webkit-transform:translateY(-12px);transform:translateY(-12px)}60%{-webkit-transform:translateY(-5px);transform:translateY(-5px)}}.dw-min-popup-dancer{position:fixed;width:52px;height:75px;right:-60px;bottom:50px;border:0;cursor:pointer;z-index:9999;background:url(http://pub.ouj.com/common//newsPopup/assets/dw_min_popup_dancer_2f54c22.png) no-repeat}.dw-min-popup-dancer:hover{background-image:url(http://pub.ouj.com/common//newsPopup/assets/dw_min_popup_dancer_64a930f.gif)}.dw-min-popup-dancer.show{right:0}.dw-mini-popup-award{position:absolute;left:0;right:0;top:40px;bottom:0}.dw-mini-popup-award .dw-mini-award-bg{position:absolute;left:0;top:0;width:100%;height:100%;background:url(http://pub.ouj.com/common//newsPopup/assets/award-bg_7aa0bad.png) repeat}.dw-mini-popup-award .dw-mini-award-warp{position:absolute;left:50%;top:50%;width:230px;height:122px;margin-left:-115px;margin-top:-61px;background-color:#fff;z-index:9}.dw-mini-popup-award .dw-mini-award-msg{width:170px;margin:16px auto 0;font-size:13px;font-weight:700;line-height:1.6;color:#000;text-align:center}.dw-mini-popup-award .dw-mini-award-link{display:block;width:80px;height:30px;margin:16px auto 0;font-size:13px;line-height:30px;color:#fff;text-align:center;background-color:#ed5454;text-decoration:none;cursor:pointer}";
- var template = function(obj){
- var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
- with(obj||{}){
- __p+='<div class="dw-mini-popup-wrap '+
- ((__t=( option==1?'show':''))==null?'':__t)+
- '">\r\n <div class="dw-mini-popup">\r\n <!--新闻header -->\r\n <div class="dw-popup-title">\r\n <div class="popup-title">\r\n <a class="web-address" href="http://www.duowan.com/?wen" target="_blank">\r\n <i class="dw-popup-icon"></i>\r\n <span class="dw-name"></span>\r\n </a>\r\n <span class="dw-popup-tip">迷你版</span>\r\n </div>\r\n <span class="dw-popup-hide"></span>\r\n </div>\r\n <!-- 新闻header -->\r\n\r\n <!--新闻Nav -->\r\n <div class="dw-mini-popup-nav">\r\n <ul class="dw-mini-nav-list">\r\n <li class="dw-mini-nav-item">\r\n 要闻\r\n </li>\r\n <li class="dw-mini-nav-item tuku-item">\r\n 图库\r\n </li>\r\n <li class="dw-mini-nav-item kadou-item">\r\n 金豆\r\n </li>\r\n </ul>\r\n </div>\r\n <!-- 新闻Nav -->\r\n\r\n <!--新闻内容 -->\r\n <div class="dw-mini-popup-content">\r\n <div class="dw-mini-news-panel popup-vital-news">\r\n \r\n </div>\r\n \r\n <!--图库新闻{-->\r\n <div class="dw-mini-news-panel popup-photo-gallery">\r\n\r\n </div>\r\n <!--}图库新闻-->\r\n\r\n <!--特权金豆{-->\r\n <div class="dw-mini-news-panel popup-kadou-wrap">\r\n\r\n </div>\r\n <!--}特权金豆-->\r\n </div>\r\n <!-- 新闻内容 -->\r\n\r\n\r\n\r\n <!--招手的小矮人-->\r\n <div class="dw-mini-popup-littleboy"></div>\r\n <!--招手的小矮人 -->\r\n </div>\r\n\r\n <!--挥手的小矮人{-->\r\n <div class="dw-min-popup-dancer '+
- ((__t=( option==0?'show':''))==null?'':__t)+
- '">\r\n </div>\r\n <!--}挥手的小矮人-->\r\n\r\n <!--金豆奖励-->\r\n <div class="dw-mini-popup-award" style="display:none;">\r\n <div class="dw-mini-award-bg"></div>\r\n <div class="dw-mini-award-warp">\r\n <div class="dw-mini-award-msg">\r\n </div>\r\n <a title="领取金豆" class="dw-mini-award-link btn-reward" data-taskid target="_blank">领取</a>\r\n </div>\r\n </div>\r\n <!--金豆奖励 -->\r\n\r\n</div>';
- }
- return __p;
- };
- var vitalNewsTpl = function(obj){
- var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
- with(obj||{}){
- __p+='<!--大图新闻{-->\r\n <div class="big-news-wrap">\r\n <a href="'+
- ((__t=( news.headpic1&&news.headpic1.url ))==null?'':__t)+
- '?wen" class="big-news news-link" title="'+
- ((__t=( news.headpic1&&news.headpic1.title ))==null?'':__t)+
- '"\r\n target="_blank">\r\n <img src="'+
- ((__t=( news.headpic1&&news.headpic1.img ))==null?'':__t)+
- '" class="news-image" />\r\n <span class="footer-shadow">'+
- ((__t=( news.headpic1&&news.headpic1.title ))==null?'':__t)+
- '</span>\r\n </a>\r\n </div>\r\n <!--}大图新闻-->\r\n <div class="main-news-wrap">\r\n <!--左侧中图新闻{-->\r\n <div class="middle-news-wrap">\r\n <ul class="middle-news-list">\r\n ';
- if(zhibo){
- __p+='\r\n <li class="middle-news-item">\r\n <i class="zhibo-icon">直播</i>\r\n <a href="'+
- ((__t=( zhibo.url ))==null?'':__t)+
- '?wen" class="news-link" title="'+
- ((__t=( zhibo.room_name ))==null?'':__t)+
- '"\r\n target="_blank">\r\n <img src="'+
- ((__t=( zhibo.room_thumb ))==null?'':__t)+
- '" class="news-image" />\r\n <span class="footer-shadow">'+
- ((__t=( zhibo.room_name ))==null?'':__t)+
- '</span>\r\n </a>\r\n </li>\r\n ';
- }
- __p+='\r\n <li class="middle-news-item">\r\n <a href="'+
- ((__t=( news.headpic2&&news.headpic2.url ))==null?'':__t)+
- '?wen" class="news-link" title="'+
- ((__t=( news.headpic2&&news.headpic2.title ))==null?'':__t)+
- '"\r\n target="_blank">\r\n <img src="'+
- ((__t=( news.headpic2&&news.headpic2.img ))==null?'':__t)+
- '" class="news-image" />\r\n <span class="footer-shadow">'+
- ((__t=( news.headpic2&&news.headpic2.title ))==null?'':__t)+
- '</span>\r\n </a>\r\n </li>\r\n <li class="middle-news-item">\r\n <a href="'+
- ((__t=( news.headpic3&&news.headpic3.url ))==null?'':__t)+
- '?wen" class="news-link" title="'+
- ((__t=( news.headpic3&&news.headpic3.title ))==null?'':__t)+
- '"\r\n target="_blank">\r\n <img src="'+
- ((__t=( news.headpic3&&news.headpic3.img ))==null?'':__t)+
- '" class="news-image" />\r\n <span class="footer-shadow">'+
- ((__t=( news.headpic3&&news.headpic3.title ))==null?'':__t)+
- '</span>\r\n </a>\r\n </li>\r\n </ul>\r\n </div>\r\n <!--}左侧中图新闻-->\r\n\r\n <!--无图新闻列表{-->\r\n <div class="text-news-wrap">\r\n <ul class="text-news-list">\r\n ';
-
- for(var i = 1;i<=7;i++){
- var newsitem = news['line'+i]
- if(i==1){
-
- __p+='\r\n <li class="first-news">\r\n <a href="'+
- ((__t=( newsitem.url))==null?'':__t)+
- '?wen" title="'+
- ((__t=( newsitem.title ))==null?'':__t)+
- '" target="_blank">\r\n '+
- ((__t=( newsitem.title ))==null?'':__t)+
- '\r\n </a>\r\n ';
- }else{
- __p+='\r\n </li>\r\n <li class="type-news '+
- ((__t=( newsitem.type+'-type' ))==null?'':__t)+
- '">\r\n <i class="type-icon"></i>\r\n <a href="'+
- ((__t=( newsitem.url ))==null?'':__t)+
- '?wen" title="'+
- ((__t=( newsitem.title ))==null?'':__t)+
- '" target="_blank">\r\n '+
- ((__t=( newsitem.title ))==null?'':__t)+
- '\r\n </a>\r\n </li>\r\n ';
-
- }
- }
-
- __p+='\r\n </ul>\r\n </div>\r\n <!--}无图新闻列表-->\r\n\r\n </div>';
- }
- return __p;
- };
- var tukuTpl = function(obj){
- var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
- with(obj||{}){
- __p+='<div class="big-text-news">\r\n <a href="'+
- ((__t=( news['line8']&&news['line8'].url ))==null?'':__t)+
- '?wen" class="news-link" title="'+
- ((__t=( news['line8']&&news['line8'].title ))==null?'':__t)+
- '"\r\n target="_blank">\r\n '+
- ((__t=( news['line8']&&news['line8'].title ))==null?'':__t)+
- '\r\n </a>\r\n</div>\r\n<div class="dw-mini-videos-wrap">\r\n <ul class="dw-mini-video-list">\r\n ';
- for(var i =0;i<4;i++){
- var galleryitem = gallerys[i]
-
- __p+='\r\n <li class="dw-mini-video-item">\r\n <a href="'+
- ((__t=( galleryitem.link ))==null?'':__t)+
- '?wen" class="news-link" title="'+
- ((__t=( galleryitem.title ))==null?'':__t)+
- '" target="_blank">\r\n <img src="'+
- ((__t=( galleryitem.picsrc ))==null?'':__t)+
- '" class="news-image" />\r\n <p class="news-title">\r\n '+
- ((__t=( galleryitem.title ))==null?'':__t)+
- '\r\n </p>\r\n </a>\r\n ';
- }
- __p+='\r\n </li>\r\n </ul>\r\n</div>\r\n<div class="more-news">\r\n <a href="http://tu.duowan.com/tu?wen" class="news-link" target="_blank">点击查看更多></a>\r\n</div>';
- }
- return __p;
- };
- var kaTpl = function(obj){
- var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
- with(obj||{}){
- __p+='<div class="kadou-box">\r\n ';
- if(isLogin){
- __p+='\r\n <div class="login-box">\r\n <div class="kadou-info-box">\r\n <p class="kadou-info">\r\n <i class="kadou-icon"></i>\r\n <em class="kadou-num">'+
- ((__t=( ka.userInfo.gold / 100 ))==null?'':__t)+
- '</em>\r\n </p>\r\n ';
- if(ka.lottery.can || ka.lottery.reset >= 0){
- __p+='\r\n <a href="http://plus.duowan.com/?from=lottery" target="_blank" class="daliy-lottery base-btn">'+
- ((__t=( ka.lottery.nextBatch ==1 ? '每日抽奖':'再次抽奖'))==null?'':__t)+
- '('+
- ((__t=( ka.lottery.nextBatch - 1 ))==null?'':__t)+
- '/'+
- ((__t=( ka.lottery.maxBatch ))==null?'':__t)+
- ')</a>\r\n ';
- } else {
- __p+='\r\n ';
- if (ka.lottery.cart) {
- __p+='\r\n <a href="'+
- ((__t=( ka.lottery.cart ))==null?'':__t)+
- '" target="_blank" class="base-btn">领取奖品</a>\r\n ';
- } else{
- __p+='\r\n <button class="daliy-lottery base-btn lottery-finished">今日已抽奖</button>\r\n ';
- }
- __p+='\r\n ';
- }
- __p+='\r\n </div>\r\n </div>\r\n ';
- }else{
- __p+='\r\n <div class="not-login-box">\r\n <button class="login-btn base-btn" title="登录">登录</button>\r\n <a class="register-btn base-btn" title="注册账号" href="http://aq.yy.com/p/reg/account.do?appid=&url=&fromadv=udbclsd_r" target="_blank">注册账号</a>\r\n </div>\r\n ';
- }
- __p+='\r\n\r\n <div class="kadou-task-box">\r\n <div class="box-hd">\r\n <h3>金豆任务</h3>\r\n <a href="http://plus.duowan.com/userTask" title="更多" target="_blank">更多<i class="arrow-icon"></i></a>\r\n </div>\r\n <ul class="task-list">\r\n ';
- if(!isLogin){
- __p+='\r\n <li>\r\n <a class="state-ing login-btn">签到</a>\r\n <a class="task-name">每日签到,领取金豆</a>\r\n </li>\r\n ';
- }else if(!ka.signDays.isSignedToday) {
- __p+='\r\n <li>\r\n <a class="state-ing action-sign">签到</a>\r\n <a class="task-name">每日签到,领取金豆</a>\r\n </li>\r\n ';
- }
- __p+='\r\n\r\n ';
- for(var i = 0; i < ka.tasks.length ; i++){
- __p+='\r\n <li>\r\n ';
- if(!isLogin){
- __p+='\r\n <a class="state-notyet login-btn">做任务</a>\r\n ';
- }else if (ka.tasks[i]['status'] == 2) {
- __p+='\r\n <a href="'+
- ((__t=( ka.tasks[i]['target_url'] ))==null?'':__t)+
- '" class="state-notyet" target="_blank">做任务</a>\r\n ';
- } else if (ka.tasks[i]['status'] == 3) {
- __p+='\r\n <a class="state-ing btn-reward" data-shopid="9" data-taskid="'+
- ((__t=( ka.tasks[i]['task_id']))==null?'':__t)+
- '">领奖励</a>\r\n ';
- } else if (ka.tasks[i]['status'] == 4){
- __p+='\r\n <a class="state-finished">已完成</a>\r\n ';
- } else {
- __p+='\r\n <a class="state-finished">已完成</a>\r\n ';
- }
- __p+='\r\n\r\n <a target="_blank" class="task-name" href="'+
- ((__t=( ka.tasks[i].target_url ))==null?'':__t)+
- '">'+
- ((__t=( ka.tasks[i].task_name ))==null?'':__t)+
- '</a>\r\n </li>\r\n ';
- }
- __p+='\r\n </ul>\r\n </div>\r\n</div>\r\n\r\n<div class="hot-exchange-box">\r\n <div class="box-hd">\r\n <h3>热门兑换</h3>\r\n <a href="http://plus.duowan.com/" title="更多" target="_blank">更多</a>\r\n </div>\r\n\r\n <ul class="exchange-list">\r\n ';
- for(var i = 0; i < exList.length ; i++){
- __p+='\r\n <li>\r\n <a href="http://plus.duowan.com/default/goods?goods_id='+
- ((__t=( exList[i].goods_id ))==null?'':__t)+
- '" title="'+
- ((__t=( exList[i].goods_name ))==null?'':__t)+
- '" target="_blank">\r\n <img src="'+
- ((__t=( exList[i].goods_img ))==null?'':__t)+
- '" alt="'+
- ((__t=( exList[i].goods_name ))==null?'':__t)+
- '"/>\r\n <em class="exchange-gold">'+
- ((__t=( exList[i].gold / 100 ))==null?'':__t)+
- '金豆</em>\r\n </a>\r\n </li>\r\n ';
- }
- __p+='\r\n </ul>\r\n</div>';
- }
- return __p;
- };
- var _BUSY_STORAGE_ = "dw_mini_popup_busy_status";
- var _NORMAL_STORAGE_ = "dw_mini_popup_status";
- var plainFunction = function() {};
- var allData = {}; //所有数据
- var Util = {
- getCookie: function(key) {
- var arr,
- reg = new RegExp("(^| )" + key + "=([^;]*)(;|$)");
- if ((arr = doc.cookie.match(reg))) return unescape(arr[2]);
- else return null;
- },
- setCookie: function(key, value, day) {
- day = day || 1; //天数
- var cookie =
- key +
- "=" +
- escape(value) +
- "; max-age=" +
- day * 24 * 60 * 60 +
- "; domain=duowan.com; path=/";
- doc.cookie = cookie;
- },
- getScript: function(url, callback) {
- var head = document.getElementsByTagName("head")[0];
- var script = document.createElement("script");
- script.type = "text/javascript";
- script.src = url;
- var done = false;
- script.onload = script.onreadystatechange = function() {
- if (
- !this.readyState ||
- this.readyState == "complete" ||
- this.readyState == "loaded"
- ) {
- callback();
- head.removeChild(script);
- }
- };
- head.appendChild(script);
- },
- isLogin: function() {
- return Util.getCookie("yyuid") || Util.getCookie("lg_uid");
- },
- encodePwd: function(random, pwd) {
- var k1 = md5.sha1(random);
- var k2 = md5.sha1(k1);
- var v = md5.xor(md5.xor(pwd, k2), k1);
- return md5.base64encode(v);
- },
- // 16点至凌晨2点
- isBusyTime: function() {
- var hour = new Date().getHours();
- return hour >= 16 || hour < 2;
- }
- };
- var NewsPopup = {
- popupUI: null,
- newsWrap: null, //新闻区域
- dancer: null, //招手的小人
- hideButton: null, //右上角关闭按钮
- navBar: null, //导航栏
- littleboy: null, //不动的小人
- popupTimer: null, // 16点定时弹出的定时器
- firstTuku: true,
- firstKa: true,
- initDom: function(data) {
- var option = null;
- var isBusy = Util.isBusyTime();
- //忙时默认打开,闲时默认关闭
- if (isBusy) {
- option = ClosedOption.getBusy();
- allData.option = parseInt(option) == 0 ? 0 : 1;
- } else {
- option = ClosedOption.get();
- allData.option = parseInt(option) == 1 ? 1 : 0;
- }
- this.popupUI = $(template(data));
- this.vitalNews = this.popupUI.find(".popup-vital-news");
- this.tuku = this.popupUI.find(".popup-photo-gallery");
- this.newsWrap = this.popupUI.find(".dw-mini-popup");
- this.navlist = this.popupUI.find(".dw-mini-nav-item");
- this.newsPanel = this.popupUI.find(".dw-mini-news-panel");
- this.hideButton = this.popupUI.find(".dw-popup-hide");
- this.navBar = this.popupUI.find(".dw-mini-nav-list");
- this.littleboy = this.popupUI.find(".dw-mini-popup-littleboy");
- this.dancer = this.popupUI.find(".dw-min-popup-dancer");
- this.award = this.popupUI.find(".dw-mini-popup-award");
- //添加dom
- this.addEvent()
- .append()
- .openTimer();
- },
- //首屏新闻
- getVitalNewsData: function(callback) {
- $.when(
- $.ajax({
- url: "//tips.duowan.com/tnews",
- dataType: "jsonp"
- }),
- $.ajax({
- url: "//plus.duowan.com/zhibo/list",
- dataType: "jsonp"
- })
- )
- .done(function(ret1, ret2) {
- allData.news = ret1[0];
- allData.zhibo = ret2 && ret2[0].data && ret2[0].data[0];
- })
- .then(function() {
- callback(allData);
- });
- },
- renderVitalNews: function(data) {
- this.vitalNews.html(vitalNewsTpl(data));
- this.navlist.eq(0).trigger("mouseover");
- },
- getTukuData(callback) {
- $.ajax({
- url: "//www.duowan.com/s/newsPopup/news.json",
- dataType: "jsonp",
- jsonp: "jsonp1",
- jsonpCallback: "jsonp1"
- }).done(function(ret) {
- allData.gallerys = ret.gallery;
- allData.videos = ret.video;
- callback(allData);
- });
- },
- renderTuku(tukuData) {
- this.tuku.html(tukuTpl(tukuData));
- this.navlist.eq(1).trigger("mouseover");
- },
- /**添加事件 */
- addEvent: function() {
- var self = this;
- if (window.dwUDBProxy) {
- dwUDBProxy.add(loadData);
- } else {
- Util.getScript(
- "//pub.dwstatic.com/common/js/dwudbproxy.js",
- function() {
- dwUDBProxy.add(loadData);
- }
- );
- }
- this.hideButton.click(function() {
- self.hideNews();
- });
- this.littleboy.click(function() {
- self.hideNews();
- });
- this.award.children(".dw-mini-award-bg").click(function() {
- self._ClosedKaDou();
- });
- this.dancer.click(function() {
- self.showNews();
- });
- //金豆页面点击事件
- this.popupUI
- .on("click", ".login-btn", function() {
- if (window.dwUDBProxy) {
- dwUDBProxy.login(plainFunction);
- } else {
- Util.getScript(
- "//pub.dwstatic.com/common/js/dwudbproxy.js",
- function() {
- dwUDBProxy.login(plainFunction);
- }
- );
- }
- })
- .on("click", ".action-sign", function() {
- var $e = $(this);
- var api = "//plus.duowan.com/task/sign";
- var data = {
- shop_id: 6,
- time: new Date().getTime()
- };
- var password =
- Util.getCookie("password") ||
- Util.getCookie("lg_openid");
- data["sign"] = Util.encodePwd(
- password,
- md5.sha1($.param(data))
- );
- $.ajax({
- url: api,
- dataType: "jsonp",
- data: data
- }).done(function(ret) {
- if (ret.code == 0) {
- allData.ka.userInfo.gold =
- allData.ka.userInfo.gold * 1 +
- ret.data.gold * 1;
- $e.removeClass("action-sign state-ing")
- .addClass("state-finished")
- .text("已签到");
- self.popupUI
- .find(".kadou-info .kadou-num")
- .text(allData.ka.userInfo.gold / 100);
- }
- });
- })
- .on("click", ".btn-reward", function() {
- var $e = $(this);
- var taskid = $e.attr("data-taskid");
- var api =
- "//kaplus.duowan.com/task/reward?task_id=" + taskid;
- $.ajax({
- url: api,
- dataType: "jsonp"
- }).done(function(ret) {
- if (ret.code == 0) {
- $e.removeClass("btn-reward state-ing")
- .addClass("state-finished")
- .text("已完成");
- if ($e.hasClass("dw-mini-award-link")) {
- var $kadouItem = self.navlist.filter(
- ".kadou-item"
- );
- $kadouItem
- .trigger("mouseover")
- .addClass("have-award");
- self.popupUI
- .find(
- ".task-list a[data-taskid=" +
- taskid +
- "]"
- )
- .removeClass("state-ing state-notyet")
- .addClass("state-finished")
- .text("已完成");
- self._ClosedKaDou();
- }
- //如果已经请求过ka数据
- if (allData.ka) {
- allData.ka.userInfo.gold =
- allData.ka.userInfo.gold * 1 +
- ret.data.gold * 1;
- self.popupUI
- .find(".kadou-info .kadou-num")
- .text(allData.ka.userInfo.gold / 100);
- }
- }
- });
- });
- this.navlist.hover(self.togglePanel);
- //mouseover 图库tab 时再去请求
- this.navlist.filter(".tuku-item").hover(function() {
- if (!self.firstTuku) return;
- self.firstTuku = false;
- self.getTukuData(function(data) {
- self.renderTuku(data);
- });
- });
- //mouseover 金豆tab 时再去请求
- this.navlist.filter(".kadou-item").hover(function() {
- if (!self.firstKa) return;
- self.firstKa = false;
- loadData();
- });
- function loadData() {
- allData.isLogin = Util.isLogin();
- $.when(
- $.ajax({
- url: "//plus.duowan.com/popup",
- data: { task_num: 4 },
- dataType: "jsonp"
- }),
- $.ajax({
- url: "//plus.duowan.com/open/GetShopGoods",
- dataType: "jsonp"
- })
- )
- .done(function(ret, ret2) {
- ret[0].code == 0 && (allData.ka = ret[0].data);
- ret2[0].code == 0 &&
- (allData.exList = ret2[0].data.slice(0, 4));
- })
- .then(function() {
- $(".popup-kadou-wrap").html(kaTpl(allData));
- });
- }
- return this;
- },
- append: function() {
- $("body")
- .append("<style>" + cssStyle + "</style>")
- .append(this.popupUI);
- return this;
- },
- /**显示新闻 */
- showNews: function() {
- var self = this;
- this.dancer.animate(
- {
- right: "-60px"
- },
- 200,
- function() {
- self.popupUI.animate(
- {
- right: "0px"
- },
- 600
- );
- }
- );
- Util.isBusyTime() ? ClosedOption.setBusy(1) : ClosedOption.set(1);
- },
- /**隐藏新闻 */
- hideNews: function() {
- var self = this;
- this.popupUI.animate(
- {
- right: "-380px"
- },
- 600,
- function() {
- self.dancer.animate(
- {
- right: "0px"
- },
- 200
- );
- }
- );
- Util.isBusyTime() ? ClosedOption.setBusy(0) : ClosedOption.set(0);
- },
- /**切换panel */
- togglePanel: function() {
- var _this = $(this);
- var index = _this.index();
- if (_this.hasClass("active")) return;
- _this.siblings(".active").removeClass("active");
- _this.addClass("active");
- NewsPopup.newsPanel
- .removeClass("active")
- .eq(index)
- .addClass("active");
- },
- showKaDou: function(obj) {
- this.award.find(".dw-mini-award-msg").text(obj.text);
- this.award
- .find(".dw-mini-award-link")
- .attr("data-taskid", obj.taskid);
- this.award.show();
- this.showNews();
- },
- /** 关闭金豆奖励*/
- _ClosedKaDou: function() {
- var self = this;
- this.award.hide();
- setTimeout(function() {
- self.navlist.filter(".kadou-item").removeClass("have-award");
- }, 4000);
- },
- /**16点左右弹出弹窗 */
- openTimer: function() {
- if (!Util.isBusyTime()) {
- var self = this;
- var now = new Date();
- var minutes =
- (15 - now.getHours()) * 60 + (60 - now.getMinutes());
- var duration = minutes * 60 * 1000;
- // var duration = 5 * 1000;
- console.log("minutes:", minutes);
- this.popupTimer = setTimeout(function() {
- self.getVitalNewsData(function(data) {
- self.renderVitalNews(data);
- self.showNews();
- });
- }, duration);
- }
- return this;
- }
- };
- /**根据用户操作读写cookie
- * 每天16:00到第二天2:00强制展开
- * 凌晨2点以后强制保持关闭状态,至16:00
- */
- var ClosedOption = {
- getBusy: function() {
- var ret = Util.getCookie(_BUSY_STORAGE_);
- return ret;
- },
- setBusy: function(option) {
- Util.setCookie(_BUSY_STORAGE_, option, 1 / 3);
- },
- get: function() {
- var ret = Util.getCookie(_NORMAL_STORAGE_);
- return ret;
- },
- /**option:0 / 1 */
- set: function(option) {
- Util.setCookie(_NORMAL_STORAGE_, option, 365);
- }
- };
- var init = function() {
- NewsPopup.getVitalNewsData(function(data) {
- NewsPopup.initDom(data);
- NewsPopup.renderVitalNews(data);
- });
- //暴露全局变量给其他地方调用
- window.dwMiniNewsPopup = {
- showKaDou: function(obj) {
- NewsPopup.showKaDou(obj);
- }
- };
- };
- //判断是否有引入jquery
- if (typeof $ == "undefined") {
- Util.getScript("//pub.dwstatic.com/common/js/jquery.js", function() {
- init();
- });
- } else {
- init();
- }
- })(window, document);
|