add message
This commit is contained in:
parent
475b634a4b
commit
d670c9fd69
|
@ -120,6 +120,8 @@ def register_step_one(request):
|
|||
phone=phone, code=code, category=category).first()
|
||||
if verify_code and verify_code.is_in_progress():
|
||||
profile = Userprofile.objects.filter(user__username=phone).first()
|
||||
if profile.status == 1:
|
||||
return JsonResponse({'status': 'error', 'message': '账号已激活,不需要重复激活'})
|
||||
return JsonResponse({'status': 'success', 'message': {'id': profile.user_id, 'phone': phone, 'name': profile.name, 'organization': profile.organization.name}})
|
||||
else:
|
||||
return JsonResponse({'status': 'error', 'message': '验证码超时,请重发'})
|
||||
|
|
Loading…
Reference in New Issue