授权登录校验
parent
3aa5f0b117
commit
241331246e
|
|
@ -63,7 +63,7 @@ namespace New_College.Controllers
|
||||||
Encoding.UTF8, "application/json"));//
|
Encoding.UTF8, "application/json"));//
|
||||||
if (userinfo != null && userinfo.code == 200 && userinfo.type == "success")
|
if (userinfo != null && userinfo.code == 200 && userinfo.type == "success")
|
||||||
{
|
{
|
||||||
var user = (await _CustomerInfoServices.Query(q => q.GZOpenId == userinfo.result.OpenId)).FirstOrDefault();
|
var user = (await _CustomerInfoServices.Query(q => q.UUID == userinfo.result.UnionId)).FirstOrDefault();//判断移动端是否已完成unionid替换
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
//没有用户则注册一个新用户
|
//没有用户则注册一个新用户
|
||||||
|
|
@ -87,7 +87,8 @@ namespace New_College.Controllers
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
user.UUID = userinfo.result.UnionId;
|
user.UUID = userinfo.result?.UnionId;
|
||||||
|
user.GZOpenId = userinfo.result?.OpenId;
|
||||||
user.ModifyTime = DateTime.UtcNow;
|
user.ModifyTime = DateTime.UtcNow;
|
||||||
if (!string.IsNullOrEmpty(userinfo.result.Mobile) && string.IsNullOrEmpty(user.Phone))
|
if (!string.IsNullOrEmpty(userinfo.result.Mobile) && string.IsNullOrEmpty(user.Phone))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue