google 登录暂存
This commit is contained in:
1 parent
45b3ee5bbc
commit
58a8233697
21 files changed
+355
-102
No files matched your search
@@ -501,6 +501,37 @@ public class LoginController : BaseScene
|
||||
transform.Find("Panel").Find("Version").GetComponent<Text>().text = $"V{App.AppVersion}";
|
||||
#endif
|
||||
}
|
||||
|
||||
private string ggUserId = "";
|
||||
private string ggToken = "";
|
||||
public async void OnGoogleIdLoginCheck(string userId, string token)
|
||||
{
|
||||
ggUserId = userId;
|
||||
ggToken = token;
|
||||
signType = 4;
|
||||
var res = await ConfigHelper.userApi.OnGoogleIdLoginCheck(userId, token);
|
||||
if (res.result) //判断是否成功登录
|
||||
{
|
||||
var data = JObject.FromObject(res.data);
|
||||
if (data.ContainsKey("success") && data.Value<string>("success") == "False")
|
||||
{
|
||||
goSign();
|
||||
}
|
||||
else
|
||||
{
|
||||
RefreshWx3(data.ToObject<UserResultModel>(), 1);
|
||||
wxLogin3.gameObject.SetActive(true);
|
||||
signContainer.gameObject.SetActive(false);
|
||||
pageNums = 3;
|
||||
StartScrollPanel(2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.showToast(null, res.errMsg);
|
||||
}
|
||||
}
|
||||
|
||||
private string fbUserId = "";
|
||||
private string fbToken = "";
|
||||
|
||||
@@ -909,10 +940,14 @@ public class LoginController : BaseScene
|
||||
{
|
||||
r = await ConfigHelper.userApi.OnAppleIdLogin(appleUserId, appleToken, Email.text, Password.text, Captcha.text);
|
||||
}
|
||||
else
|
||||
else if (signType == 3)
|
||||
{
|
||||
r = await ConfigHelper.userApi.OnFacebookLogin(fbUserId, fbToken, Email.text, Password.text, Captcha.text);
|
||||
}
|
||||
else if (signType == 4)
|
||||
{
|
||||
r = await ConfigHelper.userApi.OnGoogleIdLogin(ggUserId, ggToken, Email.text, Password.text, Captcha.text);
|
||||
}
|
||||
if (r != null && r.result)
|
||||
{
|
||||
var u = JObject.FromObject(r.data).ToObject<UserResultModel>();
|
||||
@@ -942,6 +977,10 @@ public class LoginController : BaseScene
|
||||
{
|
||||
r = await ConfigHelper.userApi.OnFacebookLogin(fbUserId, fbToken, Email.text, "", Captcha.text);
|
||||
}
|
||||
else if (signType == 4)
|
||||
{
|
||||
r = await ConfigHelper.userApi.OnGoogleIdLogin(ggUserId, ggToken, Email.text, "", Captcha.text);
|
||||
}
|
||||
else
|
||||
{
|
||||
r = await ConfigHelper.userApi.OnWebWxLogin(Email.text,
|
||||
|
||||
Reference in new issue
Block a user