Commit cc3c30e9 authored by 段英荣's avatar 段英荣

modify

parent ee24a22c
...@@ -75,8 +75,8 @@ class HostpitalPosInfo(object): ...@@ -75,8 +75,8 @@ class HostpitalPosInfo(object):
query_results = django.db.models.QuerySet(model=doctor.Hospital, query=query) query_results = django.db.models.QuerySet(model=doctor.Hospital, query=query)
for item in query_results: for item in query_results:
name = item.name name = item.name
lng = item.baidu_loc_lng lng = float(item.baidu_loc_lng)
lat = item.baidu_loc_lat lat = float(item.baidu_loc_lat)
cls.hospital_pos_dict[name] = [lng,lat] cls.hospital_pos_dict[name] = [lng,lat]
return cls.hospital_pos_dict return cls.hospital_pos_dict
......
...@@ -32,7 +32,7 @@ def auto_complete(request): ...@@ -32,7 +32,7 @@ def auto_complete(request):
if not q: if not q:
return json_http_response({'error': 0, 'data': []}) return json_http_response({'error': 0, 'data': []})
data = get_suggest_tips(q, lat, lng) data = get_suggest_tips(q, float(lat), float(lng))
result = { result = {
'error': 0, 'error': 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment