Commit 79573227 by dong

fix20230201

parent 4b6d3fe9
......@@ -24,6 +24,9 @@ from apps.utils.encrypt_decrypt.aes_cbc import encrypt, decrypt
# 给手机发验证码
from view_choose.choose_view import get_district_name
@api_user.route("/SendMobileCode", methods=["POST"])
def send_phone_code():
'''
......@@ -274,7 +277,26 @@ def login_bypwd():
# 验证手机号与密码
try:
user = User.query.filter_by(mobile=mobile, flag=2).first()
district_name = user.district_name
district_name = user.belong_organization
if not district_name:
return jsonify(code=RET.NODATA, msg="请设置用户所属单位!")
if '晋城市' in district_name:
return "晋城市"
else:
if '沁水' in district_name:
return '沁水县'
if '高平' in district_name:
return '高平市'
if '阳城' in district_name:
return '阳城县'
if '陵川' in district_name:
return '陵川县'
if '泽州' in district_name:
return '泽州县'
if '城区' in district_name:
return '城区'
if '晋城经济技' in district_name:
return '晋城经济技术开发区'
except Exception as e:
current_app.logger.error(e)
return jsonify(code=RET.DATAERR, 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