;(function(){ //将最后一个module增加一个margin-bottom /** * 存在 底部导航 * 不存在 底部导航 */ var modules = $('#u236055 div.module'); var isStyle = false; var isExitBtn = false; //是否存在底部导航 以及 类型 $.each(modules,function(index,item){ if($(item).attr('attr') === '底部导航'){ isExitBtn = true; } if($(item).attr('attr') === '顶部导航'){ $('#u236055').css('paddingTop','40px') } }); var last = null; $.each(modules,function(index,item){ //$(item).css('marginBottom','0'); //console.log($(item).attr('attr'), JSON.parse($(item).children('.m_data').val()).data.css) //存在底部导航 if(isExitBtn){ //底部导航 是否为最后一个增加 若是 则为倒数第二个module增加margin if($(item).attr('attr') !== '底部导航' || $(item).attr('attr') !== '底部导航' ){ last = $(item); } } }); if(last){ last.css('marginBottom','66px'); } })();;(function () { var listArr = {"addressList":[{"title":"\u6df1\u5733\u5e02\u6df1\u8343\u7535\u8def\u6709\u9650\u516c\u53f8","address":"\u6df1\u5733\u5e02\u5b9d\u5b89\u533a\u897f\u4e61\u8857\u9053\u5bcc\u534e\u793e\u533a\u5b9d\u8fd0\u8fbe\u7269\u6d41\u4e2d\u5fc3\u7814\u53d1\u7efc\u5408\u697c2A10 ","lng":113.891025,"lat":22.599215999999998,"province":"\u5e7f\u4e1c\u7701","city":"\u6df1\u5733\u5e02"}]}; var infor = {"zoom":16,"height":200,"styleId":"w1111"}; var editIndex = null var map = {}; var ele = $('#u257433').find('#map')[0]; if(listArr.addressList.length > 0) { editIndex = 0 initMap(); } function create_map(lat,lng) { const center = new TMap.LatLng(lat,lng); map = new TMap.Map(ele, { center, zoom: 17 }) create_marker(lat,lng); create_InfoWindow(lat,lng); map.on("click",function(evt){ create_marker(lat,lng); create_InfoWindow(lat,lng); }) } function create_marker(lat,lng) { const position = new TMap.LatLng(lat,lng); new TMap.MultiMarker({ map: map, styles: { marker: new TMap.MarkerStyle({ width: 25, height: 35, src: 'https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/markerDefault.png' }), }, geometries: [ { "id": 'marker', "styleId": 'marker', position, "properties": { "title": "marker" } }, ], }); } function create_InfoWindow(lat,lng) { const position = new TMap.LatLng(lat,lng); const str = listArr.addressList[editIndex].title new TMap.InfoWindow({ map:map, position, offset: { x: 0, y: -35 }, content: '