From 52fd8414863387d8b33fcf7651663b2f872b231e Mon Sep 17 00:00:00 2001 From: CaiYanPeng Date: Thu, 29 Apr 2021 23:45:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Resources/UI/Prefab/MapList/MapItem.prefab | 2 +- .../UI/Prefab/Panel/EditUserPanel.prefab | 2 +- Assets/Scripts/App.cs | 2 +- Assets/Scripts/Scenes/LoginController.cs | 7 ++----- Assets/Scripts/UI/Prefab/FeedbackController.cs | 1 + .../Scripts/UI/Prefab/Panel/UserInfoController.cs | 4 ++-- .../UI/Prefab/ResultList/ResultListController.cs | 15 +++++++++++---- 7 files changed, 19 insertions(+), 14 deletions(-) diff --git a/Assets/Resources/UI/Prefab/MapList/MapItem.prefab b/Assets/Resources/UI/Prefab/MapList/MapItem.prefab index dce5306c..74fbcde9 100644 --- a/Assets/Resources/UI/Prefab/MapList/MapItem.prefab +++ b/Assets/Resources/UI/Prefab/MapList/MapItem.prefab @@ -1396,7 +1396,7 @@ MonoBehaviour: m_Alignment: 3 m_AlignByGeometry: 0 m_RichText: 1 - m_HorizontalOverflow: 1 + m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: Map Name diff --git a/Assets/Resources/UI/Prefab/Panel/EditUserPanel.prefab b/Assets/Resources/UI/Prefab/Panel/EditUserPanel.prefab index b7d162b4..7c298d3e 100644 --- a/Assets/Resources/UI/Prefab/Panel/EditUserPanel.prefab +++ b/Assets/Resources/UI/Prefab/Panel/EditUserPanel.prefab @@ -7380,7 +7380,7 @@ PrefabInstance: - target: {fileID: 3150550772916003707, guid: 6b94e789d6585a04dbdc04c8a7cf97b2, type: 3} propertyPath: m_Text - value: Edit + value: Save objectReference: {fileID: 0} - target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2, type: 3} diff --git a/Assets/Scripts/App.cs b/Assets/Scripts/App.cs index 65fff09f..ab5e7511 100644 --- a/Assets/Scripts/App.cs +++ b/Assets/Scripts/App.cs @@ -7,7 +7,7 @@ using UnityEngine; public static class App { - public static string Host = "http://192.168.0.97:5082/"; + public static string Host = "http://pf.juze.pro/"; public static string AppVersion = "1.0.0"; diff --git a/Assets/Scripts/Scenes/LoginController.cs b/Assets/Scripts/Scenes/LoginController.cs index 4ad2e45f..d17c8092 100644 --- a/Assets/Scripts/Scenes/LoginController.cs +++ b/Assets/Scripts/Scenes/LoginController.cs @@ -255,7 +255,7 @@ public class LoginController : MonoBehaviour wxState = (DateTime.Now.ToUniversalTime().Ticks / 10000 * new System.Random().Next(1, 5)).ToString(); wxBrowser.Url = $"https://open.weixin.qq.com/connect/qrconnect?appid={App.WxAppId}&redirect_uri=https%3A%2F%2Fwx.powerfun.com.cn%2FNoAuth%2Fv1%2FWxWebLogin&response_type=code&scope=snsapi_login&state={wxState}#wechat_redirect"; - //AdjustWxQrCode(); + AdjustWxQrCode(); var wx1 = mainContent.Find("FormContainer-Login").Find("Mask").Find("FormContainer-wx1"); wx1.gameObject.SetActive(true); Debug.Log(178 + "已经开启" + wx1.gameObject.activeSelf); @@ -503,11 +503,8 @@ public class LoginController : MonoBehaviour private void AdjustWxQrCode() { wxBrowser.EvalJS(@" - console.log(439,document.body.style.padding); let time = null; let f = ()=>{ - console.log(442); - document.getElementsByClassName('qrcode')[0].style.marginTop = 0; document.getElementsByClassName('title')[0].style.display = 'none'; document.getElementById('wx_default_tip').childNodes[3].innerHTML = `""PowerFun""`; @@ -530,7 +527,7 @@ public class LoginController : MonoBehaviour { if (wxBrowser.Url.Contains("qrconnect")) { - AdjustWxQrCode(); + //AdjustWxQrCode(); } Debug.Log(wxBrowser.Url); var rgx = Regex.Match(wxBrowser.Url, @"https\:\/\/wx.powerfun.com.cn/NoAuth/v1/WxWebLogin\?code=(.*?)&state=(.*?)$"); diff --git a/Assets/Scripts/UI/Prefab/FeedbackController.cs b/Assets/Scripts/UI/Prefab/FeedbackController.cs index fb634af0..352ee9d0 100644 --- a/Assets/Scripts/UI/Prefab/FeedbackController.cs +++ b/Assets/Scripts/UI/Prefab/FeedbackController.cs @@ -117,6 +117,7 @@ public class FeedbackController : PFUIPanel else { Utils.showToast(gameObject, "Submitted", type: 1);//已提交 + Close(); } } // Update is called once per frame diff --git a/Assets/Scripts/UI/Prefab/Panel/UserInfoController.cs b/Assets/Scripts/UI/Prefab/Panel/UserInfoController.cs index 8c5af35d..f5349420 100644 --- a/Assets/Scripts/UI/Prefab/Panel/UserInfoController.cs +++ b/Assets/Scripts/UI/Prefab/Panel/UserInfoController.cs @@ -61,9 +61,9 @@ public class UserInfoController : PFUIPanel { base.Show(); Load(); - if (summaryPanel != null) + if (summaryPanel != null) { - summaryPanel.Find("Panel").Find("RideResultList").GetComponent().HideError(); + summaryPanel.Find("Panel").Find("RideResultList").GetComponent().Load(); } } void Load() diff --git a/Assets/Scripts/UI/Prefab/ResultList/ResultListController.cs b/Assets/Scripts/UI/Prefab/ResultList/ResultListController.cs index ef448b77..136391ea 100644 --- a/Assets/Scripts/UI/Prefab/ResultList/ResultListController.cs +++ b/Assets/Scripts/UI/Prefab/ResultList/ResultListController.cs @@ -79,12 +79,16 @@ public class ResultListController : MonoBehaviour GetList(1); } - public void HideError() + public void Load() { - if (scroll!=null) + if (contents != null && contents.Length == 2) { - scroll.transform.Find("Error").gameObject.SetActive(false); + Refresh(contents[scrollIndex]); } + //if (scroll!=null) + //{ + // scroll.transform.Find("Error").gameObject.SetActive(false); + //} } private void OnEndDrag(BaseEventData e) @@ -143,7 +147,10 @@ public class ResultListController : MonoBehaviour else { //contents[index]; - scroll.transform.Find("Error").gameObject.SetActive(true); + if (!sindex.HasValue ||(sindex.HasValue && sindex.Value == scrollIndex)) + { + scroll.transform.Find("Error").gameObject.SetActive(true); + } } } else