1// åç«¯æ¨¡æ¿ 2! function(a) { 3 "use strict"; 4 var b = function(a, c) { 5 var d = /[^\w\-\.:]/.test(a) ? new Function(b.arg + ",tmpl", "var _e=tmpl.encode" + b.helper + ",_s='" + a.replace(b.regexp, b.func) + "';return _s;") : b.cache[a] = b.cache[a] || b(b.load(a)); 6 return c ? d(c, b) : function(a) { 7 return d(a, b) 8 } 9 }; 10 b.cache = {}, b.load = function(a) { 11 return document.getElementById(a).innerHTML 12 }, b.regexp = /([\s'\\])(?!(?:[^{]|\{(?!%))*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g, b.func = function(a, b, c, d, e, f) { 13 return b ? { 14 "\n": "\\n", 15 "\r": "\\r", 16 " ": "\\t", 17 " ": " " 18 } [b] || "\\" + b : c ? "=" === c ? "'+_e(" + d + ")+'" : "'+(" + d + "==null?'':" + d + ")+'" : e ? "';" : f ? "_s+='" : void 0 19 }, b.encReg = /[<>&"'\x00]/g, b.encMap = { 20 "<": "<", 21 ">": ">", 22 "&": "&", 23 '"': """, 24 "'": "'" 25 }, b.encode = function(a) { 26 return (null == a ? "" : "" + a).replace(b.encReg, function(a) { 27 return b.encMap[a] || "" 28 }) 29 }, b.arg = "o", b.helper = ",print=function(s,e){_s+=e?(s==null?'':s):_e(s);},include=function(s,d){_s+=tmpl(s,d);}", "function" == typeof define && define.amd ? define(function() { 30 return b 31 }) : a.tmpl = b 32}(this); 33// è¿·ä½ åå¸è®¢é ç³»ç» 34(function($) { 35 var o = $({}); 36 $.subscribe = function() { 37 o.on.apply(o, arguments); 38 }; 39 $.unsubscribe = function() { 40 o.off.apply(o, arguments); 41 }; 42 $.publish = function() { 43 o.trigger.apply(o, arguments); 44 }; 45}($)); 46 47$(function() { 48 'use strict'; 49 var win = window; 50 win.GLOBAL = win.GLOBAL || {}; 51 win.hr = win.hr || {}; 52 53 win.hr.version = '1.6.12'; 54 win.hr.page = win.hr.page || {}; 55 win.hr.component = win.hr.component || {}; 56 57 /** 58 * @description 注åç»ä»¶ 59 * @param {String} name ç»ä»¶åå 60 * @param {Object} obj ç»ä»¶ Javascript é»è¾ï¼JSON æ ¼å¼ 61 * @return {Object} è¿å window.hr.component 对象 62 * @example 63 * hr.regComponent('ç»ä»¶å', { 64 * init: function () { // æ¤ init æ¹æ³ä¸ºå¿ éï¼ç»ä»¶æ³¨åå伿§è¡çæ¹æ³ 65 * this.someAction(); 66 * }, 67 * someAction: function () { 68 * // ç»ä»¶ Javascript é»è¾ï¼å¯ä»¥æ ¹æ®éè¦åå¤ä¸ª Function 69 * } 70 * }); 71 * ç»ä»¶æ³¨åå妿è¦å次è°ç¨ï¼å¯ä»¥ç¨ hr.component.ç»ä»¶å è·åç»ä»¶å¯¹è±¡ 72 */ 73 win.hr.regComponent = function(name, obj) { 74 if (typeof name == 'string' && name !== '') { 75 win.hr.util._createNamespace(name.split('.'), obj, win.hr.component); 76 } 77 }; 78 79 /** 80 * @description 注åé¡µé¢ 81 * @param {String} name 页é¢åå 82 * @param {Object} obj é¡µé¢ Javascript é»è¾ï¼JSON æ ¼å¼ 83 * @return {Object} è¿å window.hr.page 对象 84 * @example 85 * hr.regPage('页é¢å', { 86 * init: function () { // æ¤ init æ¹æ³ä¸ºå¿ éï¼ç»ä»¶é¡µé¢å伿§è¡çæ¹æ³ 87 * this.someAction(); 88 * }, 89 * someAction: function () { 90 * // é¡µé¢ Javascript é»è¾ï¼å¯ä»¥æ ¹æ®éè¦åå¤ä¸ª Function 91 * } 92 * }); 93 * 页颿³¨åå妿è¦å次è°ç¨ï¼å¯ä»¥ç¨ hr.page.页é¢å è·å页é¢å¯¹è±¡ 94 */ 95 win.hr.regPage = function(name, obj) { 96 if (typeof name == 'string' && name !== '') { 97 win.hr.util._createNamespace(name.split('.'), obj, win.hr.page); 98 } 99 }; 100 101 win.hr.util = { 102 /** 103 * @description æ¸²ææ¨¡æ¿ 104 * @param {JSON} opt å å«ä»¥ä¸å 容 105 * @param {String} opt.tmpl 模æ¿åºåç ID å 106 * @param {Object} opt.data è¦æ¸²æç JSON æ°æ® 107 * @param {Object} opt.to è¦è¿½å è¿ç jQuery DOM 对象 108 * @param {Object} opt.insertTo è¦æå ¥å°å ¶ä¹åæä¹åç jQuery DOM 对象 109 * @param {String}
109 opt.method 渲æçæ¹å¼ï¼å æ¬ replaceãappend å prependï¼å½åæ¶æ insertTo æ¶ï¼æ¯ä»¥ insertTo 为åºå 110 * @param {Function} opt.callbackFn åè°å½æ° 111 */ 112 renderTmpl: function(opt) { 113 var strTargetTmpl = opt.tmpl || ''; 114 var jsonData = opt.data || {}; 115 var $target = opt.to; 116 var method = opt.method || 'append'; 117 var $insertTo = opt.insertTo || null; 118 if ($target) { 119 var tmpled = tmpl(strTargetTmpl, jsonData); 120 switch (method) { 121 case 'replace': 122 $target.html(tmpled); 123 break; 124 case 'append': 125 if ($insertTo) { 126 $(tmpled).insertAfter($insertTo); 127 } else { 128 $target.append(tmpled); 129 } 130 break; 131 case 'prepend': 132 if ($insertTo) { 133 $(tmpled).insertBefore($insertTo); 134 } else { 135 $target.prepend(tmpled); 136 } 137 break; 138 default: 139 break; 140 } 141 } 142 $.isFunction(opt.callbackFn) && opt.callbackFn(); 143 }, 144 /** 145 * @description ä» URL ä¸è·åæå®åæ°å¼ 146 * @param {String} str è¦ä» URL ä¸è·åçåæ°å¼ 147 */ 148 getUrlParam: function(str) { 149 var s = location.search; 150 var tmp = []; 151 var value = ''; 152 if (s) { 153 tmp = s.substr(1).split('&'); 154 } 155 for (var i = 0; i < tmp.length; i++) { 156 if (tmp[i].substring(0, tmp[i].indexOf('=')) === str) { 157 value = tmp[i].substr(tmp[i].indexOf('=') + 1); 158 break; 159 } 160 } 161 return value; 162 }, 163 /** 164 * @description ä½¿ç¨ rem å使¶èªå¨è®¡ç® html åå§åä½å°ºå¯¸ãæ¯å¦è®¾è®¡ç¨¿æ¯ 750px çï¼é£ä¹å¯¹åºç 1rem å°±çäº 100pxï¼å¦æè®¾è®¡ç¨¿æ¯éæ åå°ºå¯¸ï¼æ¯å¦ 844pxï¼é£ä¹å¯ä»¥ä¼ å ¥åæ° baseWidth 844ï¼è¿æ ·å¯ä»¥ä¿è¯ 1rem çäº 100pxï¼ä¾¿äºè®¡ç®ã 165 * @param {Number} baseWidth åºå尺寸 166 */ 167 resizePage: function(baseWidth) { 168 var baseW = baseWidth || 750; 169 var docEl = document.documentElement, 170 resizeEvt = 'orientationchange' in win ? 'orientationchange' : 'resize', 171 recalc = function() { 172 var clientWidth = docEl.clientWidth; 173 if (!clientWidth) { 174 return; 175 } 176 if (clientWidth > baseW) { 177 clientWidth = baseW; 178 } 179 docEl.style.fontSize = 100 * (clientWidth / baseW) + 'px'; 180 }; 181 if (!document.addEventListener) { 182 return; 183 } 184 win.addEventListener(resizeEvt, recalc, false); 185 recalc(); 186 }, 187 /** 188 * @description å 鍿¹æ³ï¼å建ä¸ä¸ªå½åç©ºé´ 189 */ 190 _createNamespace: function(parts, obj, parent) { 191 var obj = obj || { 192 init: function() {} 193 }; 194 var i = 0; 195 if (parts[0] === 'hr') { 196 parts = parts.slice(1); 197 } 198 for (i = 0; i < parts.length; i++) { 199 if (typeof parent[parts[i]] == 'undefined') { 200 parent[parts[i]] = obj; 201 // ç»ä»¶æé¡µé¢æ³¨ååæ§è¡ 202 obj.init(); 203 } 204 parent = parent[parts[i]]; 205 } 206 }, 207 208 moNav: function() { 209 $('body').on('click', '.mo-open', function() { 210 $('.mo-menu').addClass('open') 211 }).on('click', '.js-close', function() { 212 $('.mo-menu').removeClass('open') 213 }).on('click', '.mo-nav .v1', function() { 214 // $(this).toggleClass('active').siblings('.con').stop().slideToggle().parent('li').siblings('li').find('.v1').removeClass('active').siblings('.con').stop().slideUp() 215 $(this).find('.con').stop().slideToggle().parent('li').siblings('li').find('.con').stop().slideUp(); 216 }); 217 }, 218 weixinPop: function() { 219 $('body').on('click', '.js-weixin', function() { 220 $('.pop-mask, .pop-eq').stop().fadeIn(); 221 }).on('click', '.weixin-btn', function() { 222 $('.pop-mask, .pop-eq').stop().fadeOut(); 223 }) 224 }, 225 popWait: function() { 226 $('body').on('click', '.js_wait', function() { 227 $('.pop-wait').fadeIn(); 228 var t = setTimeout(function() { 229 $('.pop-wait').fadeOut(); 230 }, 2000) 231 }) 232 }, 233 videoPlay: function() { 234 $('body').on('click', '.js_play', function() { 235 $(this).hide(); 236 $('#video1').attr('controls', true); 237 $('#video1')[0].play(); 238 }) 239 }, 240 brJs: function() { 241 var _width = $(window).width(); 242 if (_width < 768) { 243 $('.z-tab322 li:eq(4)').after('<br>') 244 } 245 }, 246 navHover: function() { 247 $('.nav').hover(function() { 248 $('.page-shadow').stop().fadeIn(200); 249 }, function() { 250 $('.page-shadow').stop().fadeOut(200); 251 $('.menu-modal-right').css('display', 'none'); 252 }); 253 254 $('.nav > li').hover( 255 function() { 256 $(this).addClass('hover'); 257 $(this).children('.nav_child').stop().fadeIn(); 258 }, 259 function() { 260 $(this).removeClass('hover'); 261 $(this).children('.nav_child').stop().fadeOut(); 262 var $right = $(this).parent().parent().parent().parent().find('.nav-child-right'); 263 $right.fadeOut(200); 264 } 265 ); 266 $('.left-nav>li>a').hover( 267 function() { 268 if (window.screen.width > 1280) { 269 var $right = $(this).parent().parent().parent().parent().find('.nav-child-right'); 270 $right.fadeIn(200); 271 var menu_data = $(this).attr('data-type'); 272 getDis($right, menu_data); 273 } 274 }, 275 function() { 276 var $right = $(this).parent().parent().parent().parent().find('.nav-child-right'); 277 278 } 279 ); 280 281 function getDis(obj, index) { 282 var $obj_child = obj.find('.menu-modal-right'); 283 $obj_child.each(function() { 284 var $this = $(this); 285 if ($(this).attr('data-type') == index) { 286 $obj_child.not($(this)).fadeOut(200); 287 $this.fadeIn(200); 288 } 289 }); 290 } 291 }, 292 telHover: function(){ 293 $('.fd-follow .tel').hover(function(){ 294 $('.phone-num').stop().fadeToggle(); 295 }) 296 }, 297 goTop: function() { 298 // è¿åé¡¶é¨ 299 var $goTop = $('.goTop'); 300 $goTop.on('click', function() { 301 $('body,html').animate({ 302 scrollTop: 0 303 }, 500); 304 // $('.goTop').css({ 305 // background: 'rgba(0,0,0,0.6)' 306 // }); 307 return false; 308 }) 309 }, 310 swiperWelcome: function() { 311 var welcomeSwiper = new Swiper ('.swiper-welcome1', { 312 direction: 'vertical', 313 loop: true, 314 autoplay: { delay: 3000, stopOnLastSlide: false, disableOnInteraction: true, } 315 }) 316 } 317 318 }; 319 320 win.hr.init = function() { 321 hr.util.moNav(); 322 hr.util.weixinPop(); 323 hr.util.popWait(); 324 hr.util.videoPlay(); 325 hr.util.brJs(); 326 hr.util.telHover(); 327 hr.util.goTop(); 328 hr.util.swiperWelcome(); 329 }; 330 331 win.hr.init(); 332});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.