function storeDataWithExpiry(data, expiryMinutes) {
    var item = {
        data: data,
        expiry: new Date().getTime() + (expiryMinutes * 60 * 1000)
    };
    localStorage.setItem('myDataWithExpiry', JSON.stringify(item));
}
function getDataWithExpiry() {
    var itemStr = localStorage.getItem('myDataWithExpiry');
    if (!itemStr) {
        return null;
    }
    var item = JSON.parse(itemStr);
    var now = new Date().getTime();
    if (now > item.expiry) {
        localStorage.removeItem('myDataWithExpiry');
        return null;
    }
    return item.data;
}
 
function list(data){
var html='';
data.forEach(function (item,index) {
html+=`<li><a href="mkDetail.html?dpid=${item.deptId}"><h4>${item.deptName}</h4><p><span>${item.cityName?item.cityName:''}</span><span>${item.depttype}</span></p><p>${item.address}</p></a></li>`;
})
if(data.length!=0){$("#lista").html(html);$(".notip").hide();}else{$("#lista").html('');$(".notip").show();}
}

function getDate(){
var md5Hash = $.md5('sign字符串').toUpperCase();
//console.log(md5Hash);  
$.ajax({
 url:"接口地址",
 dataType:"json",
 //data:{deptId:'00001',sign:md5Hash},
 async:true,
 type:"POST",
success:function(r){
   //storeDataWithExpiry(r, 360);
   list(r.result);
   localStorage.setItem('myDataWithExpiry', JSON.stringify(r));
},
 error:function(){
  alert('网络错误~');
}
})
}
getDate();
//数据本地化
var itemStr = localStorage.getItem('myDataWithExpiry');
var jsonData = [];  
if(itemStr){
var mydata= JSON.parse(itemStr);
    jsonData = mydata.result;
}

// 初始化渲染所有数据,jsonData是json数据
  list(jsonData);
//数据筛选
  var currentFilter = {cityName: "all",depttype: "all",mktSize:"all"};
  $(".filter-cityName li").click(function() {
    currentFilter.cityName = $(this).data("value");
    filterData();
  });
  $(".filter-depttype li").click(function() {
    currentFilter.depttype = $(this).data("value");
    filterData();
  });
  $(".filter-mktSize li").click(function() {
    currentFilter.mktSize = $(this).data("value");
    filterData();
  });
  function filterData() {
      var filteredData = jsonData.filter(function(item) {
      var levelMatch = currentFilter.cityName === "all" || item.cityName === currentFilter.cityName;
      var typeMatch = currentFilter.depttype === "all" || item.depttype === currentFilter.depttype;
      var mktMatch = true;
      if (currentFilter.mktSize !== "all") {
        switch(currentFilter.mktSize) {
          case "small":
            mktMatch = item.mktSize >= 1 && item.mktSize <= 49;
            break;
          case "medium":
            mktMatch = item.mktSize >= 50 && item.mktSize <= 99;
            break;
          case "large":
            mktMatch = item.mktSize >= 100;
            break;
        }
      }
      
      return levelMatch && typeMatch && mktMatch;
    });
    list(filteredData);
  }
   
//搜索
$("#searchBtn").on("click", function() {
    performSearch();
  });
$("#deptSearch").on("keypress", function(e) {
  if (e.which === 13) {
    performSearch();
  }
});
function performSearch() {
  var searchTerm = $("#deptSearch").val().trim().toLowerCase();
  if (searchTerm === "") {
    list(jsonData);
    return;
  }
  var filteredData = jsonData.filter(function(item) {
    return item.deptName.toLowerCase().includes(searchTerm);
  });
  list(filteredData);
}
 

/*filter: none | blur() | brightness() | contrast() | drop-shadow() | grayscale() | hue-rotate() | invert() | opacity() | saturate() | sepia()*/
.ae{filter: blur(2px);transition: .3s;}
/*明度*/
.be{filter: brightness(120%);transition: .3s;}
/*对比度*/
.ce{filter: contrast(80%);transition: .3s;}
/*阴影*/
.de{filter: drop-shadow(0 0 5px rgba(0,0,0,.6));transition: .3s;}
/*灰度*/
.ee{filter:grayscale(100%);transition: .3s;}
/*色相旋转0-360deg*/
.fe{filter: hue-rotate(45deg);transition: .3s;}
/*图形颜色反转*/
.ge{filter: invert(100%);transition: .3s;}
/*透明度,浏览器可提供硬件加速*/
.he{filter: opacity(.5);transition: .3s;}
/*饱和度*/
.ie{filter:saturate(20%);transition: .3s;}
/*转棕色复古*/
.je{filter:sepia(100%);transition: .3s;}

CSS3 filter滤镜大全

 function list(){
        $url = '接口地址';
        $sign = strtoupper(md5('0001加密字符'));
        $postData = [
           'deptId' => '0001',
           'sign' => $sign
        ];
        $options = [
            'http' => [
                'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
                'method'  => 'POST',
                'content' => http_build_query($postData)
            ]
        ];
        $context = stream_context_create($options);
        // 发送请求并获取响应
        $response = file_get_contents($url, false, $context);
        if ($response === false) {
            // 处理错误
           JsonReturn(['code'=>1,'msg'=>'接口服务网络出错!']);
        } else {
            //$json = json_encode($response);
            //JsonReturn(['code'=>0,'data'=>$json]);
            echo $response;
        }
}

文件所在文件夹建立bat可执行文件,把以下代码粘贴进去执行,分两步操作
去掉空格
@echo off&setlocal enabledelayedexpansion
for /f "delims=" %%i in ('dir /s/b *.*') do (
    set "foo=%%~nxi"
    set foo=!foo: =!
    set foo=!foo: =!
    ren "%%~fi" "!foo!"
)
exit
 
 
去掉括号
@Echo Off&SetLocal ENABLEDELAYEDEXPANSION
FOR %%a in (*) do (
    set "name=%%a"
    set "name=!name:(=!"
    set "name=!name:)=!"
    ren "%%a" "!name!"
)
exit

服务端代理配置nginx(放伪静态配置或者站点配置文件都行)
 # Web服务API 代理
  location /_AMapService/ {
    set $args "$args&jscode=你的安全密钥";
    proxy_pass https://restapi.amap.com/;
  }
前端
<script type="text/javascript">
  window._AMapSecurityConfig = {
    serviceHost: "_AMapService"
  };
</script>
  <script type="text/javascript" src="https://webapi.amap.com/maps?v=2.0&key=你的key"></script>
  <script type="text/javascript">
AMap.plugin('AMap.Weather', function() {
var weather = new AMap.Weather();
weather.getForecast('上海市', function(err, data) {
    console.log(data);
    if(data.info=='OK'){
     
    }else{
   
    }
});
});    
</script>