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) { }