|
@@ -22,7 +22,7 @@ namespace Assets
|
|
|
/// <summary>
|
|
|
/// 白名单URL
|
|
|
/// </summary>
|
|
|
- string urlWhiteList = "https://sfgdemo-1303083714.cos.ap-hongkong.myqcloud.com/WhiteList.json";
|
|
|
+ string urlWhiteList = "http://172.18.10.22/WhiteList.json";
|
|
|
/// <summary>
|
|
|
/// 是否验证Mac地址
|
|
|
/// </summary>
|
|
@@ -39,34 +39,9 @@ namespace Assets
|
|
|
public override void OnInitWindow()
|
|
|
{
|
|
|
GetMacAddress();
|
|
|
- whiteList = GameManager.Instance.whiteList;
|
|
|
- confirmBtn.onClick.AddListener(async () =>
|
|
|
+ confirmBtn.onClick.AddListener(() =>
|
|
|
{
|
|
|
- if (isVerify)
|
|
|
- {
|
|
|
- if (whiteList.table.Contains(inputField.text))
|
|
|
- {
|
|
|
- StepManager.userID = inputField.text;
|
|
|
- StartCoroutine(GetSecretKey());
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- await UIManager.Instance.ShowUI(WindowID.DlgLoginFaild);
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if (whiteList.table.Contains(inputField.text))
|
|
|
- {
|
|
|
- StepManager.userID = inputField.text;
|
|
|
- UIManager.Instance.HideUI(WindowID.DlgLogin);
|
|
|
- await UIManager.Instance.ShowUI(WindowID.FaceBuildPanel);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- await UIManager.Instance.ShowUI(WindowID.DlgLoginFaild);
|
|
|
- }
|
|
|
- }
|
|
|
+ StartCoroutine(GetWhiteList());
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -74,6 +49,7 @@ namespace Assets
|
|
|
{
|
|
|
|
|
|
}
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 获取秘钥
|
|
|
/// </summary>
|
|
@@ -158,6 +134,7 @@ namespace Assets
|
|
|
{
|
|
|
whiteList = JsonMapper.ToObject<WhiteList>(request.downloadHandler.text);
|
|
|
StepManager.timeStamp = whiteList.TimeStamp;
|
|
|
+ VerifyAccount();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -166,6 +143,37 @@ namespace Assets
|
|
|
|
|
|
}
|
|
|
/// <summary>
|
|
|
+ /// 验证账号
|
|
|
+ /// </summary>
|
|
|
+ async void VerifyAccount()
|
|
|
+ {
|
|
|
+ if (isVerify)
|
|
|
+ {
|
|
|
+ if (whiteList.table.Contains(inputField.text))
|
|
|
+ {
|
|
|
+ StepManager.userID = inputField.text;
|
|
|
+ StartCoroutine(GetSecretKey());
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ await UIManager.Instance.ShowUI(WindowID.DlgLoginFaild);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (whiteList.table.Contains(inputField.text))
|
|
|
+ {
|
|
|
+ StepManager.userID = inputField.text;
|
|
|
+ UIManager.Instance.HideUI(WindowID.DlgLogin);
|
|
|
+ await UIManager.Instance.ShowUI(WindowID.FaceBuildPanel);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ await UIManager.Instance.ShowUI(WindowID.DlgLoginFaild);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
/// 获取本机Mac地址
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
@@ -237,7 +245,7 @@ namespace Assets
|
|
|
/// <summary>
|
|
|
/// 白名单数据
|
|
|
/// </summary>
|
|
|
- public struct WhiteList
|
|
|
+ struct WhiteList
|
|
|
{
|
|
|
public string[] table;
|
|
|
public string TimeStamp;
|