function loadother(){ if(typeof(campusid) != "undefined" && !isNaN(campusid)) { var data_info = [{"id":"100940","map_x":"123.423267","map_y":"41.830985","pointname":"中央学府分校","pointaddress":"宁山路嘉陵江街70号","areaname":"皇姑区","areacode":"100021001005"},{"id":"100938","map_x":"123.405174","map_y":"41.788525","pointname":"和平旗舰校","pointaddress":"南京南街102号(大润发超市南行300米)","areaname":"和平区","areacode":"100021001002"},{"id":"100937","map_x":"123.404088","map_y":"41.750357","pointname":"长白旗舰校","pointaddress":"长白三街177号(南昌中学操场东侧)","areaname":"和平区","areacode":"100021001002"},{"id":"100935","map_x":"123.473903","map_y":"41.821424","pointname":"大东吉祥分校","pointaddress":"吉祥家乐福4楼新东方泡泡少儿英语 大北关街48 号(家乐福和米旗中间的胡同进来佐客超市对面上4楼)","areaname":"大东区","areacode":"100021001004"},{"id":"100934","map_x":"123.444572","map_y":"41.799569","pointname":"大西路分校","pointaddress":"大西路316号(房地产大厦北侧)","areaname":"沈河区","areacode":"100021001003"},{"id":"100933","map_x":"123.372369","map_y":"41.793598","pointname":"铁西旗舰校","pointaddress":"兴华南街47-1号1门(苏宁电器南)","areaname":"铁西区","areacode":"100021001006"},{"id":"100932","map_x":"123.524497","map_y":"41.94153","pointname":"保工旗舰校","pointaddress":"保工南街30号(原陈记饺子馆)","areaname":"沈北新区","areacode":"100021001001"},{"id":"100931","map_x":"123.423002","map_y":"41.873832","pointname":"明华综合分校","pointaddress":"黄河北大街80号(乐购麦当劳)","areaname":"于洪区","areacode":"100021001014"},{"id":"100930","map_x":"123.31597","map_y":"41.800263","pointname":"于洪校区","pointaddress":"于洪广场新玛特南行100米","areaname":"于洪区","areacode":"100021001014"},{"id":"19730","map_x":"123.484008","map_y":"41.751437","pointname":"浑南朗云分校","pointaddress":"朗云街5-552号5-6门(浑南第一小学对面)","areaname":"浑南区","areacode":"100021001015"},]; //补充其他行政区分组 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(); } }