function loadother(){ if(typeof(campusid) != "undefined" && !isNaN(campusid)) { var data_info = [{"id":"224446","map_x":"114.223654","map_y":"22.705283","pointname":"五星篮球龙岗大运店","pointaddress":"大运路","areaname":"龙岗区","areacode":"100044003007"},{"id":"222558","map_x":"114.018101","map_y":"22.550645","pointname":"印力中心校区","pointaddress":"福田区香蜜湖街道竹园社区","areaname":"福田区","areacode":"100044003004"},{"id":"222557","map_x":"114.024679","map_y":"22.557901","pointname":"福田香蜜校区","pointaddress":"福田区香蜜体育中心","areaname":"福田区","areacode":"100044003004"},{"id":"222556","map_x":"113.920534","map_y":"22.486418","pointname":"蛇口QSI校区","pointaddress":"南山区招商街道太子路8-5碧涛中心QSI","areaname":"南山区","areacode":"100044003005"},{"id":"222555","map_x":"113.922575","map_y":"22.485263","pointname":"蛇口希尔顿酒店校区","pointaddress":"南山区望海路(蛇口南海希尔顿酒店)","areaname":"南山区","areacode":"100044003005"},{"id":"222554","map_x":"113.956211","map_y":"22.52418","pointname":"深圳湾校区","pointaddress":"南山区滨海大道","areaname":"南山区","areacode":"100044003005"},{"id":"222553","map_x":"114.001984","map_y":"22.540954","pointname":"锦绣花园校区","pointaddress":"南山区深南大道","areaname":"南山区","areacode":"100044003005"},{"id":"222552","map_x":"113.956246","map_y":"22.524181","pointname":"深圳湾精英训练中心","pointaddress":"南山区深圳湾体育中心","areaname":"南山区","areacode":"100044003005"},{"id":"222551","map_x":"113.9325","map_y":"22.530312","pointname":"瑞峰精英训练中心","pointaddress":"南山区桂庙路向南瑞峰商业广场","areaname":"南山区","areacode":"100044003005"},]; //补充其他行政区分组 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(); } }