|
@@ -3390,7 +3390,8 @@ class SingleLoginView(TemplateView):
|
|
|
if data_valid.email_validate(email) is False:
|
|
|
return response.json(107)
|
|
|
reds = RedisObject()
|
|
|
- identifying_code = reds.get_data(key=email + '_SingleLogin')
|
|
|
+ key = email + '_SingleLogin'
|
|
|
+ identifying_code = reds.get_data(key=key)
|
|
|
# 是否以获取邮箱验证码
|
|
|
if identifying_code:
|
|
|
return response.json(89)
|
|
@@ -3411,7 +3412,7 @@ class SingleLoginView(TemplateView):
|
|
|
)
|
|
|
if send_res is not True:
|
|
|
return response.json(44)
|
|
|
- if reds.set_data(key=email + '_SingleLogin', val=identifying_code, expire=600) is not True:
|
|
|
+ if reds.set_data(key=key, val=identifying_code, expire=600) is not True:
|
|
|
return response.json(10, 'error')
|
|
|
return response.json(0)
|
|
|
|