diff --git a/myCSS.css b/myCSS.css new file mode 100644 index 0000000..38d58b9 --- /dev/null +++ b/myCSS.css @@ -0,0 +1,10 @@ +.myCSS.inputNum .wf-form-input input { + text-align: right !important; + padding-right: 7px !important; +} + +.myCSS.inputOnlyButtomBorder .wf-form-input input { + border-top-style: none !important; + border-left-style: none !important; + border-right-style: none !important; +} \ No newline at end of file diff --git a/myJavaScript.js b/myJavaScript20150115.js similarity index 100% rename from myJavaScript.js rename to myJavaScript20150115.js diff --git a/获取公路服务区地址.js b/获取公路服务区地址.js new file mode 100644 index 0000000..aa1e9b4 --- /dev/null +++ b/获取公路服务区地址.js @@ -0,0 +1,24 @@ +async function getExpresswayServiceAreaAddress(location_name) { + fetch('https://restapi.amap.com/v3/geocode/geo?key=53a92850ca00d7f77aef3297effd8d59&s=rsv3&jscode=220df7c191b808547be3626cbaa9d2bf&callback=&platform=JS&logversion=2.0&appname=http%3A%2F%2F192.168.2.221%3A8088%2Fwui%2Findex.html%23%2Fmain%2Fcube%2Fsearch&csid=AE54D9C0-AC7B-469C-BB7F-F677AFB04F05&sdkversion=1.4.27&address=' + location_name) + .then(response => response.json()) + .then(data => { + if (data.info == "OK") { + let res = data.geocodes.find(e => e.province == "广东省" && e.level == "道路"); + if (res != undefined) { + return (res.district); + } else { + res = data.geocodes.find(e => e.province == "广东省"); + if (res != undefined) { + return (res.district); + } else { + return ("no matched"); + } + } + } else { + return ("no matched"); + } + }) + .catch(error => { + console.error('Error:', error); + }); +} \ No newline at end of file