var pagew = $(document).outerWidth(true) + (window.innerWidth - document.body.clientWidth); var pageh = $(window).innerHeight(); try { if (pagew > 1200) { $("body").on("click",".top_pos",function () { }); } else { $(".mtmenu_click a").click(function () { if (pagew > 768) { if ($(this).hasClass("on")) { $(this).removeClass("on"); $(".t_menu").css({ "display": "none" }); } else { $(this).addClass("on"); $(".t_menu").css({ "display": "block" }); } } else { if ($(this).hasClass("on")) { $(this).removeClass("on"); $(".menufr").css({ "display": "none" }); $(document.body).css({ "overflow": "auto" }); $(".topfr").removeClass("top_m"); } else { $(this).addClass("on"); $(".menufr").css({ "display": "block" }); $(document.body).css({ "overflow": "hidden" }); $(".topfr").addClass("top_m"); } } }); } } catch (e) { } try { var menu_1_on = -1; $(".menufr ul li").each(function (i, e) { if (pagew > 768) { $(this).hover( function () { $(".menufr ul li").removeClass("on"); $(this).addClass("on"); $(this).find(".tmcc3_lv1 .tc3v1_li").each(function (i, e) { $(this).hover( function () { $(this).closest("li").find(".tmcc3_lv1 .tc3v1_li").removeClass("on"); $(this).addClass("on"); $(this).find(".tmc3v1_li").each(function (i, e) { $(this).hover( function () { $(this).closest(".tc3v1_li").find(".tmc3v1_li").removeClass("on"); $(this).addClass("on"); }, function () { $(this).closest(".tc3v1_li").find(".tmc3v1_li").removeClass("on"); } ); }); }, function () { $(this).closest("li").find(".tmcc3_lv1 .tc3v1_li").removeClass("on"); } ); }); }, function () { $(".menufr ul li").removeClass("on"); } ); } }); if (pagew < 768) { $(".menufr ul li .tmc_t").each(function () { $(this).click(function () { if (!$(this).closest("li").hasClass("on")) { $(".menufr ul li").removeClass("on"); $(this).closest("li").addClass("on"); } else { $(".menufr ul li").removeClass("on"); } }); }); $(".tc3v1_li .tc3v1i_t").each(function () { $(this).click(function () { if (!$(this).closest(".tc3v1_li").hasClass("on")) { $(".tc3v1_li").removeClass("on"); $(this).closest(".tc3v1_li").addClass("on"); } else { $(".tc3v1_li").removeClass("on"); } }); }); $(".tmc3v1_li .tmc3v1i_t").each(function () { $(this).click(function () { if (!$(this).closest(".tmc3v1_li").hasClass("on")) { $(".tmc3v1_li").removeClass("on"); $(this).closest(".tmc3v1_li").addClass("on"); } else { $(".tmc3v1_li").removeClass("on"); } }); }); } } catch (e) { } try { function getUrlParam(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象 var r = window.location.search.substr(1).match(reg);  //匹配目标参数 if (r != null) return unescape(r[2]); return null; } var _dw = getUrlParam("dw"); var _stopdw = $(".cplbfr").offset().top - $(".topfr").innerHeight(); if (_dw != null) { $('html, body').stop().animate({scrollTop: _stopdw +"px"}) } } catch (e) { } function countup1(_obj) { try { var settings = { 'time': 800, 'delay': 10 }; var $this = _obj; var $settings = settings; if ($this.attr("data-num") != "") { $this.data('counterupTo', $this.attr("data-num")); } if (!$this.data('counterupTo')) { $this.data('counterupTo', $this.text()); } var time = parseInt($this.data("counter-time")) > 0 ? parseInt($this.data("counter-time")) : $settings.time; var delay = parseInt($this.data("counter-delay")) > 0 ? parseInt($this.data("counter-delay")) : $settings.delay; var divisions = time / delay; var num = $this.data('counterupTo'); var nums = [num]; var isComma = /[0-9]+,[0-9]+/.test(num); num = num.replace(/,/g, ''); var isInt = /^[0-9]+$/.test(num); var isFloat = /^[0-9]+\.[0-9]+$/.test(num); var decimalPlaces = isFloat ? (num.split('.')[1] || []).length : 0; for (var i = divisions; i >= 1; i--) { var newNum = parseInt(Math.round(num / divisions * i)); if (isFloat) { newNum = parseFloat(num / divisions * i).toFixed(decimalPlaces); } if (isComma) { while (/(\d+)(\d{3})/.test(newNum.toString())) { newNum = newNum.toString().replace(/(\d+)(\d{3})/, '$1' + ',' + '$2'); } } nums.unshift(newNum); } $this.data('counterup-nums', nums); $this.text('0'); var f = function () { try { if ($this.data('counterup-nums') != "") { $this.text($this.data('counterup-nums').shift()); } if ($this.data('counterup-nums').length) { setTimeout($this.data('counterup-func'), delay); } else { delete $this.data('counterup-nums'); $this.data('counterup-nums', null); $this.data('counterup-func', null); } } catch (e) { } }; $this.data('counterup-func', f); setTimeout($this.data('counterup-func'), delay); } catch (e) { } } try { var earthgrayJpg = '/statics/web/fer/map/earth_gray.jpg'; var locationsJson = '/statics/web/fer/map/locations21.json'; var zbs = [116.46, 39.92]; initGlobeSF(earthgrayJpg, locationsJson, zbs); var ab_05_t_on = -1; $(".ab_05_t ul li").each(function (i, e) { if ($(this).hasClass("on")) { ab_05_t_on = i; } $(this).click(function () { if (ab_05_t_on != i) { $(this).addClass("on"); setTimeout(function () { //if (i == 0) { // locationsJson = "/statics/web/fer/map/locations1.json"; //} if (i == 0) { locationsJson = "/statics/web/fer/map/locations21.json"; zbs = [116.46, 39.92]; } if (i == 1) { locationsJson = "/statics/web/fer/map/locations31.json"; zbs = [116.46, 39.92]; } if (i == 2) { locationsJson = "/statics/web/fer/map/locations4.json"; zbs = [6.490597485158424, 20.487536018185356]; } initGlobeSF(earthgrayJpg, locationsJson, zbs); }, 400); if (ab_05_t_on != -1) { $(this).closest("ul").find("li").eq(ab_05_t_on).removeClass("on"); } ab_05_t_on = i; } }); }); function initGlobeSF(jp, js, zb) { var zbs = zb ? zb : [116.486973, 39.840048]; (globeChart = echarts.init(document.querySelector(".allmap"))).setOption({ globe: { baseTexture: jp, globeRadius: 100, globeOuterRadius: 101, shading: "color", temporalSuperSampling: { enable: !0 }, viewControl: { autoRotate:false, panSensitivity: 0, zoomSensitivity: 0, targetCoord: zbs } }, series: [{ type: "scatter3D", coordinateSystem: "globe", symbol: "circle", symbolSize: 12, itemStyle: { color: "#d80414" }, emphasis: { itemStyle: { opacity: 1 }, label: { show: true, position: "top", textStyle: { color: "#000", fontSize: "16px", fontFamily: "albb" }, formatter: function (e) { e = e.data; return e.name } } }, data: [] }] }), $.get(js).then(function (e) { Array.isArray(e) && globeChart.setOption({ series: [{ data: e }] }) }) } } catch (e) { }