Commit 32fd0bf3 by 赵宇

fix

parent fa87506f
...@@ -15,16 +15,16 @@ def default_address(): ...@@ -15,16 +15,16 @@ def default_address():
# 查询出该区县的所有园区列表 # 查询出该区县的所有园区列表
try: try:
if district=="晋城市": if district=="晋城市":
result = Induzone.query.filter_by(upper_district=district).all() result = Induzone.query.filter_by(upper_district=district, cate='产业园区').all()
all_jwd = [{"id": i.id, "name": i.name, "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(upper_district=district) result = Induzone.query.filter_by(upper_district=district, cate='产业园区')
result = result.paginate(page, perpage).items result = result.paginate(page, perpage).items
else: else:
result = Induzone.query.filter_by(district=district).all() result = Induzone.query.filter_by(district=district, cate='产业园区').all()
all_jwd = [{"id": i.id, "name": i.name, "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, cate='产业园区')
result = result.paginate(page, perpage).items result = result.paginate(page, perpage).items
if not result: if not result:
# 在第一条建议显示 # 在第一条建议显示
......
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