chenjunkai 6 жил өмнө
parent
commit
4549996fc0

+ 1 - 3
Controller/UserController.py

@@ -567,8 +567,6 @@ class v2authCodeView(TemplateView):
         # 生成随机6位数
         # 生成随机6位数
         identifyingCode = RandomStr(6, True)
         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)
         send_data = TemplateService.email_message(type='register_code', language=response.lang)
         ses = SesClassObject()
         ses = SesClassObject()
         # 发送邮件
         # 发送邮件
@@ -580,7 +578,7 @@ class v2authCodeView(TemplateView):
         )
         )
         if send_res is not True:
         if send_res is not True:
             return response.json(44)
             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(10,'error')
         return response.json(0)
         return response.json(0)
         # return response.json(0, {'identifyingCode': identifyingCode})
         # return response.json(0, {'identifyingCode': identifyingCode})