ios快捷登录
This commit is contained in:
1 parent
a625db3ebe
commit
c12df53c18
14 files changed
+2179
-606
No files matched your search
@@ -84,6 +84,12 @@ namespace Assets.Scripts.Apis
|
||||
return new JsonResult<UserResultModel>() { result = false, data = null, errMsg = ret.errMsg };
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<JsonResult<object>> AppleCompleteInfo(string phone, string Captcha, string pwd)
|
||||
{
|
||||
return await PostAsync<JsonResult<object>>("User/AppleCompleteInfo", new { phone, Captcha, pwd });
|
||||
}
|
||||
|
||||
public async Task<JsonResult<object>> LoginV1(string phone, string pwd, string countryCode)
|
||||
{
|
||||
var param = new
|
||||
@@ -299,6 +305,12 @@ namespace Assets.Scripts.Apis
|
||||
return GetDataAfterSetCookie(r);
|
||||
}
|
||||
|
||||
public async Task<JsonResult<object>> OnAppleQuickLogin(string userId, string token)
|
||||
{
|
||||
var r = await PostAsync<JsonResult<object>>("NoAuth/v1/OnAppleQuickLogin", new { appleUserId = userId, token });
|
||||
return GetDataAfterSetCookie(r);
|
||||
}
|
||||
|
||||
public async Task<JsonResult<object>> OnFacebookLoginCheck(string userId, string token)
|
||||
{
|
||||
var r = await PostAsync<JsonResult<object>>("NoAuth/v1/OnFacebookLoginCheck", new { faceBookUserId = userId, token });
|
||||
@@ -341,5 +353,6 @@ namespace Assets.Scripts.Apis
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -571,22 +571,15 @@ public class LoginController : BaseScene
|
||||
appleUserId = userId;
|
||||
appleToken = token;
|
||||
signType = 2;
|
||||
var res = await ConfigHelper.userApi.OnAppleIdLoginCheck(userId, token);
|
||||
var res = await ConfigHelper.userApi.OnAppleQuickLogin(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);
|
||||
}
|
||||
RefreshWx3(data.ToObject<UserResultModel>(), 1);
|
||||
wxLogin3.gameObject.SetActive(true);
|
||||
signContainer.gameObject.SetActive(false);
|
||||
pageNums = 3;
|
||||
StartScrollPanel(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -16,7 +16,13 @@ public class UserInfoController : PFUIPanel
|
||||
{
|
||||
this.transform.localPosition = new Vector3(0, 0, 0);
|
||||
Button exitBtn = this.transform.Find("InfoPanel").Find("Button").GetComponent<Button>();
|
||||
|
||||
UIManager.AddEvent(transform.Find("InfoButton").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
UIManager.ShowAppleInfoModal(() =>
|
||||
{
|
||||
Load();
|
||||
});
|
||||
});
|
||||
UIManager.AddEvent(exitBtn.gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
{
|
||||
UIManager.ShowPrePanel();
|
||||
@@ -101,10 +107,11 @@ public class UserInfoController : PFUIPanel
|
||||
Debug.Log(user.CanCreateRace);
|
||||
Utils.DisplayHead(infoPanel.Find("Avatar").GetComponent<RawImage>(), user.WxHeadImg);
|
||||
|
||||
transform.Find("InfoButton").gameObject.SetActive(string.IsNullOrEmpty(user.Phone));
|
||||
infoPanel.Find("Status").Find("Country").GetComponent<RawImage>().texture
|
||||
= UIManager.Instance.loginRegOptions.GetCountryImageByName(user.Country);
|
||||
infoPanel.Find("Status").Find("Wx").gameObject.SetActive(
|
||||
!string.IsNullOrEmpty(user.Unionid));
|
||||
//infoPanel.Find("Status").Find("Wx").gameObject.SetActive(
|
||||
// !string.IsNullOrEmpty(user.Unionid));
|
||||
infoPanel.Find("IdText").GetComponent<Text>().text = $"ID:{user.Id.ToString("000000")}";
|
||||
infoPanel.Find("NameText").GetComponent<Text>().text = $"{user.Nickname}";
|
||||
infoPanel.Find("EmailText").GetComponent<Text>().text = $"{user.Phone}";
|
||||
|
||||
@@ -33,6 +33,8 @@ public class UIManager : MonoBehaviour
|
||||
this.mMainPanel = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Canvas MainCanvas
|
||||
{
|
||||
get
|
||||
@@ -232,6 +234,22 @@ public class UIManager : MonoBehaviour
|
||||
//UIManager.Show(UIManager.Instance.RaceListPanel, UIManager.Instance.MainPanel);
|
||||
}
|
||||
|
||||
//苹果完善信息
|
||||
private AppleInfoController mAppleInfoController;
|
||||
public AppleInfoController AppleInfoController
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.GetPanelInstance("AppleInfoModal", ref this.mAppleInfoController);
|
||||
}
|
||||
}
|
||||
public static void ShowAppleInfoModal(Action afterClose)
|
||||
{
|
||||
UIManager.Instance.AppleInfoController.afterClose = afterClose;
|
||||
UIManager.Show(UIManager.Instance.AppleInfoController, null, true);
|
||||
}
|
||||
|
||||
|
||||
public static void CloseConfirm3()
|
||||
{
|
||||
if (UIManager.Instance.confirm3 != null)
|
||||
|
||||
Reference in new issue
Block a user