Commit 015d6e33 by dong

fix20221208

parent 735c45a6
...@@ -380,7 +380,7 @@ def industry_policy(): ...@@ -380,7 +380,7 @@ def industry_policy():
if industry_level == 1: if industry_level == 1:
if policy_level == 1: # 国家级 if policy_level == 1: # 国家级
indu_policy = InduPolicy.query.filter( indu_policy = InduPolicy.query.filter(
InduPolicy.navigator.like("%{}%".format(name)), InduPolicy.navigat.like("%{}%".format(name)),
InduPolicy.level == "国家级", InduPolicy.level == "国家级",
InduPolicy.org == policy_type if policy_type == '国务院' else text(''), InduPolicy.org == policy_type if policy_type == '国务院' else text(''),
InduPolicy.year == policy_year if policy_year else text(''), InduPolicy.year == policy_year if policy_year else text(''),
...@@ -391,7 +391,7 @@ def industry_policy(): ...@@ -391,7 +391,7 @@ def industry_policy():
indu_policy = indu_policy.order_by(InduPolicy.pubdate.desc()).paginate(page, perpage).items indu_policy = indu_policy.order_by(InduPolicy.pubdate.desc()).paginate(page, perpage).items
elif policy_level == 2: # 省级 elif policy_level == 2: # 省级
indu_policy = InduPolicy.query.filter( indu_policy = InduPolicy.query.filter(
InduPolicy.navigator.like("%{}%".format(name)), InduPolicy.navigat.like("%{}%".format(name)),
InduPolicy.level == "省级", InduPolicy.level == "省级",
InduPolicy.org == policy_type if policy_type == '国务院' else text(''), InduPolicy.org == policy_type if policy_type == '国务院' else text(''),
InduPolicy.year == policy_year if policy_year else text(''), InduPolicy.year == policy_year if policy_year else text(''),
...@@ -401,7 +401,7 @@ def industry_policy(): ...@@ -401,7 +401,7 @@ def industry_policy():
indu_policy = indu_policy.order_by(InduPolicy.pubdate.desc()).paginate(page, perpage).items indu_policy = indu_policy.order_by(InduPolicy.pubdate.desc()).paginate(page, perpage).items
elif policy_level == 3: # 市级 elif policy_level == 3: # 市级
indu_policy = InduPolicy.query.filter( indu_policy = InduPolicy.query.filter(
InduPolicy.navigator.like("%{}%".format(name)), InduPolicy.navigat.like("%{}%".format(name)),
InduPolicy.level == "市级", InduPolicy.level == "市级",
InduPolicy.org == policy_type if policy_type == '国务院' else text(''), InduPolicy.org == policy_type if policy_type == '国务院' else text(''),
InduPolicy.year == policy_year if policy_year else text(''), InduPolicy.year == policy_year if policy_year else text(''),
...@@ -411,7 +411,7 @@ def industry_policy(): ...@@ -411,7 +411,7 @@ def industry_policy():
indu_policy = indu_policy.order_by(InduPolicy.pubdate.desc()).paginate(page, perpage).items indu_policy = indu_policy.order_by(InduPolicy.pubdate.desc()).paginate(page, perpage).items
elif policy_level == 4: # 区县 elif policy_level == 4: # 区县
indu_policy = InduPolicy.query.filter( indu_policy = InduPolicy.query.filter(
InduPolicy.navigator.like("%{}%".format(name)), InduPolicy.navigat.like("%{}%".format(name)),
InduPolicy.level == "区县", InduPolicy.level == "区县",
InduPolicy.org == policy_type if policy_type == '国务院' else text(''), InduPolicy.org == policy_type if policy_type == '国务院' else text(''),
InduPolicy.year == policy_year if policy_year else text(''), InduPolicy.year == policy_year if policy_year else text(''),
...@@ -421,7 +421,7 @@ def industry_policy(): ...@@ -421,7 +421,7 @@ def industry_policy():
indu_policy = indu_policy.order_by(InduPolicy.pubdate.desc()).paginate(page, perpage).items indu_policy = indu_policy.order_by(InduPolicy.pubdate.desc()).paginate(page, perpage).items
elif policy_level == 5: # 开发区 elif policy_level == 5: # 开发区
indu_policy = InduPolicy.query.filter( indu_policy = InduPolicy.query.filter(
InduPolicy.navigator.like("%{}%".format(name)), InduPolicy.navigat.like("%{}%".format(name)),
InduPolicy.level == "开发区", InduPolicy.level == "开发区",
InduPolicy.org == policy_type if policy_type == '国务院' else text(''), InduPolicy.org == policy_type if policy_type == '国务院' else text(''),
InduPolicy.year == policy_year if policy_year else text(''), InduPolicy.year == policy_year if policy_year else text(''),
...@@ -431,7 +431,7 @@ def industry_policy(): ...@@ -431,7 +431,7 @@ def industry_policy():
indu_policy = indu_policy.order_by(InduPolicy.pubdate.desc()).paginate(page, perpage).items indu_policy = indu_policy.order_by(InduPolicy.pubdate.desc()).paginate(page, perpage).items
else: else:
indu_policy = InduPolicy.query.filter( indu_policy = InduPolicy.query.filter(
InduPolicy.navigator.like("%{}%".format(name)), InduPolicy.navigat.like("%{}%".format(name)),
# InduPolicy.level == "国家级", # InduPolicy.level == "国家级",
InduPolicy.org == policy_type if policy_type == '国务院' else text(''), InduPolicy.org == policy_type if policy_type == '国务院' else text(''),
InduPolicy.year == policy_year if policy_year else text(''), InduPolicy.year == policy_year if policy_year else text(''),
...@@ -494,7 +494,7 @@ def industry_policy(): ...@@ -494,7 +494,7 @@ def industry_policy():
indu_policy = indu_policy.order_by(InduPolicy.pubdate.desc()).paginate(page, perpage).items indu_policy = indu_policy.order_by(InduPolicy.pubdate.desc()).paginate(page, perpage).items
else: else:
indu_policy = InduPolicy.query.filter( indu_policy = InduPolicy.query.filter(
InduPolicy.navigator.like("%{}%".format(name)), InduPolicy.navigat.like("%{}%".format(name)),
# InduPolicy.level == "国家级", # InduPolicy.level == "国家级",
InduPolicy.org == policy_type if policy_type == '国务院' else text(''), InduPolicy.org == policy_type if policy_type == '国务院' else text(''),
InduPolicy.year == policy_year if policy_year else text(''), InduPolicy.year == policy_year if policy_year else text(''),
......
...@@ -33,7 +33,7 @@ def send_phone_code(): ...@@ -33,7 +33,7 @@ def send_phone_code():
# 获取请求参数,转化字典 # 获取请求参数,转化字典
req_dict = request.get_json() req_dict = request.get_json()
mobile = req_dict.get('mobile') # 手机号 mobile = req_dict.get('mobile') # 手机号
sms_type = req_dict.get('sms_type') # 验证码类型 1是登录验证码,2是绑定手机号验证码 sms_type = req_dict.get('sms_type') # 验证码类型 验1证码登录,2手机号码绑定,3密码重置验证码
# 校验参数完整性 # 校验参数完整性
if not all([mobile]): if not all([mobile]):
return jsonify(code=RET.PARAMERR, msg="参数不完整") return jsonify(code=RET.PARAMERR, msg="参数不完整")
......
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