微信登录接入;卡片点击效果
This commit is contained in:
1 parent
51cea743be
commit
969835e4d7
20 files changed
+1558
-1352
No files matched your search
@@ -593,51 +593,55 @@ public class LoginController : MonoBehaviour
|
||||
//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);
|
||||
|
||||
Reference in new issue
Block a user