From 1e350fbb4dee8638debe60d83d18a48d49b035db Mon Sep 17 00:00:00 2001 From: CaiYanPeng Date: Wed, 23 Feb 2022 11:29:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=B8=BA=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=EF=BC=8C=E5=B9=BF=E5=91=8A=E9=98=9F?= =?UTF-8?q?=E5=88=97=E5=88=A4=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/App.cs | 14 +++++++------- Assets/Scripts/Scenes/MainController.cs | 7 +++++-- .../UI/Prefab/Activity/ActivityController.cs | 3 ++- Assets/test.cs | 12 ++++++------ 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Assets/Scripts/App.cs b/Assets/Scripts/App.cs index 26502bf6..bb140829 100644 --- a/Assets/Scripts/App.cs +++ b/Assets/Scripts/App.cs @@ -20,7 +20,7 @@ public delegate void ChangeLanguageDelegate(); public static class App { - public static string Host = "http://192.168.0.101:5085/"; + public static string Host = "http://192.168.0.101:5083/"; public static string AppVersion = Application.version; @@ -202,17 +202,17 @@ public static class App InitLanguage(); #if !UNITY_EDITOR //测试服务器 - //Host = "http://pf.juze.pro/"; - //UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000); - //TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001); + Host = "http://pf.juze.pro/"; + UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000); + TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001); //线上 //Host = "https://wx.powerfun.com.cn/"; //UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11000); //TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11001); //本地 - Host = "http://192.168.0.101:5085/"; - UdpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.97"), 11000); - TcpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.102"), 21001); + //Host = "http://192.168.0.101:5085/"; + //UdpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.97"), 11000); + //TcpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.102"), 21001); Debug.unityLogger.logEnabled = false; #else //Host = "http://pf.juze.pro/"; diff --git a/Assets/Scripts/Scenes/MainController.cs b/Assets/Scripts/Scenes/MainController.cs index 46691fec..fdd04487 100644 --- a/Assets/Scripts/Scenes/MainController.cs +++ b/Assets/Scripts/Scenes/MainController.cs @@ -350,8 +350,11 @@ public class MainController : BaseScene { App.adQueue.Enqueue(_ad); } - var ad = App.adQueue.Dequeue(); - UIManager.ShowActivityAdPanel(ad.Id, App.GetLocalLanguage() == "zh"? ad.DetailUrl: ad.GlobalDetailUrl, ad.Url + $"?Token={App.CurrentUser.cookie}"); + if (App.adQueue.Count > 0) + { + var ad = App.adQueue.Dequeue(); + UIManager.ShowActivityAdPanel(ad.Id, App.GetLocalLanguage() == "zh" ? ad.DetailUrl : ad.GlobalDetailUrl, ad.Url + $"?Token={App.CurrentUser.cookie}"); + } } } diff --git a/Assets/Scripts/UI/Prefab/Activity/ActivityController.cs b/Assets/Scripts/UI/Prefab/Activity/ActivityController.cs index 7537d6c5..4435e940 100644 --- a/Assets/Scripts/UI/Prefab/Activity/ActivityController.cs +++ b/Assets/Scripts/UI/Prefab/Activity/ActivityController.cs @@ -125,7 +125,7 @@ public class ActivityController : PFUIPanel private void Share(int type,int id) { - string url = $"http://192.168.0.101:3081/Activity/LightUpChina/Share?userId={App.CurrentUser.Id}"; + string url = $"http://pfweb.juze.pro/Activity/LightUpChina/Share?userId={App.CurrentUser.Id}"; if (type < 2) { if (App.weChatController.IsWeChatAppInstalled()) @@ -180,6 +180,7 @@ public class ActivityController : PFUIPanel public void Initial(string url) { + Debug.Log(url); if (this.url != url) { this.url = url; diff --git a/Assets/test.cs b/Assets/test.cs index aacf9cea..e0944748 100644 --- a/Assets/test.cs +++ b/Assets/test.cs @@ -1,19 +1,19 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -using ZenFulcrum.EmbeddedBrowser; +//using ZenFulcrum.EmbeddedBrowser; public class test : MonoBehaviour { // Start is called before the first frame update void Start() { - var b = transform.Find("Browser (GUI)").GetComponent(); - b.EvalJS("navigator.pfLang = 'zh'"); - b.RegisterFunction("Test", args => - { + //var b = transform.Find("Browser (GUI)").GetComponent(); + //b.EvalJS("navigator.pfLang = 'zh'"); + //b.RegisterFunction("Test", args => + //{ - }); + //}); } void Test(string str, int i) { } // Update is called once per frame