|
@@ -567,8 +567,6 @@ class v2authCodeView(TemplateView):
|
|
|
# 生成随机6位数
|
|
|
identifyingCode = RandomStr(6, True)
|
|
|
# 设置随机数缓存生命周期
|
|
|
- # if reds.set_data(key=email + '_identifyingCode', val=identifyingCode, expire=AuthCode_Expire) is not True:
|
|
|
- # return response.json(10, '生成缓存系统错误')
|
|
|
send_data = TemplateService.email_message(type='register_code', language=response.lang)
|
|
|
ses = SesClassObject()
|
|
|
# 发送邮件
|
|
@@ -580,7 +578,7 @@ class v2authCodeView(TemplateView):
|
|
|
)
|
|
|
if send_res is not True:
|
|
|
return response.json(44)
|
|
|
- if reds.set_data(key=email + '_registerCode', val=identifyingCode, expire=AuthCode_Expire) is not True:
|
|
|
+ if reds.set_data(key=email + '_identifyingCode', val=identifyingCode, expire=600) is not True:
|
|
|
return response.json(10,'error')
|
|
|
return response.json(0)
|
|
|
# return response.json(0, {'identifyingCode': identifyingCode})
|