|
@@ -117,11 +117,11 @@ def login_user_v3(request):
|
|
|
# raise ce.TipException(u"非法openid!")
|
|
|
|
|
|
user = None
|
|
|
- if openid:
|
|
|
- user = cm.UserInfo.objects.filter(openid=openid).order_by("-id").first()
|
|
|
+ if unionid:
|
|
|
+ user = cm.UserInfo.objects.filter(unionid=unionid).order_by("-id").first()
|
|
|
else:
|
|
|
- if unionid or phone:
|
|
|
- user = cm.UserInfo.objects.filter(Q(phone=phone)|Q(unionid=unionid)).order_by("-id").first()
|
|
|
+ if openid or phone:
|
|
|
+ user = cm.UserInfo.objects.filter(Q(phone=phone)|Q(openid=openid)).order_by("-id").first()
|
|
|
|
|
|
if not user:
|
|
|
#新用户
|
|
@@ -185,16 +185,16 @@ def get_wxauth_info_v3(request):
|
|
|
phcode = qdata.get("phcode")
|
|
|
|
|
|
user = None
|
|
|
- if openid:
|
|
|
- user = cm.UserInfo.objects.filter(openid=openid).values().first()
|
|
|
+ if unionid:
|
|
|
+ user = cm.UserInfo.objects.filter(unionid=unionid).values().first()
|
|
|
else:
|
|
|
if phone:
|
|
|
orgcode = ccc.cache.get(phone)
|
|
|
if not phcode == orgcode and not phone=="13883187629":
|
|
|
raise ce.TipException(u"验证码不正确!")
|
|
|
user = cm.UserInfo.objects.filter(phone=phone).values().first()
|
|
|
- if unionid:
|
|
|
- user = cm.UserInfo.objects.filter(unionid=unionid).values().first()
|
|
|
+ if openid:
|
|
|
+ user = cm.UserInfo.objects.filter(openid=openid).values().first()
|
|
|
if not user:
|
|
|
return {}
|
|
|
cur_match_id = ccc.get_signup_match().id
|