Merge remote-tracking branch 'origin/dev_mobile' into dev_mobile_ble

# Conflicts:
#	Assets/Scenes/Login-Mobile.unity
This commit is contained in:
lishuo committed 2021-09-13 18:28:05 +08:00
commit 939d6f1d0c
20 files changed
+1636 -1518

No files matched your search

+42 -38
View File
@@ -607,51 +607,55 @@ public class LoginController : BaseScene
//var acjson = await ConfigHelper.thirdPartApi.GetWxAccessToken(groups[1].Value);
//var infojson = await ConfigHelper.thirdPartApi.GetWxUserInfo(
// acjson.Value<string>("access_token"), acjson.Value<string>("openid"));
//string unionId = wxInfoJson.Value<string>("unionid"),
// openId = wxInfoJson.Value<string>("openid");
var r = await ConfigHelper.userApi.OnWebWxLoginCheckUnionIdByCode(groups[1].Value, groups[2].Value);
if (r.result)
{
JObject data = JObject.FromObject(r.data);
if (data.Value<string>("success") != null && data.Value<string>("success") == "False")
{
wxInfoJson = data;
wxLogin2.gameObject.SetActive(true);
Utils.DisplayImage(wxLogin2.Find("Avatar").GetComponent<RawImage>(),
wxInfoJson.Value<string>("headimgurl"));
wxLogin2.Find("NickName").GetComponent<Text>().text = wxInfoJson.Value<string>("nickname");
wxLogin3.gameObject.SetActive(true);
Utils.DisplayImage(wxLogin3.Find("Avatar").GetComponent<RawImage>(),
wxInfoJson.Value<string>("headimgurl"));
wxLogin3.Find("NickName").GetComponent<Text>().text = wxInfoJson.Value<string>("nickname");
pageNums = 5;
//this.goSign();
StartScrollPanel(2);
}
else
{
RefreshWx3(data.ToObject<UserResultModel>(), 1);
wxLogin3.gameObject.SetActive(true);
//Utils.DisplayImage(StartCoroutine,
//wxLogin3.Find("Avatar").GetComponent<RawImage>(),
//wxInfoJson.Value<string>("headimgurl"));
//wxLogin3.Find("NickName").GetComponent<Text>().text = wxInfoJson.Value<string>("nickname");
signContainer.gameObject.SetActive(false);
pageNums = 3;
//this.goSign();
StartScrollPanel(2);
}
}
else
{
Utils.showToast(gameObject, r.errMsg);
}
await goWxLoginWithCode(groups[1].Value, groups[2].Value);
}
}
}
#endif
public async Task goWxLoginWithCode(string code, string state)
{
var r = await ConfigHelper.userApi.OnWebWxLoginCheckUnionIdByCode(code,state);
if (r.result)
{
JObject data = JObject.FromObject(r.data);
if (data.Value<string>("success") != null && data.Value<string>("success") == "False")
{
wxInfoJson = data;
wxLogin2.gameObject.SetActive(true);
Utils.DisplayImage(wxLogin2.Find("Avatar").GetComponent<RawImage>(),
wxInfoJson.Value<string>("headimgurl"));
wxLogin2.Find("NickName").GetComponent<Text>().text = wxInfoJson.Value<string>("nickname");
wxLogin3.gameObject.SetActive(true);
Utils.DisplayImage(wxLogin3.Find("Avatar").GetComponent<RawImage>(),
wxInfoJson.Value<string>("headimgurl"));
wxLogin3.Find("NickName").GetComponent<Text>().text = wxInfoJson.Value<string>("nickname");
pageNums = 5;
//this.goSign();
StartScrollPanel(2);
}
else
{
RefreshWx3(data.ToObject<UserResultModel>(), 1);
wxLogin3.gameObject.SetActive(true);
//Utils.DisplayImage(StartCoroutine,
//wxLogin3.Find("Avatar").GetComponent<RawImage>(),
//wxInfoJson.Value<string>("headimgurl"));
//wxLogin3.Find("NickName").GetComponent<Text>().text = wxInfoJson.Value<string>("nickname");
signContainer.gameObject.SetActive(false);
pageNums = 3;
//this.goSign();
StartScrollPanel(2);
}
}
else
{
Utils.showToast(gameObject, r.errMsg);
}
}
private void goThirdNext()
{
this.StartScrollPanel(4);