Commit 9bb85e17 by dong

fix20220519

parent 9809f8fd
......@@ -184,25 +184,6 @@ def search():
# 搜索框
if company:
args_query["company_name"] = company
# # 添加搜索历史
# try:
# user = User.query.get(user_id)
# b = []
# if user.searchlist:
# for j in user.searchlist:
# b.append(j.history)
# if company in b:
# user.searchlist.remove(user.searchlist[b.index(company)])
# if len(b) > 5:
# user.searchlist.remove(user.searchlist[0])
# search = SearchList(history=company)
# db.session.add(search)
# user.searchlist.append(search)
# db.session.commit()
# except Exception as e:
# db.session.rollback()
# current_app.logger.error(e)
# return jsonify(code=RET.DBERR, msg="数据库错误")
if f_name:
args_term['f_name'] = f_name
......
......@@ -719,12 +719,17 @@ def enterprise_detail():
# 供应链地图
supplier = EnterpriseSupplier.query.filter_by(company_id=id).all()
if enterprise:
province = enterprise.province if enterprise.province else ""
city = enterprise.city if enterprise.city else ""
district = enterprise.district if enterprise.district else ""
data = {"select1_info": {"id": enterprise.id,
"name": enterprise.company_name, # 企业名
"telephone": enterprise.telephone if enterprise.telephone else "", # 电话
"web_site": enterprise.web_site if enterprise.web_site else "", # 网址
"email": enterprise.email if enterprise.email else "", # 邮箱
"address": enterprise.address if enterprise.address else "", # 地址
# "address": enterprise.address if enterprise.address else "", # 地址
"location": province + city + district,
"jwd": {"lng": enterprise.lng if enterprise.lng else "", # 经度
"lat": enterprise.lat if enterprise.lat else ""}, # 维度
"info": enterprise.company_info if enterprise.company_info else "", # 企业信息
......
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