var entType = "企业"; var relation = null; var serviceList = null; with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)]; //解析服务列表 $(function(){ //联系地址 if(address){ loadJS("/js/jquery.cxselect.js",function(){ $('#city_china').cxSelect({ selects: ['province', 'city', 'area'], required:0 }); $.cxSelect.setVal(province,city,area); var pt=province?($("#provincesel option[value="+province+"]").text()):""; var ct=city?($("#citysel option[value="+city+"]").text()):""; var at=area?($("#areasel option[value="+area+"]").text()):""; //设置地图上显示的位置 $("#location").attr("value",as1); $("#cityname").attr("value",pt.trim()+ct.trim()+at.trim()); //获取地图的经纬度 loadJS("http://api.map.baidu.com/getscript?v=2&ak=AFd8b176f363f23e6a23d516f4cfb742&services=&t=20150522093217",function(){ loadJS("/js/geocoder.js",function(){ doOptions(); }); }); $("#city_china").text(pt+ct+at+as1); }); } //隐藏地图 $("#fade").click(closeMap); //分享 $(".entinfo-share").click(function(){ $(".bdsharebuttonbox").show(); }); //切换 $(".ent-tab>li").click(function(){ $(".ent-tab>li").removeClass("ent-active"); $(this).addClass("ent-active"); $(".ent-tab-content>div").addClass("hide"); $(".ent-tab-content>div:eq("+$(this).index()+")").removeClass("hide"); if($(this).index() == 1){ initRelation(); }else if($(this).index() == 5 && serviceList == null){ //加载服务列表 serviceList = new ServiceList(); } }); new ServiceList(); }); //显示地图 function showMap(){ document.getElementById('mapshowdiv').style.display = 'block'; document.getElementById('closeshowmap').style.display = 'block'; document.getElementById('fade').style.display = 'block'; $("html,body").addClass("overflow-hidden"); } //关闭地图 function closeMap(){ document.getElementById('mapshowdiv').style.display = 'none'; document.getElementById('closeshowmap').style.display = 'none'; document.getElementById('fade').style.display = 'none'; $("html,body").removeClass("overflow-hidden"); } function b_afterLogin(flag){ if($(".ent-tab>li:eq(1)").hasClass("ent-active") && relation == null){ initRelation(); } } //加载关系网 function initRelation(){ if(isLogined){ $.post("/member/getRelation",{regNo:regNo,entName:entName},function(r){ if(r.flag == false){ $("#entrelation-nologin").addClass("hide"); $("#entrelation-limit,#entrelation-noauthe").removeClass("hide"); $("#entrelation-infovis").hide(); }else if(r.flag == true && (typeof(r) == "undefined" || r == null || r == "")){ $("#entrelation-infovis").hide(); $("#entrelation-findnull").removeClass("hide"); }else{ loadJS("/js/d3.v3.min.js",function(){ loadJS("/js/geometry.js",function(){ loadJS("/js/relation.js",function(){ $("#entrelation-limit").addClass("hide"); $(".entrelation").height(500); relation = new Relation(legcerNo,regNo,r.relation); relation.init(); }); }); }); } }); }else{ $("#entrelation-limit,#entrelation-nologin").removeClass("hide"); } } //服务列表 function ServiceList(){ loadJS("/js/paging.js",function(){ paging = new Paging("serviceList","/front/findServiceByEntId",{entId:entId},6,function(r){ var html = ''; for(var i=0;i"+tmp[i][0]+"" var j ="J" if (val > j || val == "D" || val == "E" || val == "F" || val == "G" ){ $("#c_hfl").next().find("small").text("收起<") $("#c_hfl").removeClass("less") } }else{ str+="
  • "+tmp[i][0]+"
  • " } }else{ str+="
  • "+tmp[i][0]+"
  • " } } str+="" $("#"+ad).html(str) }) //注册资本 $(["c_zb"]).each(function(i,ad){ var str="" $("#"+ad).html(str) }) } function less(obj){ pred=$(obj).prev() obj=$(obj).find("small") var text=obj.text() if(text=="更多>"){ obj.text("收起<") pred.removeClass("less") }else{ obj.text("更多>") pred.addClass("less") } } //推荐企业 function loadImg(n){ var str="" for(var i=0;i-1){ window.location.href="/market/detail/"+id+".html" }else{ window.location.href="/market/showservice/"+id+".html" } } //显示二维码图片 function viewBarCode(bcpath){ if(bcpath){ $('#myModal').modal({ keyboard: true }) $("#viewImgs").html("") } } function analyList(rowHtml, rowData) { var t=""; if(rowData.i_status==1){ t=template_content.replace("下架",""); }else{ t=template_content.replace("已下架",""); } return t.replace(/\$\{(.*?)\}/g, function(a, b, c) { var res = rowData[b]||""; //去掉后台服务列表中的图片 var data = res.replace(/.*<\/img>/ig,""); //过滤如形式的图片元素 res = data.replace(//ig, ""); //过滤如形式的元素 if (!res&&b=="s_images"){ res="/images/services/default.png" }else{ res = res.replace(/\n/g,""); } return res; }); } //加载更多 function loadMore(){ $.post('/searchEntSer/'+entId ,{currentPage:currentPage+1,perPage:perPage},function(data){ if(data){ var res=data["data"] if(!res || res === undefined || res.length == 0) { $("#loadMore").hide(); return; }else if(data.totalRows<=(perPage*data.currentPage)){ $("#loadMore").hide(); }else{ $("#loadMore").show(); } currentPage=data["currentPage"]; var str=""; for(var i=0;i