diff --git a/public/static/manager/js/get_addredss.js b/public/static/manager/js/get_addredss.js new file mode 100644 index 0000000..5ccb104 --- /dev/null +++ b/public/static/manager/js/get_addredss.js @@ -0,0 +1,32 @@ +// 经纬度逆解析成地址 +//lat = 30.65805; +//lng = 104.136153; +function getAddress(lat,lng,obj){ + $.ajax({ + type: 'get', + url: 'http://apis.map.qq.com/ws/geocoder/v1', + dataType: 'jsonp', + data: { + key: "XJXBZ-7EBCD-2MB45-HB73N-R362T-WRFJR",//开发密钥 + location: lat + "," + lng,//位置坐标 + get_poi: "0",//是否返回周边POI列表:1.返回;0不返回(默认) + coord_type: "1",//输入的locations的坐标类型,1 GPS坐标 + parameter: { "scene_type": "tohome", "poi_num": 20 },//附加控制功能 + output: "jsonp" + }, + success: function (data, textStatus) { + if (data.status == 0) { + var address = data.result.formatted_addresses.recommend; + //$("#address").html(address); + // console.log(data.result.address) + // console.log(address) + $(obj).text(data.result.address + address); + } else { + alert("位置获取错误,请联系管理员!") + } + }, + error: function () { + alert("位置获取错误,请联系管理员!") + } + }); +} diff --git a/view/manager/business/business_deduction_list.html b/view/manager/business/business_deduction_list.html index 664ff37..1bbe9bb 100644 --- a/view/manager/business/business_deduction_list.html +++ b/view/manager/business/business_deduction_list.html @@ -71,8 +71,14 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/view/manager/consumer/info.html b/view/manager/consumer/info.html index dcdfea8..957a3a5 100644 --- a/view/manager/consumer/info.html +++ b/view/manager/consumer/info.html @@ -136,39 +136,4 @@ - \ No newline at end of file + \ No newline at end of file