文件路径修改

This commit is contained in:
王思川 2021-12-08 12:45:01 +08:00
parent 9cf816ba29
commit 5588d0be86
7 changed files with 9 additions and 11 deletions

View File

@ -42,7 +42,7 @@ def id_card_recognition(**kwargs):
# 请求头
headers = {
'Authorization': 'APPCODE %s' % app_code,
'Content-Type': 'application/json; charset=UTF-8'
'Content-Type': 'application/template; charset=UTF-8'
}
# 请求体
@ -83,7 +83,7 @@ def business_license_recognition(**kwargs):
headers = {
'Authorization': 'APPCODE %s' % app_code,
'Content-Type': 'application/json; charset=UTF-8'
'Content-Type': 'application/template; charset=UTF-8'
}
body = {

View File

@ -118,7 +118,7 @@ def start_general_rating_script(cid):
report_dates = make_3_report_dates()
# 新填报记录
new_input = read_json_file(file_path('/input/static/json/input.json'))
new_input = read_json_file(file_path('/input/static/template/input.template'))
new_input['评价ID'] = new_rid
new_input['企业ID'] = cid
new_input['企业名称'] = find_user_info({"企业ID": cid})[0]['企业名称']
@ -128,7 +128,7 @@ def start_general_rating_script(cid):
new_input['财务填报'][sheets][i]['报告期'] = report_dates[i]
# 生成新评价记录
rating = read_json_file(file_path('/input/static/json/rating.json'))
rating = read_json_file(file_path('/input/static/template/rating.template'))
rating['评价ID'] = new_rid
rating['企业ID'] = cid
rating['评价项目'] = "综合信用评价"
@ -166,7 +166,7 @@ def choose_industry_script():
Returns:
res: desc
"""
data = read_json_file(file_path('/input/static/json/industry.json'))
data = read_json_file(file_path('/input/static/template/industry.template'))
return data
@ -178,5 +178,5 @@ def questionnaire_script(industry):
Returns:
data: 问卷内容
"""
data = read_json_file(file_path('/input/static/questionnaire/{}.json'.format(industry)))
data = read_json_file(file_path('/input/static/questionnaire/{}.template'.format(industry)))
return data

View File

@ -31,7 +31,7 @@ def send_email(email, code, v_type):
"resetemail": "修改邮箱"
}
headers = {"Content-Type": "application/json;charset=UTF-8"}
headers = {"Content-Type": "application/template;charset=UTF-8"}
data = {"title": "【远东资信】{}".format(types[v_type]),
"sender": 'fecribd@fecr.com.cn',
"recipients": [email],
@ -49,7 +49,7 @@ def send_feedback_email(content):
info: 发送信息
"""
recipients = ["wangsichuan@fecr.com.cn"]
headers = {"Content-Type": "application/json;charset=UTF-8"}
headers = {"Content-Type": "application/template;charset=UTF-8"}
data = {"title": '股交反馈邮件',
"sender": 'fecribd@fecr.com.cn',
"recipients": recipients,
@ -58,7 +58,6 @@ def send_feedback_email(content):
return response.text
# 格式校验
def check_mail_fmt(email):
"""
邮箱地址格式校验
@ -93,7 +92,6 @@ def check_pwd_fmt(pwd):
return result
# 用户验证相关
def check_registered(email):
"""
检查邮箱是否被注册
@ -167,7 +165,7 @@ def gen_new_user(email, pwd):
Returns:
user: 新用户信息
"""
user = read_json_file(file_path('/user/static/json/user.json'))
user = read_json_file(file_path('/user/static/template/user.template'))
user['企业ID'] = gen_new_cid()
user['邮箱'] = email
user['头像fid'] = "61a15b33e55c00003e0048e4"