收藏问题;苹果登录无法快速登录问题
This commit is contained in:
parent
4b3dad0b84
commit
5c2c22b675
@ -189,40 +189,12 @@ namespace Assets.Scripts.Apis
|
|||||||
public async Task<JsonResult<object>> OnWebWxLoginCheckUnionIdByCode(string code,string state)
|
public async Task<JsonResult<object>> OnWebWxLoginCheckUnionIdByCode(string code,string state)
|
||||||
{
|
{
|
||||||
var r = await GetAsync<JsonResult<object>>($"NoAuth/v1/OnWebWxLogin?code={code}&state={state}");
|
var r = await GetAsync<JsonResult<object>>($"NoAuth/v1/OnWebWxLogin?code={code}&state={state}");
|
||||||
if (r.result)
|
return GetDataAfterSetCookie(r);
|
||||||
{
|
|
||||||
var data = JObject.FromObject(r.data);
|
|
||||||
if (data.Value<string>("success") != null && data.Value<string>("success") == "False")
|
|
||||||
{
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var user = data.ToObject<UserResultModel>();
|
|
||||||
user.cookie = cookies[0].Value;
|
|
||||||
r.data = user;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return r;
|
|
||||||
}
|
}
|
||||||
public async Task<JsonResult<object>> OnWebWxLoginCheckUnionId(string unionId, string openId)
|
public async Task<JsonResult<object>> OnWebWxLoginCheckUnionId(string unionId, string openId)
|
||||||
{
|
{
|
||||||
var r = await PostAsync<JsonResult<object>>("NoAuth/OnWebWxLoginCheckUnionId", new { unionId, openId });
|
var r = await PostAsync<JsonResult<object>>("NoAuth/OnWebWxLoginCheckUnionId", new { unionId, openId });
|
||||||
if (r.result)
|
return GetDataAfterSetCookie(r);
|
||||||
{
|
|
||||||
var data = JObject.FromObject(r.data);
|
|
||||||
if (data.Value<string>("success") != null && data.Value<string>("success") == "False")
|
|
||||||
{
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var user = data.ToObject<UserResultModel>();
|
|
||||||
user.cookie = cookies[0].Value;
|
|
||||||
r.data = user;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return r;
|
|
||||||
}
|
}
|
||||||
public async Task<JsonResult<object>> OnWebWxLogin(string Phone, string Captcha,
|
public async Task<JsonResult<object>> OnWebWxLogin(string Phone, string Captcha,
|
||||||
string Password, string UnionId, string WxWebOpenId)
|
string Password, string UnionId, string WxWebOpenId)
|
||||||
@ -315,14 +287,34 @@ namespace Assets.Scripts.Apis
|
|||||||
return await PostAsync<JsonResult<JObject>>("NoAuth/v1/ResetPassword", new {phone,captcha,newPwd });
|
return await PostAsync<JsonResult<JObject>>("NoAuth/v1/ResetPassword", new {phone,captcha,newPwd });
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<JsonResult<JObject>> OnAppleIdLoginCheck(string userId,string token)
|
public async Task<JsonResult<object>> OnAppleIdLoginCheck(string userId,string token)
|
||||||
{
|
{
|
||||||
return await PostAsync<JsonResult<JObject>>("NoAuth/v1/OnAppleIdLoginCheck", new { appleUserId = userId,token });
|
var r = await PostAsync<JsonResult<object>>("NoAuth/v1/OnAppleIdLoginCheck", new { appleUserId = userId, token });
|
||||||
|
return GetDataAfterSetCookie(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<JsonResult<object>> OnAppleIdLogin(string appleUserId, string token, string phone, string pwd, string Captcha)
|
public async Task<JsonResult<object>> OnAppleIdLogin(string appleUserId, string token, string phone, string pwd, string Captcha)
|
||||||
{
|
{
|
||||||
return await PostAsync<JsonResult<object>>("NoAuth/v1/OnAppleIdLogin", new { appleUserId, token, phone, pwd, Captcha });
|
var r = await PostAsync<JsonResult<object>>("NoAuth/v1/OnAppleIdLogin", new { appleUserId, token, phone, pwd, Captcha });
|
||||||
|
return GetDataAfterSetCookie(r);
|
||||||
|
}
|
||||||
|
private JsonResult<object> GetDataAfterSetCookie(JsonResult<object> r)
|
||||||
|
{
|
||||||
|
if (r.result)
|
||||||
|
{
|
||||||
|
var data = JObject.FromObject(r.data);
|
||||||
|
if (data.Value<string>("success") != null && data.Value<string>("success") == "False")
|
||||||
|
{
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var user = data.ToObject<UserResultModel>();
|
||||||
|
user.cookie = cookies[0].Value;
|
||||||
|
r.data = user;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -518,9 +518,8 @@ public class LoginController : BaseScene
|
|||||||
var res = await ConfigHelper.userApi.OnAppleIdLoginCheck(userId, token);
|
var res = await ConfigHelper.userApi.OnAppleIdLoginCheck(userId, token);
|
||||||
if (res.result) //判断是否成功登录
|
if (res.result) //判断是否成功登录
|
||||||
{
|
{
|
||||||
var data = res.data;
|
var data = JObject.FromObject(res.data);
|
||||||
|
if (data.ContainsKey("success") && data.Value<string>("success") == "False")
|
||||||
if (res.data.ContainsKey("success") && data.Value<string>("success") == "False")
|
|
||||||
{
|
{
|
||||||
goSign();
|
goSign();
|
||||||
}
|
}
|
||||||
@ -536,7 +535,7 @@ public class LoginController : BaseScene
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Utils.showToast(null, res.errMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -452,7 +452,7 @@ public class MapListController : PFUIPanel
|
|||||||
{
|
{
|
||||||
isMine = true;
|
isMine = true;
|
||||||
}
|
}
|
||||||
else if (App.CurrentRouteType == "My Collection")
|
else if (App.CurrentRouteType == "My Collection" || topContainer.Find("FavContainer/Gou").gameObject.activeInHierarchy)
|
||||||
{
|
{
|
||||||
isFav = true;
|
isFav = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user