Commit 2b494819 by dong

fix

parent df6f773b
......@@ -1104,8 +1104,8 @@ def industry_enterprise():
Company.chain_master == '1' if aptitude == '链主企业' else text(''),
)
if product:
# 点击上级环节,展示本级所有企业
# if product:
# # 点击上级环节,展示本级所有企业
# product_li = get_product_li(product, inid)
# company1 = []
# for product in product_li:
......@@ -1118,11 +1118,13 @@ def industry_enterprise():
# size = len(company1)
# company1 = sorted(company1, key=lambda x: x.hots, reverse=True) # 排序
# companys = company1[(page - 1) * perpage:page * perpage] # 分页
# else:
# size = company.count()
# companys = company.order_by(Company.hots.desc()).paginate(page, perpage).items # 企业热度倒序
if product:
company = Company.query.filter(
Company.product_all.like('%{}%'.format(product))
)
else:
size = company.count()
companys = company.order_by(Company.hots.desc()).paginate(page, perpage).items # 企业热度倒序
......
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