function loadother(){ if(typeof(campusid) != "undefined" && !isNaN(campusid)) { var data_info = [{"id":"323501","map_x":"114.352872","map_y":"30.59859","pointname":"童程童美徐东联络点","pointaddress":"和平街道徐东万利广场","areaname":"江岸区","areacode":"100042001002"},{"id":"323500","map_x":"114.303677","map_y":"30.596455","pointname":"童程童美范湖万达广场(联络点)","pointaddress":"中山大道长青广场","areaname":"江岸区","areacode":"100042001002"},{"id":"323499","map_x":"114.303677","map_y":"30.596455","pointname":"童程童美大智路联络点","pointaddress":"中山大道长青广场","areaname":"江岸区","areacode":"100042001002"},{"id":"323498","map_x":"114.248686","map_y":"30.647068","pointname":"童程童美常青联络点","pointaddress":"常青花园汇和城","areaname":"江岸区","areacode":"100042001002"},{"id":"323497","map_x":"114.279359","map_y":"30.585732","pointname":"童程童美武展联络点","pointaddress":"解放大道696号武汉国际会展","areaname":"江岸区","areacode":"100042001002"},{"id":"323496","map_x":"114.336851","map_y":"30.507643","pointname":"童程童美南湖联络点","pointaddress":"文治街维佳点点大厦","areaname":"江岸区","areacode":"100042001002"},{"id":"323495","map_x":"114.211344","map_y":"30.557518","pointname":"童程童美汉阳人信汇校(联络点)","pointaddress":"龙阳大道人信汇","areaname":"江岸区","areacode":"100042001002"},{"id":"323494","map_x":"114.417545","map_y":"30.485633","pointname":"童程童美关山联络点","pointaddress":"关山大道473号光谷新发展国际","areaname":"江岸区","areacode":"100042001002"},]; //补充其他行政区分组 if(data_info.length>10){ var areaGroupArr=new Array(); var defaultCode=''; for(var i=0;i< data_info.length;i++){ if(data_info[i].id==campusid){ defaultCode=data_info[i].areacode; } var _item=areaGroupArr.find(it=>it.areacode==data_info[i].areacode); if(_item){ _item.count++; }else{ areaGroupArr.push({areacode:data_info[i].areacode,areaname:data_info[i].areaname,count:1,fid:data_info[i].id}); } } $('#areaul li:gt(0)').remove(); for(var i=0;i< areaGroupArr.length;i++){ $('#areaul').append(`
  • ${areaGroupArr[i].areaname}(${areaGroupArr[i].count})
  • `); } } //2023-6-7 简化之前逻辑,对网点列表重新构建数据 var _uls=$('.school-list-container ul'); for(var i=0;i< _uls.length;i++){ var _ul=$(_uls[i]); var _id=_ul.attr('id'); var _code=''; if(/\d+/.test(_id)){ _code=/\d+/.exec(_id)[0]; } _ul.empty(); var _index=0; var visible=_ul.is(':visible'); for(var j=0;j< data_info.length;j++){ if(_code&&data_info[j].areacode!=_code){ continue; } _index++; var _li=`
  • ${_index}${data_info[j].id==campusid?'':''}
    ${data_info[j].pointname} ${data_info[j].pointaddress}
  • `; _ul.append(_li); if(visible){ if(locationPoint && data_info[j].id==campusid){ var overlay = new ComplexCustomOverlay(new BMap.Point(locationPoint.lng, locationPoint.lat), _index, data_info[j].pointname, data_info[j].pointaddress, data_info[j].id); map.addOverlay(overlay); map.centerAndZoom(new BMap.Point(locationPoint.lng, locationPoint.lat), 15); }else{ var overlay = new ComplexCustomOverlay(new BMap.Point(data_info[j].map_x, data_info[j].map_y), _index, data_info[j].pointname, data_info[j].pointaddress, data_info[j].id); map.addOverlay(overlay); } } } if(visible){ var _activeTop=_ul.find('li.active').offset().top; var _parentTop=_ul.offset().top; _ul.scrollTop(_activeTop-_parentTop-_ul.find('li.active').outerHeight()); } } resetJybTabLine(); } }