更改为测试服务器,广告队列判空

This commit is contained in:
CaiYanPeng 2022-02-23 11:29:41 +08:00
parent 768f8261da
commit 1e350fbb4d
4 changed files with 20 additions and 16 deletions

View File

@ -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/";

View File

@ -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}");
}
}
}

View File

@ -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;

View File

@ -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<Browser>();
b.EvalJS("navigator.pfLang = 'zh'");
b.RegisterFunction("Test", args =>
{
//var b = transform.Find("Browser (GUI)").GetComponent<Browser>();
//b.EvalJS("navigator.pfLang = 'zh'");
//b.RegisterFunction("Test", args =>
//{
});
//});
}
void Test(string str, int i) { }
// Update is called once per frame