Browse Source

【验证码登录】获取验证码时,添加phone字段的搜索

tanghongbin 5 years ago
parent
commit
da051850d3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Controller/UserController.py

+ 1 - 1
Controller/UserController.py

@@ -3066,7 +3066,7 @@ class loginCodeView(View):
         sign_name = request_dict.get('sign_name', None)
 
         if phone and sign_name:
-            du_qs = Device_User.objects.filter(username=phone)
+            du_qs = Device_User.objects.filter(Q(phone=phone) | Q(username=phone))
             if not du_qs.exists():
                 return response.json(104)
             else: