Explorar o código

解决苹果绑定接口异常1

tanghongbin %!s(int64=4) %!d(string=hai) anos
pai
achega
cfd00c0119
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Controller/UserController.py

+ 1 - 1
Controller/UserController.py

@@ -2902,7 +2902,7 @@ class Image_Code_RegisterView(TemplateView):
         # redis里面的验证码
         redis_image_code = redisObj.get_data(key=image_code_key)
         # 验证用户输入的验证码和redis中的验证码
-        if valid_code.lower() != redis_image_code.lower():
+        if redis_image_code is False or valid_code.lower() != redis_image_code.lower():
             return response.json(121)
         # 删除redis中的图片验证码,防止用户使用同一个图片验证码验证多次
         redisObj.del_data(key=image_code_key)