Commit ee19894f by 赵宇

fix

parent dcc4fbb8
...@@ -15,7 +15,7 @@ def default_address(): ...@@ -15,7 +15,7 @@ def default_address():
# 查询出该区县的所有园区列表 # 查询出该区县的所有园区列表
try: try:
result = Induzone.query.filter_by(district=district).all() result = Induzone.query.filter_by(district=district).all()
all_jwd = [{"lng": i.lng, "lat": i.lat} for i in result] all_jwd = [{"id": i.id, "name": i.name, "lng": i.lng, "lat": i.lat} for i in result]
size = len(result) size = len(result)
result = Induzone.query.filter_by(district=district) result = Induzone.query.filter_by(district=district)
result = result.paginate(page, perpage).items result = result.paginate(page, perpage).items
...@@ -35,7 +35,7 @@ def default_address(): ...@@ -35,7 +35,7 @@ def default_address():
"charge": i.charge if i.charge else "-", # 园区负责人 "charge": i.charge if i.charge else "-", # 园区负责人
"phone": i.phone if i.phone else "-", # 园区电话 "phone": i.phone if i.phone else "-", # 园区电话
"address": i.address, # 园区地址 "address": i.address, # 园区地址
"jwd": {"lng": i.lng, "lat": i.lat}} for i in result], "all_jwd":all_jwd,"size": size} "jwd": {"lng": i.lng, "lat": i.lat}} for i in result], "all_jwd": all_jwd, "size": size}
if not result: if not result:
# 在第一条建议显示 # 在第一条建议显示
data = [{"name": "没有找到合适的园区!"}] data = [{"name": "没有找到合适的园区!"}]
......
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