define('helper',['jquery'], function (jquery) { var chinapeople = chinapeople || {}; jquery.fn.imagesloaded = function (selector) { selector = selector || "img"; var def = $.deferred(); var def_list = []; this.find(selector).each(function (i, o) { var _def = $.deferred(); // if (!this.complete) { (function (d) { $(o).on("load", function (e) { // console.log(e); d.resolve(e.target); }); })(_def); // } // else if(o.complete && !$(o).attr("data-src")) settimeout(function(){_def.resolve(o);}, 0); def_list.push(_def.promise()); }); $.when.apply(this, def_list).always(function (d) { def.resolve.apply(this, arguments); }); return def.promise(); }; return chinapeople; }); define('panelimg',['helper'], function () { function panelimg(obj) { this.obj = $(obj); this.panelimg = this.obj.find('.panel-img-box'); this.init(); } panelimg.prototype = { init: function () { var self = this; this.resize(); var timer = 0; $(window).resize(function () { cleartimeout(timer); timer = settimeout(function () { self.resize(); }, 200) }); settimeout(function () { self.resize(); }, 1000); /* var $imgs = $('.panel-img-box.mr .img-box img.hidden-xs'); var i = 1, l = $imgs.length; $imgs.on('load', function (e) { i += 1; if (i >= l) self.resize(); }); */ $('.panel-img-box.mr .img-box').imagesloaded('img:visible').then(function(){ self.resize(); }); }, resize: function () { var self = this; if (window.innerwidth < 992) { self.panelimg.removeattr('style'); return; } self.panelimg.each(function (index) { if ($(this).hasclass('big-w')) { tempwidth = self.obj.width() - 30 - (self.obj.width() - 60) / 3; } else { tempwidth = (self.obj.width() - 60) / 3; } $(this).css({ width: tempwidth - 0.5, height: $(this).prev().hasclass('mr') ? $(this).prev().height() : 'auto' }); }); } } return panelimg; }); /*! js-cookie v2.2.1 | mit */ !function(a){var b;if("function"==typeof define&&define.amd&&(define('vendor/js.cookie-2.2.1.min',a),b=!0),"object"==typeof exports&&(module.exports=a(),b=!0),!b){var c=window.cookies,d=window.cookies=a();d.noconflict=function(){return window.cookies=c,d}}}(function(){function a(){for(var a=0,b={};ai;i++){var l=r.eq(i);if(t.append(l),n&&t.append(n),a(t,e)){l.remove(),o=!0;break}n&&n.detach()}return o}function r(e,n,i,d,l){var s=!1,c="a, table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, blockquote, select, optgroup, option, textarea, script, style",u="script, .dotdotdot-keep";return e.contents().detach().each(function(){var h=this,f=t(h);if("undefined"==typeof h)return!0;if(f.is(u))e.append(f);else{if(s)return!0;e.append(f),!l||f.is(d.after)||f.find(d.after).length||e[e.is(c)?"after":"append"](l),a(i,d)&&(s=3==h.nodetype?o(f,n,i,d,l):r(f,n,i,d,l)),s||l&&l.detach()}}),n.addclass("is-truncated"),s}function o(e,n,r,o,d){var c=e[0];if(!c)return!1;var h=s(c),f=-1!==h.indexof(" ")?" ":" ",p="letter"==o.wrap?"":f,g=h.split(p),v=-1,w=-1,b=0,m=g.length-1;for(o.fallbacktoletter&&0==b&&0==m&&(p="",g=h.split(p),m=g.length-1);m>=b&&(0!=b||0!=m);){var y=math.floor((b+m)/2);if(y==w)break;w=y,l(c,g.slice(0,w+1).join(p)+o.ellipsis),r.children().each(function(){t(this).toggle().toggle()}),a(r,o)?(m=w,o.fallbacktoletter&&0==b&&0==m&&(p="",g=g[0].split(p),v=-1,w=-1,b=0,m=g.length-1)):(v=w,b=w)}if(-1==v||1==g.length&&0==g[0].length){var x=e.parent();e.detach();var c=d&&d.closest(x).length?d.length:0;if(x.contents().length>c?c=u(x.contents().eq(-1-c),n):(c=u(x,n,!0),c||x.detach()),c&&(h=i(s(c),o),l(c,h),c&&d)){var t=d.parent();t(c).parent().append(d),t.trim(t.html())||t.remove()}}else h=i(g.slice(0,v+1).join(p),o),l(c,h);return!0}function a(t,e){return t.innerheight()>e.maxheight}function i(e,n){for(;t.inarray(e.slice(-1),n.lastcharacter.remove)>-1;)e=e.slice(0,-1);return t.inarray(e.slice(-1),n.lastcharacter.noellipsis)<0&&(e+=n.ellipsis),e}function d(t){return{width:t.innerwidth(),height:t.innerheight()}}function l(t,e){t.innertext?t.innertext=e:t.nodevalue?t.nodevalue=e:t.textcontent&&(t.textcontent=e)}function s(t){return t.innertext?t.innertext:t.nodevalue?t.nodevalue:t.textcontent?t.textcontent:""}function c(t){do t=t.previoussibling;while(t&&1!==t.nodetype&&3!==t.nodetype);return t}function u(e,n,r){var o,a=e&&e[0];if(a){if(!r){if(3===a.nodetype)return a;if(t.trim(e.text()))return u(e.contents().last(),n)}for(o=c(a);!o;){if(e=e.parent(),e.is(n)||!e.length)return!1;o=c(e[0])}if(o)return u(t(o),n)}return!1}function h(e,n){return e?"string"==typeof e?(e=t(e,n),e.length?e:!1):e.jquery?e:!1:!1}function f(t){for(var e=t.innerheight(),n=["paddingtop","paddingbottom"],r=0,o=n.length;o>r;r++){var a=parseint(t.css(n[r]),10);isnan(a)&&(a=0),e-=a}return e}if(!t.fn.dotdotdot){t.fn.dotdotdot=function(e){if(0==this.length)return t.fn.dotdotdot.debug('no element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){t(this).dotdotdot(e)});var o=this,i=o.contents();o.data("dotdotdot")&&o.trigger("destroy.dot"),o.data("dotdotdot-style",o.attr("style")||""),o.css("word-wrap","break-word"),"nowrap"===o.css("white-space")&&o.css("white-space","normal"),o.bind_events=function(){return o.bind("update.dot",function(e,d){switch(o.removeclass("is-truncated"),e.preventdefault(),e.stoppropagation(),typeof l.height){case"number":l.maxheight=l.height;break;case"function":l.maxheight=l.height.call(o[0]);break;default:l.maxheight=f(o)}l.maxheight+=l.tolerance,"undefined"!=typeof d&&(("string"==typeof d||"nodetype"in d&&1===d.nodetype)&&(d=t("
").append(d).contents()),d instanceof t&&(i=d)),g=o.wrapinner('
').children(),g.contents().detach().end().append(i.clone(!0)).find("br").replacewith("
").end().css({height:"auto",width:"auto",border:"none",padding:0,margin:0});var c=!1,u=!1;return s.afterelement&&(c=s.afterelement.clone(!0),c.show(),s.afterelement.detach()),a(g,l)&&(u="children"==l.wrap?n(g,l,c):r(g,o,g,l,c)),g.replacewith(g.contents()),g=null,t.isfunction(l.callback)&&l.callback.call(o[0],u,i),s.istruncated=u,u}).bind("istruncated.dot",function(t,e){return t.preventdefault(),t.stoppropagation(),"function"==typeof e&&e.call(o[0],s.istruncated),s.istruncated}).bind("originalcontent.dot",function(t,e){return t.preventdefault(),t.stoppropagation(),"function"==typeof e&&e.call(o[0],i),i}).bind("destroy.dot",function(t){t.preventdefault(),t.stoppropagation(),o.unwatch().unbind_events().contents().detach().end().append(i).attr("style",o.data("dotdotdot-style")||"").removeclass("is-truncated").data("dotdotdot",!1)}),o},o.unbind_events=function(){return o.unbind(".dot"),o},o.watch=function(){if(o.unwatch(),"window"==l.watch){var e=t(window),n=e.width(),r=e.height();e.bind("resize.dot"+s.dotid,function(){n==e.width()&&r==e.height()&&l.windowresizefix||(n=e.width(),r=e.height(),u&&clearinterval(u),u=settimeout(function(){o.trigger("update.dot")},100))})}else c=d(o),u=setinterval(function(){if(o.is(":visible")){var t=d(o);c.width==t.width&&c.height==t.height||(o.trigger("update.dot"),c=t)}},500);return o},o.unwatch=function(){return t(window).unbind("resize.dot"+s.dotid),u&&clearinterval(u),o};var l=t.extend(!0,{},t.fn.dotdotdot.defaults,e),s={},c={},u=null,g=null;return l.lastcharacter.remove instanceof array||(l.lastcharacter.remove=t.fn.dotdotdot.defaultarrays.lastcharacter.remove),l.lastcharacter.noellipsis instanceof array||(l.lastcharacter.noellipsis=t.fn.dotdotdot.defaultarrays.lastcharacter.noellipsis),s.afterelement=h(l.after,o),s.istruncated=!1,s.dotid=p++,o.data("dotdotdot",!0).bind_events().trigger("update.dot"),l.watch&&o.watch(),o},t.fn.dotdotdot.defaults={ellipsis:"... ",wrap:"word",fallbacktoletter:!0,lastcharacter:{},tolerance:0,callback:null,after:null,height:null,watch:!1,windowresizefix:!0},t.fn.dotdotdot.defaultarrays={lastcharacter:{remove:[" "," ",",",";",".","!","?"],noellipsis:[]}},t.fn.dotdotdot.debug=function(t){};var p=1,g=t.fn.html;t.fn.html=function(n){return n!=e&&!t.isfunction(n)&&this.data("dotdotdot")?this.trigger("update",[n]):g.apply(this,arguments)};var v=t.fn.text;t.fn.text=function(n){return n!=e&&!t.isfunction(n)&&this.data("dotdotdot")?(n=t("
").text(n).html(),this.trigger("update",[n])):v.apply(this,arguments)}}}(jquery),jquery(document).ready(function(t){t(".dot-ellipsis").each(function(){var e=t(this).hasclass("dot-resize-update"),n=t(this).hasclass("dot-timer-update"),r=0,o=t(this).attr("class").split(/\s+/);t.each(o,function(t,e){var n=e.match(/^dot-height-(\d+)$/);null!==n&&(r=number(n[1]))});var a=new object;n&&(a.watch=!0),e&&(a.watch="window"),r>0&&(a.height=r),t(this).dotdotdot(a)})}),jquery(window).on("load",function(){jquery(".dot-ellipsis.dot-load-update").trigger("update.dot")}); define("jquery.dotdotdot.min", function(){}); define('text-dotdotdot',[ 'require', 'jquery.dotdotdot.min' ], function (require, factory) { 'use strict'; var chinapeople = chinapeople || {}; string.prototype.unescapehtml = function () { var s = ""; s = this.replace(/&/g, "&"); s = s.replace(/</g, "<"); s = s.replace(/>/g, ">"); s = s.replace(/ /g, " "); s = s.replace(/'/g, "\'"); s = s.replace(/"/g, "\""); s = s.replace(/
/g, ""); return s; } $(function ($) { settimeout(function () { chinapeople.text_dot(); chinapeople.text_dot_more_less(); chinapeople.tab_change_text_dot(); }, 500); $(document).on("text-dotdotdot", function (e) { settimeout(function () { chinapeople.text_dot(); }, 200); }); }); chinapeople.text_dot = function () { $(".js-text-dot-en").filter(":visible").not(".is-truncated").removeattr("style").dotdotdot({ after: '.toggle', callback: dotdotdotcallback // wrap: 'letter' }); $(".js-text-dot-cn").filter(":visible").not(".is-truncated").removeattr("style").dotdotdot({ wrap: 'letter', //注:中文必须改为letter ellipsis: "...", after: '.toggle', callback: dotdotdotcallback }); }; chinapeople.text_dot_more_less = function () { $(document).on('click', '.js-text-dot-en .toggle, .js-text-dot-cn .toggle', function () { var $t = $(this); var $p = $t.closest('.js-text-dot-en, .js-text-dot-cn'); if ($p.hasclass("is-truncated")) { $p.trigger('destroy').css('max-height', 'none').css("height", "auto"); $p.find(".toggle").html($t.attr("data-less-text") || "less"); return false; } var ops = { ellipsis: "...", after: ".toggle", callback: dotdotdotcallback }; if ($p.hasclass("js-text-dot-cn")) ops["wrap"] = 'letter'; $p.css("max-height", "").height(""); settimeout(function () { $p.dotdotdot(ops); }, 100); // $p.find(".toggle").html($t.attr("data-more-text")||"more"); return false; }); }; function dotdotdotcallback(istruncated, originalcontent) { var $tog = $(".toggle", this); if (!istruncated) { $tog.remove(); } else { $tog.html($tog.attr("data-more-text") || "more"); } } chinapeople.tab_change_text_dot = function () { $(document).on("shown.bs.tab", ".js-tab-dot a", function () { $(document).trigger("text-dotdotdot"); }); }; return chinapeople; }); /*! * jquery mobile virtual mouse @version * http://jquerymobile.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: virtual mouse (vmouse) bindings //>>group: core //>>description: normalizes touch/mouse events. //>>docs: http://api.jquerymobile.com/?s=vmouse // this plugin is an experiment for abstracting away the touch and mouse // events so that developers don't have to worry about which method of input // the device their document is loaded on supports. // // the idea here is to allow the developer to register listeners for the // basic mouse events, such as mousedown, mousemove, mouseup, and click, // and the plugin will take care of registering the correct listeners // behind the scenes to invoke the listener at the fastest possible time // for that device, while still retaining the order of event firing in // the traditional mouse environment, should multiple handlers be registered // on the same element for different events. // // the current version exposes the following virtual events to jquery bind methods: // "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel" ( function( factory ) { if ( typeof define === "function" && define.amd ) { // amd. register as an anonymous module. define( 'jquery.mobile.vmouse',[ "jquery" ], factory ); } else { // browser globals factory( jquery ); } } )( function( $ ) { var datapropertyname = "virtualmousebindings", touchtargetpropertyname = "virtualtouchid", toucheventprops = "clientx clienty pagex pagey screenx screeny".split( " " ), virtualeventnames = "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split( " " ), generalprops = ( "altkey bubbles cancelable ctrlkey currenttarget detail eventphase " + "metakey relatedtarget shiftkey target timestamp view which" ).split( " " ), mousehookprops = $.event.mousehooks ? $.event.mousehooks.props : [], mouseeventprops = generalprops.concat( mousehookprops ), activedochandlers = {}, resettimerid = 0, startx = 0, starty = 0, didscroll = false, clickblocklist = [], blockmousetriggers = false, blocktouchtriggers = false, eventcapturesupported = "addeventlistener" in document, $document = $( document ), nexttouchid = 1, lasttouchid = 0, threshold, i; $.vmouse = { movedistancethreshold: 10, clickdistancethreshold: 10, resettimerduration: 1500, maximumtimebetweentouches: 100 }; function getnativeevent( event ) { while ( event && typeof event.originalevent !== "undefined" ) { event = event.originalevent; } return event; } function createvirtualevent( event, eventtype ) { var t = event.type, oe, props, ne, prop, ct, touch, i, j, len; event = $.event( event ); event.type = eventtype; oe = event.originalevent; props = generalprops; // addresses separation of $.event.props in to $.event.mousehook.props and issue 3280 // https://github.com/jquery/jquery-mobile/issues/3280 if ( t.search( /^(mouse|click)/ ) > -1 ) { props = mouseeventprops; } // copy original event properties over to the new event // this would happen if we could call $.event.fix instead of $.event // but we don't have a way to force an event to be fixed multiple times if ( oe ) { for ( i = props.length; i; ) { prop = props[ --i ]; event[ prop ] = oe[ prop ]; } } // make sure that if the mouse and click virtual events are generated // without a .which one is defined if ( t.search( /mouse(down|up)|click/ ) > -1 && !event.which ) { event.which = 1; } if ( t.search( /^touch/ ) !== -1 ) { ne = getnativeevent( oe ); t = ne.touches; ct = ne.changedtouches; touch = ( t && t.length ) ? t[ 0 ] : ( ( ct && ct.length ) ? ct[ 0 ] : undefined ); if ( touch ) { for ( j = 0, len = toucheventprops.length; j < len; j++ ) { prop = toucheventprops[ j ]; event[ prop ] = touch[ prop ]; } } } return event; } function getvirtualbindingflags( element ) { var flags = {}, b, k; while ( element ) { b = $.data( element, datapropertyname ); for ( k in b ) { if ( b[ k ] ) { flags[ k ] = flags.hasvirtualbinding = true; } } element = element.parentnode; } return flags; } function getclosestelementwithvirtualbinding( element, eventtype ) { var b; while ( element ) { b = $.data( element, datapropertyname ); if ( b && ( !eventtype || b[ eventtype ] ) ) { return element; } element = element.parentnode; } return null; } function enabletouchbindings() { blocktouchtriggers = false; } function disabletouchbindings() { blocktouchtriggers = true; } function enablemousebindings() { lasttouchid = 0; clickblocklist.length = 0; blockmousetriggers = false; // when mouse bindings are enabled, our // touch bindings are disabled. disabletouchbindings(); } function disablemousebindings() { // when mouse bindings are disabled, our // touch bindings are enabled. enabletouchbindings(); } function clearresettimer() { if ( resettimerid ) { cleartimeout( resettimerid ); resettimerid = 0; } } function startresettimer() { clearresettimer(); resettimerid = settimeout( function() { resettimerid = 0; enablemousebindings(); }, $.vmouse.resettimerduration ); } function triggervirtualevent( eventtype, event, flags ) { var ve; if ( ( flags && flags[ eventtype ] ) || ( !flags && getclosestelementwithvirtualbinding( event.target, eventtype ) ) ) { ve = createvirtualevent( event, eventtype ); $( event.target ).trigger( ve ); } return ve; } function mouseeventcallback( event ) { var touchid = $.data( event.target, touchtargetpropertyname ), ve; // it is unexpected if a click event is received before a touchend // or touchmove event, however this is a known behavior in mobile // safari when mobile voiceover (as of ios 8) is enabled and the user // double taps to activate a link element. in these cases if a touch // event is not received within the maximum time between touches, // re-enable mouse bindings and call the mouse event handler again. if ( event.type === "click" && $.data( event.target, "lasttouchtype" ) === "touchstart" ) { settimeout( function() { if ( $.data( event.target, "lasttouchtype" ) === "touchstart" ) { enablemousebindings(); delete $.data( event.target ).lasttouchtype; mouseeventcallback( event ); } }, $.vmouse.maximumtimebetweentouches ); } if ( !blockmousetriggers && ( !lasttouchid || lasttouchid !== touchid ) ) { ve = triggervirtualevent( "v" + event.type, event ); if ( ve ) { if ( ve.isdefaultprevented() ) { event.preventdefault(); } if ( ve.ispropagationstopped() ) { event.stoppropagation(); } if ( ve.isimmediatepropagationstopped() ) { event.stopimmediatepropagation(); } } } } function handletouchstart( event ) { var touches = getnativeevent( event ).touches, target, flags, t; if ( touches && touches.length === 1 ) { target = event.target; flags = getvirtualbindingflags( target ); $.data( event.target, "lasttouchtype", event.type ); if ( flags.hasvirtualbinding ) { lasttouchid = nexttouchid++; $.data( target, touchtargetpropertyname, lasttouchid ); clearresettimer(); disablemousebindings(); didscroll = false; t = getnativeevent( event ).touches[ 0 ]; startx = t.pagex; starty = t.pagey; triggervirtualevent( "vmouseover", event, flags ); triggervirtualevent( "vmousedown", event, flags ); } } } function handlescroll( event ) { if ( blocktouchtriggers ) { return; } if ( !didscroll ) { triggervirtualevent( "vmousecancel", event, getvirtualbindingflags( event.target ) ); } $.data( event.target, "lasttouchtype", event.type ); didscroll = true; startresettimer(); } function handletouchmove( event ) { if ( blocktouchtriggers ) { return; } var t = getnativeevent( event ).touches[ 0 ], didcancel = didscroll, movethreshold = $.vmouse.movedistancethreshold, flags = getvirtualbindingflags( event.target ); $.data( event.target, "lasttouchtype", event.type ); didscroll = didscroll || ( math.abs( t.pagex - startx ) > movethreshold || math.abs( t.pagey - starty ) > movethreshold ); if ( didscroll && !didcancel ) { triggervirtualevent( "vmousecancel", event, flags ); } triggervirtualevent( "vmousemove", event, flags ); startresettimer(); } function handletouchend( event ) { if ( blocktouchtriggers || $.data( event.target, "lasttouchtype" ) === undefined ) { return; } disabletouchbindings(); delete $.data( event.target ).lasttouchtype; var flags = getvirtualbindingflags( event.target ), ve, t; triggervirtualevent( "vmouseup", event, flags ); if ( !didscroll ) { ve = triggervirtualevent( "vclick", event, flags ); if ( ve && ve.isdefaultprevented() ) { // the target of the mouse events that follow the touchend // event don't necessarily match the target used during the // touch. this means we need to rely on coordinates for blocking // any click that is generated. t = getnativeevent( event ).changedtouches[ 0 ]; clickblocklist.push( { touchid: lasttouchid, x: t.clientx, y: t.clienty } ); // prevent any mouse events that follow from triggering // virtual event notifications. blockmousetriggers = true; } } triggervirtualevent( "vmouseout", event, flags ); didscroll = false; startresettimer(); } function hasvirtualbindings( ele ) { var bindings = $.data( ele, datapropertyname ), k; if ( bindings ) { for ( k in bindings ) { if ( bindings[ k ] ) { return true; } } } return false; } function dummymousehandler() { } function getspecialeventobject( eventtype ) { var realtype = eventtype.substr( 1 ); return { setup: function( /* data, namespace */ ) { // if this is the first virtual mouse binding for this element, // add a bindings object to its data. if ( !hasvirtualbindings( this ) ) { $.data( this, datapropertyname, {} ); } // if setup is called, we know it is the first binding for this // eventtype, so initialize the count for the eventtype to zero. var bindings = $.data( this, datapropertyname ); bindings[ eventtype ] = true; // if this is the first virtual mouse event for this type, // register a global handler on the document. activedochandlers[ eventtype ] = ( activedochandlers[ eventtype ] || 0 ) + 1; if ( activedochandlers[ eventtype ] === 1 ) { $document.bind( realtype, mouseeventcallback ); } // some browsers, like opera mini, won't dispatch mouse/click events // for elements unless they actually have handlers registered on them. // to get around this, we register dummy handlers on the elements. $( this ).bind( realtype, dummymousehandler ); // for now, if event capture is not supported, we rely on mouse handlers. if ( eventcapturesupported ) { // if this is the first virtual mouse binding for the document, // register our touchstart handler on the document. activedochandlers[ "touchstart" ] = ( activedochandlers[ "touchstart" ] || 0 ) + 1; if ( activedochandlers[ "touchstart" ] === 1 ) { $document.bind( "touchstart", handletouchstart ) .bind( "touchend", handletouchend ) // on touch platforms, touching the screen and then dragging your finger // causes the window content to scroll after some distance threshold is // exceeded. on these platforms, a scroll prevents a click event from being // dispatched, and on some platforms, even the touchend is suppressed. to // mimic the suppression of the click event, we need to watch for a scroll // event. unfortunately, some platforms like ios don't dispatch scroll // events until *after* the user lifts their finger (touchend). this means // we need to watch both scroll and touchmove events to figure out whether // or not a scroll happenens before the touchend event is fired. .bind( "touchmove", handletouchmove ) .bind( "scroll", handlescroll ); } } }, teardown: function( /* data, namespace */ ) { // if this is the last virtual binding for this eventtype, // remove its global handler from the document. --activedochandlers[eventtype]; if ( !activedochandlers[ eventtype ] ) { $document.unbind( realtype, mouseeventcallback ); } if ( eventcapturesupported ) { // if this is the last virtual mouse binding in existence, // remove our document touchstart listener. --activedochandlers["touchstart"]; if ( !activedochandlers[ "touchstart" ] ) { $document.unbind( "touchstart", handletouchstart ) .unbind( "touchmove", handletouchmove ) .unbind( "touchend", handletouchend ) .unbind( "scroll", handlescroll ); } } var $this = $( this ), bindings = $.data( this, datapropertyname ); // teardown may be called when an element was // removed from the dom. if this is the case, // jquery core may have already stripped the element // of any data bindings so we need to check it before // using it. if ( bindings ) { bindings[ eventtype ] = false; } // unregister the dummy event handler. $this.unbind( realtype, dummymousehandler ); // if this is the last virtual mouse binding on the // element, remove the binding data from the element. if ( !hasvirtualbindings( this ) ) { $this.removedata( datapropertyname ); } } }; } // expose our custom events to the jquery bind/unbind mechanism. for ( i = 0; i < virtualeventnames.length; i++ ) { $.event.special[ virtualeventnames[ i ] ] = getspecialeventobject( virtualeventnames[ i ] ); } // add a capture click handler to block clicks. // note that we require event capture support for this so if the device // doesn't support it, we punt for now and rely solely on mouse events. if ( eventcapturesupported ) { document.addeventlistener( "click", function( e ) { var cnt = clickblocklist.length, target = e.target, x, y, ele, i, o, touchid; if ( cnt ) { x = e.clientx; y = e.clienty; threshold = $.vmouse.clickdistancethreshold; // the idea here is to run through the clickblocklist to see if // the current click event is in the proximity of one of our // vclick events that had preventdefault() called on it. if we find // one, then we block the click. // // why do we have to rely on proximity? // // because the target of the touch event that triggered the vclick // can be different from the target of the click event synthesized // by the browser. the target of a mouse/click event that is synthesized // from a touch event seems to be implementation specific. for example, // some browsers will fire mouse/click events for a link that is near // a touch event, even though the target of the touchstart/touchend event // says the user touched outside the link. also, it seems that with most // browsers, the target of the mouse/click event is not calculated until the // time it is dispatched, so if you replace an element that you touched // with another element, the target of the mouse/click will be the new // element underneath that point. // // aside from proximity, we also check to see if the target and any // of its ancestors were the ones that blocked a click. this is necessary // because of the strange mouse/click target calculation done in the // android 2.1 browser, where if you click on an element, and there is a // mouse/click handler on one of its ancestors, the target will be the // innermost child of the touched element, even if that child is no where // near the point of touch. ele = target; while ( ele ) { for ( i = 0; i < cnt; i++ ) { o = clickblocklist[ i ]; touchid = 0; if ( ( ele === target && math.abs( o.x - x ) < threshold && math.abs( o.y - y ) < threshold ) || $.data( ele, touchtargetpropertyname ) === o.touchid ) { // xxx: we may want to consider removing matches from the block list // instead of waiting for the reset timer to fire. e.preventdefault(); e.stoppropagation(); return; } } ele = ele.parentnode; } } }, true ); } } ); define('photo',[ 'require', 'jquery.mobile.vmouse' ], function (require, mobile) { 'use strict'; var chinapeople = chinapeople || {}; $(function ($) { if ($(window).width() > 768) return; if (!/msie [6-8]/i.test(navigator.useragent)) { jquery.loadcss("https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css"); $.loadjs('https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js').then(function () { chinapeople.image_pinchzoom(); }); } }); chinapeople.image_pinchzoom = function () { if ($(window).width() > 768) return; var closeable = true; var close_timer = null; var oldtime = 0; // $.fancybox = undefined; // $.fn.fancybox = undefined; $.loadjs('https://cdn.jsdelivr.net/npm/hammerjs@2.0.8/hammer.min.js').then(function(d){ d && (hammer=d); }); $(document).off('vclick.zoom', 'img') .on('vclick.zoom', 'img', function (e) { if ($(this).prop('naturalwidth') < 200) return; if ($(this).hasclass('js-no-zoom')) return; if ($(this).closest('.fancybox-container').length > 0 || $(this).closest('a').length > 0) return; closeable = false; settimeout(function () { closeable = true }, 800); $.fancybox.open([{ src: this.src, opts: { // caption: 'first caption', // thumb: '1_s.jpg' } }], { toolbar: false, loop: false }); $('.fancybox-container').addclass('mobile-big-img-container'); var myelement = $('.fancybox-container').get(0); var mc = new hammer(myelement, {}); var singletap = new hammer.tap({ event: 'tap' }); var doubletap = new hammer.tap({ event: 'doubletap', taps: 2 }); var tripletap = new hammer.tap({ event: 'tripletap', taps: 3 }); mc.add([tripletap, doubletap, singletap]); tripletap.recognizewith([doubletap, singletap]); doubletap.recognizewith(singletap); doubletap.requirefailure(tripletap); singletap.requirefailure([tripletap, doubletap]); // listen to events... mc.on('tap', function (ev) { // console.log(ev); $('.fancybox-button--close').trigger('click'); } ); return; }); }; return chinapeople; }); define("global/window", [], function () { return window; }); define("global/document", [], function () { return document; }); define('videobox',[], function () { 'use strict'; var video_def= $.deferred(); // 视频播放器组件 var videojs_promise = function () { var videojs_ie8 = $.when(); if (/msie 8/i.test(navigator.useragent)) videojs_ie8 = $.loadjs('https://www.chinapeople.com/assets/corp/2020/js/lib/videojs-ie8.min.js?ver=2020061418271234'); return videojs_ie8 .then(function () { if (typeof window.videojs != "undefined") return $.when(); return $.loadjs('https://www.chinapeople.com/assets/corp/2020/js/lib/video.min.js?ver=2020061418271234'); }) .then(function (videojs) { (typeof videojs == "function") && (window.videojs = videojs); $(document).trigger("videojs-loaded"); // window.videojs.options.flash.swf = "https://cdn.jsdelivr.net/npm/@brightcove/videojs-flashls-swf@6.4.5/dist/video-js.swf"; if(window.videojs.videojsresolutionswitcher) return $.when(); return $.loadjs('https://www.chinapeople.com/assets/corp/2020/js/lib/videojs-resolution-switcher.js?ver=2020061418271234'); }) .then(function (d) { $(document).trigger("videojs-resolution-switcher-loaded"); video_def.resolve(videojs); }); }; $(document).on("videojs-loaded", function (e) { $.loadjs('https://www.chinapeople.com/assets/public/js/vendor/video-js-7.5.4/plugins/videojs.ga.js').then(function (d) { $(document).trigger("videojs-ga-loaded"); $(document).on("videojs-setup", function(e, players){ $.each(players, function (i, player) { var gaoption = { eventlabel: player.currentsrc().split('/').slice(-1)[0] + '|' + document.url }; player.ga(gaoption); }); }); }) .then(function(){ $(document).trigger("videojs-setup", videojs.getplayers()); }); }); // 视频默认分辨率 $(document).on("resolutionswitcher", function (e, players) { players = players || {}; var winw = $(window).width(); $.each(players, function (i, o) { if ( !$.grep(o.controlbar.children(), function (element, index) { return element.name_ == 'button'; }).length ) { var player = o; try { var mybutton = player.controlbar.addchild("button"); var mybuttondom = mybutton.el(); mybuttondom.innerhtml = ''; } catch (error) {} } // var $rs_btn = $(o.controlbar.resolutionswitcher); if (!$rs_btn.length) { var vrs = { 'default': 360, dynamiclabel: true }; if (winw > 991) vrs['default'] = 720; o.videojsresolutionswitcher(vrs); } if ($rs_btn.length && $rs_btn.find('.vjs-menu-content .vjs-menu-item').length <= 1) { $rs_btn.addclass('hidden'); } }); }); $(document).on("videojs-resolution-switcher-loaded", function(e){ if (typeof videojs != "undefined") settimeout(function () { $(document).trigger("resolutionswitcher", videojs.getplayers()); }, 1000); }); if ($("video, .btn-play, .js-play-btn, .js_video_player").length) videojs_promise(); $(document) .on("click", ".btn-close, .js-play-btn", function(e){ $("body").removeclass("video-popup"); }) .on("click", ".btn-play, .js-close-btn", function(e){ $("body").addclass("video-popup"); }); function videobox(dom, id) { this.dom = dom; if(this.dom[0].inited) return; this.dom[0].inited= true; this.defaultsrc = dom.attr('default-src'); this.src = dom.attr('video-src'); this.poster = dom.attr('poster'); this.id = id; this.popup = dom.attr('data-popup') || 1; var self= this; video_def.then(function(d){ self.init(); }); // this.init(); } videobox.prototype = { init: function () { var self = this; var div = document.createelement('div'); div.setattribute('class', 'video-box'); var vwidth = 960, vheight = 540; if (window.innerwidth < 990) { vwidth = window.innerwidth; vheight = vwidth / (16 / 9); } $(div).html( '
' ); if (this.popup == "0") { this.dom.after(div).end().hide(); } else $('body').append($(div)); var wwidth = window.innerwidth || math.max(document.documentelement.clientheight, document.body.clientheight); var video = videojs('my-video-' + this.id, { controls: true, }, function () { var player = this; window.player = player; $(document).trigger("videojs-setup", {video_id: video}); $(document).trigger("resolutionswitcher", {video_id: video}); //下载按钮 // try { // var mybutton = player.controlbar.addchild("button"); // var mybuttondom = mybutton.el(); // mybuttondom.innerhtml = ''; // } catch (error) { // } // if (wwidth > 992) { var aaa=[]; try{ aaa = eval(self.src)||[]; }catch(_e){} console.log(self.src); //切换清晰度 console.log(player); if(aaa.length>0) player.updatesrc(aaa); if(aaa.length<=1 && player.controlbar.resolutionswitcher) player.controlbar.resolutionswitcher.classlist.add('hidden'); player.on('resolutionchange', function () { console.info('source changed to %s', player.src()) }); // } }); // try { // var vrs_ops = { // 'default': 360, // dynamiclabel: true // }; // if (wwidth > 991) vrs_ops['default'] = 720; // video.videojsresolutionswitcher(vrs_ops); // } catch (error) { // } this.dom.on('click', function (e) { e.preventdefault(); $(div).addclass('show'); video.play(); }); $(div) .find('a.btn-close') .on('click', function (e) { e.preventdefault(); $(div).removeclass('show'); video.pause(); }); } }; return videobox; }); !function(i){"use strict";"function"==typeof define&&define.amd?define('slick.min',["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jquery)}((function(i){"use strict";var e,t=window.slick||{};e=0,(t=function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveheight:!1,appendarrows:i(t),appenddots:i(t),arrows:!0,asnavfor:null,prevarrow:'',nextarrow:'',autoplay:!1,autoplayspeed:3e3,centermode:!1,centerpadding:"50px",cssease:"ease",custompaging:function(e,t){return i('