暂存
This commit is contained in:
1 parent
038720e7bd
commit
c97bd50f3f
32 files changed
+9899
-3719
No files matched your search
@@ -94,9 +94,12 @@ public class LoginController : MonoBehaviour
|
||||
/*退出按钮*/
|
||||
//其他
|
||||
[SerializeField] RawImage loading;
|
||||
Transform toolContainer;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
UIManager.Instance.ModalsPanel = this.transform.Find("ModalPanel").GetComponent<PFUIPanel>();
|
||||
var userInfosJson = PlayerPrefs.GetString("UserInfos");
|
||||
userInfos = JsonConvert.DeserializeObject<List<QUserInfo>>(userInfosJson);
|
||||
if (userInfos == null) userInfos = new List<QUserInfo>();
|
||||
@@ -148,13 +151,13 @@ public class LoginController : MonoBehaviour
|
||||
signPage2.Find("previous").GetComponent<Button>().onClick.AddListener(goRegPrev);
|
||||
signPage2.Find("sign").GetComponent<Button>().onClick.AddListener(goRegEnd);
|
||||
//注册2 字段
|
||||
regOptions = new LoginRegOptions();
|
||||
var years = signPage2.Find("Year").GetComponent<Dropdown>();
|
||||
var months = signPage2.Find("Month").GetComponent<Dropdown>();
|
||||
var days = signPage2.Find("Day").GetComponent<Dropdown>();
|
||||
var genders = signPage2.Find("Gender").GetComponent<Dropdown>();
|
||||
var countrys = signPage2.Find("Country").GetComponent<Dropdown>();
|
||||
var units = signPage2.Find("Unit").GetComponent<Dropdown>();
|
||||
regOptions = new LoginRegOptions();
|
||||
years.options = regOptions.years;
|
||||
months.options = regOptions.months;
|
||||
days.options = regOptions.days;
|
||||
@@ -358,6 +361,14 @@ public class LoginController : MonoBehaviour
|
||||
});
|
||||
}
|
||||
imagexf = transform.Find("Panel").Find("LoginContainer").Find("Imagexf");
|
||||
toolContainer = transform.Find("Panel").Find("ToolContainer");
|
||||
if (toolContainer != null)
|
||||
{
|
||||
toolContainer.Find("Setting").GetComponent<Button>().onClick.AddListener(() =>
|
||||
{
|
||||
UIManager.ShowSettingModal();
|
||||
});
|
||||
}
|
||||
}
|
||||
private void AdjustWxQrCode()
|
||||
{
|
||||
@@ -674,15 +685,26 @@ public class LoginController : MonoBehaviour
|
||||
var data = userResult;
|
||||
if (data == null) return;
|
||||
//ConfigHelper.CurrentUser = res.data;
|
||||
if (gou != null && gou.gameObject.activeSelf && !userInfos.Exists(x => x.Id == data.Id))
|
||||
if (gou != null && gou.gameObject.activeSelf)
|
||||
{
|
||||
userInfos.Add(new QUserInfo
|
||||
var u = userInfos.Find(x => x.Id == data.Id);
|
||||
if (u == null)
|
||||
{
|
||||
Id = data.Id,
|
||||
NickName = data.Nickname,
|
||||
Avatar = data.WxHeadImg,
|
||||
Cookie = data.cookie
|
||||
});
|
||||
userInfos.Add(new QUserInfo
|
||||
{
|
||||
Id = data.Id,
|
||||
NickName = data.Nickname,
|
||||
Avatar = data.WxHeadImg,
|
||||
Cookie = data.cookie
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
u.Id = data.Id;
|
||||
u.NickName = data.Nickname;
|
||||
u.Avatar = data.WxHeadImg;
|
||||
u.Cookie = data.cookie;
|
||||
}
|
||||
PlayerPrefs.SetString("UserInfos", JsonConvert.SerializeObject(userInfos));
|
||||
}
|
||||
App.CurrentUser = data;
|
||||
|
||||
Reference in new issue
Block a user