"use strict";var smsFlag=!1,smsShowFun=null,hasScroll=!1,isWeixin=function(){return"micromessenger"==navigator.userAgent.toLowerCase().match(/MicroMessenger/i)};function wxPoint(){var e;0<$(".wx_poi_link").length&&((e=document.createElement("style")).innerHTML='.wx_poi_popover{display:none;position:fixed;width:100%;height:100%;z-index:999999999;left:0;top:0;background-color:rgba(0,0,0,0.5);display:flex;align-items:center;justify-content:center;}.wx_poi_con{background-color:#fff;border:1px solid #eee;padding:10px;border-radius:5px;box-shadow:0 2px 10px rgba(0,0,0,0.1);z-index:1000;width:800px;height:500px;max-width:96%;max-height:80%;}.wx_poi_popover p{height:26px;line-height:26px;}.wx_poi_popover p.name{display:flex;justify-content:space-between;}.wx_poi_popover p.name span{font-weight:bold;}.wx_poi_popover p.name svg{margin:0;}.wx_poi_popover::after{content:"";position:absolute;bottom:-10px;left:20px;margin-left:-5px;border-width:5px;border-style:solid;border-color:#ccc transparent transparent transparent;}.wx_poi_popover #wxMapCotainer{height:calc(100% - 52px);padding-top:5px;}',document.head.appendChild(e),$(".wx_poi_link").attr("href","javascript:;").css({color:"rgb(42 115 178)"}).prepend(''),renderWxMap(),$("body").on("click",".wx_poi_link",function(){showPop({name:decodeURIComponent($(this).data("name")),address:decodeURIComponent($(this).data("address")),lng:decodeURIComponent($(this).data("longitude")),lat:decodeURIComponent($(this).data("latitude"))},$(this),!0)}))}$(function(){window.pageObj&&1==window.pageObj.isHomePage&&gray(),"portal-saas-mall"!=tenant.unittype&&(festival(),smartServiceInit()),268516!=tenant.tenantId&&"portal-saas-mall"!=tenant.unittype&&preventFish(),isWeixin()&&"portal-saas-mall"!=tenant.unittype&&wxShare(),"miniprogram"===window.__wxjs_environment&&$require(["/npublic/commonjs/jweixin/jweixin.js","pl_util"],function(){wx.miniProgram.postMessage({data:{shareTitle:encodeURIComponent(document.title),shareDesc:getmeta("description"),shareUrl:encodeURIComponent(locations.href)}})}),accessLimit(),wxPoint()});var wxMap=null,wxMarkerLayer=null,wxInfoWindowlocations=null;function renderWxMap(){$require(["async!tMap"],function(){var e=$(".wx_poi_popover");0==e.length&&($("body").append('
\n
\n

\n

\n
\n
\n
'),e=$(".wx_poi_popover")),e.show(),wxMap=new TMap.Map(e.find("#wxMapCotainer")[0],{center:new TMap.LatLng(39.908823,116.39747),zoom:17}),e.hide(),e.on("click",".wx_poi_close",function(){e.hide()})})}function showPop(n,e,o){$require(["async!tMap"],function(){var e,t,a=$(".wx_poi_popover");o?(a.show(),a.find(".name span").text(n.name),a.find(".address span").text(n.address),wxMap.setCenter(new TMap.LatLng(n.lat,n.lng)),wxMap.setZoom(17),e=wxMap,t=n,wxMarkerLayer?wxMarkerLayer.updateGeometries([{id:"1",styleId:"myStyle",position:new TMap.LatLng(t.lat,t.lng)}]):wxMarkerLayer=new TMap.MultiMarker({map:e,styles:{myStyle:new TMap.MarkerStyle({width:20,height:30})},geometries:[{id:"1",styleId:"myStyle",position:new TMap.LatLng(t.lat,t.lng)}]})):a.hide()})}function accessLimit(){var e,t,a,n,o;isFrontEnv()&&locations.hostname==tenant.domain&&(e=tenant.XSKey,t=localStorage.getItem("kt"+tenant.tenantId),a=+new Date,!isNaN(Number(t))&&36e5=t.showTime[0]&&t.nowTime<=t.showTime[1]||!t.showTime||0==t.showTime.length,t.isOpen&&e&&$require(["/npublic/commonjs/restival.js"],function(e){e.init(t)})))})})}function smartServiceInit(){isFrontEnv()&&$(window).on("mousemove scroll touchmove tap click keydown",function(){hasScroll||(hasScroll=!0,$require(["cmsAjax","pl_util"],function(e){var t=$.getSearch(),n=__ce.smartServiceUrl||"http://web-visitor.yun300.cn",a="".concat(n,"/visitormanager/intelligent/front/checkAndRegister?tenantId=").concat(tenant.tenantId,"&instance=").concat(tenant.bossProductInstance),o={account:localStorage.getItem("account_".concat(tenant.tenantId))};t.previewFlow&&(o.account=t.previewFlow),e.cmsAjax.postJson(a,o).then(function(a){var e;200==a.status&&a.data&&!function(e){var t=!1,a=JSON.parse(e.colorLayout).linkObj,n=window.pageObj?pageObj.pageId:"";n&&a&&(e=a.P,!isMo()||1!=tenant.mobilesStatus&&6!=tenant.mobilesStatus&&11!=tenant.mobilesStatus||(e=a.M),-1