切换移动端暂存
This commit is contained in:
1 parent
f14a071179
commit
ca91f45ef3
15 files changed
+201
-46
No files matched your search
@@ -21,7 +21,9 @@ using UnityEngine.Events;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
#if !(UNITY_IOS || UNITY_ANDROID)
|
||||
using ZenFulcrum.EmbeddedBrowser;
|
||||
#endif
|
||||
//记录:小f 是-457和-681
|
||||
|
||||
public class QUserInfo
|
||||
@@ -86,7 +88,9 @@ public class LoginController : MonoBehaviour
|
||||
//注册主页面
|
||||
private UserResultModel userResult;
|
||||
/*微信相关*/
|
||||
#if !(UNITY_IOS || UNITY_ANDROID)
|
||||
private Browser wxBrowser;
|
||||
#endif
|
||||
private string wxState;
|
||||
private Transform wxLogin1;
|
||||
private Transform wxLogin2;
|
||||
@@ -252,6 +256,7 @@ public class LoginController : MonoBehaviour
|
||||
var wechatLogin = loginContainer.Find("otherContainer").Find("Wechat").GetComponent<Button>();
|
||||
UIManager.AddEvent(wechatLogin.gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
{
|
||||
#if !(UNITY_IOS || UNITY_ANDROID)
|
||||
if (wxLock) return;
|
||||
wxLock = true;
|
||||
//wxState = (DateTime.Now.ToUniversalTime().Ticks / 10000 * new System.Random().Next(1, 5)).ToString();
|
||||
@@ -269,7 +274,7 @@ public class LoginController : MonoBehaviour
|
||||
//Debug.Log(178 + "已经开启" + wx1.gameObject.activeSelf);
|
||||
//wx1.GetComponent<CanvasGroup>().DOFade(1, 0.8f).onComplete = () => { wxLock = false; };
|
||||
wxLogin1.DOLocalMoveY(0, 0.3f).onComplete = () => { wxLock = false; };
|
||||
|
||||
#endif
|
||||
});
|
||||
|
||||
var login = loginContainer.Find("login").GetComponent<Button>();
|
||||
@@ -311,6 +316,7 @@ public class LoginController : MonoBehaviour
|
||||
{
|
||||
wxReturnLogin();
|
||||
});
|
||||
#if !(UNITY_IOS || UNITY_ANDROID)
|
||||
wxBrowser = wxLogin1.Find("Browser (GUI)").GetComponent<Browser>();
|
||||
if (wxBrowser != null)
|
||||
{
|
||||
@@ -333,6 +339,7 @@ public class LoginController : MonoBehaviour
|
||||
//browser.Zoom = 0.5f;
|
||||
//browser.
|
||||
}
|
||||
#endif
|
||||
}
|
||||
wxLogin2 = mainContent.Find("FormContainer-wx2");
|
||||
if (wxLogin2 != null)
|
||||
@@ -519,6 +526,7 @@ public class LoginController : MonoBehaviour
|
||||
/// </summary>
|
||||
private void AdjustWxQrCode()
|
||||
{
|
||||
#if !(UNITY_IOS || UNITY_ANDROID)
|
||||
wxBrowser.EvalJSCSP(@"
|
||||
document.getElementsByClassName('qrcode')[0].style.marginTop = 0;
|
||||
document.getElementsByClassName('title')[0].style.display = 'none';
|
||||
@@ -528,8 +536,11 @@ public class LoginController : MonoBehaviour
|
||||
document.body.style.transformOrigin = 'top left';
|
||||
document.body.style.transform = 'scale(0.85106382978)';
|
||||
document.body.style.padding = '0';").Done();
|
||||
#endif
|
||||
}
|
||||
//浏览器加载回调
|
||||
|
||||
#if !(UNITY_IOS || UNITY_ANDROID)
|
||||
private async void OnUserScan()
|
||||
{
|
||||
if (wxBrowser.Url.Contains("qrconnect"))
|
||||
@@ -590,7 +601,9 @@ public class LoginController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
private void goThirdNext()
|
||||
{
|
||||
this.StartScrollPanel(4);
|
||||
@@ -605,7 +618,7 @@ public class LoginController : MonoBehaviour
|
||||
{
|
||||
|
||||
}
|
||||
#region 倒计时获取验证码
|
||||
#region 倒计时获取验证码
|
||||
int time = 0;
|
||||
float timer = 0f;
|
||||
bool startCaptcha = false;
|
||||
@@ -644,7 +657,7 @@ public class LoginController : MonoBehaviour
|
||||
Utils.SetValidate(signFormDict, r.errFieldMsg);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
void CaptchaTimerTick()
|
||||
{
|
||||
@@ -882,7 +895,9 @@ public class LoginController : MonoBehaviour
|
||||
void wxReturnLogin()
|
||||
{
|
||||
wxLock = true;
|
||||
#if !(UNITY_IOS || UNITY_ANDROID)
|
||||
wxBrowser.LoadHTML("<div/>");
|
||||
#endif
|
||||
//wxBrowser.Url = "chrome://version/";
|
||||
wxLogin1.DOLocalMoveY(-573, 0.3f).onComplete = () =>
|
||||
{
|
||||
@@ -1178,7 +1193,7 @@ public class LoginController : MonoBehaviour
|
||||
}
|
||||
//float adjTime = 0;
|
||||
//bool startJs = false;
|
||||
#region 主页面滑动逻辑
|
||||
#region 主页面滑动逻辑
|
||||
private int tmpImdex = 0;
|
||||
private int scrollPanelIndex = 2;
|
||||
//private float scrollValue = 0.5f;
|
||||
@@ -1217,9 +1232,9 @@ public class LoginController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 注册页面滑动逻辑
|
||||
#region 注册页面滑动逻辑
|
||||
private bool startScrollSign = false;
|
||||
private int scrollSignIndex = 0;
|
||||
|
||||
@@ -1285,5 +1300,5 @@ public class LoginController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
Reference in new issue
Block a user