修改细节
This commit is contained in:
1 parent
27ea20b1c8
commit
e20ddb9bc1
6 files changed
+74
-62
No files matched your search
+14
-9
@@ -19,7 +19,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;
|
||||
|
||||
@@ -153,7 +153,7 @@ public static class App
|
||||
language = "en";
|
||||
}
|
||||
#if UNITY_EDITOR
|
||||
language = "en";
|
||||
//language = "en";
|
||||
#endif
|
||||
var a = Resources.Load<TextAsset>("UI/language");
|
||||
dic = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, string>>>(a.text);
|
||||
@@ -180,18 +180,23 @@ public static class App
|
||||
}
|
||||
}
|
||||
}
|
||||
public static Dictionary<string, string> websiteDict = new Dictionary<string, string>()
|
||||
{
|
||||
{"https://wx.powerfun.com.cn/","http://www.powerfun.com/" },
|
||||
{"http://pf.juze.pro/","http://pfweb.juze.pro/" }
|
||||
};
|
||||
static App()
|
||||
{
|
||||
InitLanguage();
|
||||
#if !UNITY_EDITOR
|
||||
//Host = "http://pf.juze.pro/";
|
||||
//Host = "http://192.168.0.101:5087/";
|
||||
//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 = "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);
|
||||
|
||||
@@ -117,7 +117,14 @@ public class MapListController : PFUIPanel
|
||||
SetRounded(btnMapMode.transform, 64);
|
||||
UIManager.AddEvent(btnMapMode.transform.Find("GoList").gameObject, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
Application.OpenURL("http://192.168.0.101:3081/Mine/Upload?token="+ App.CurrentUser.cookie);
|
||||
if (App.websiteDict.ContainsKey(App.Host))
|
||||
{
|
||||
Application.OpenURL($"{App.websiteDict[App.Host]}Mine/Upload?token={App.CurrentUser.cookie}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Application.OpenURL("http://www.powerfun.com/Mine/Upload?token=" + App.CurrentUser.cookie);
|
||||
}
|
||||
});
|
||||
transform.Find("MainNav").GetComponent<MainNav>().ShowBack();
|
||||
#endif
|
||||
|
||||
@@ -156,33 +156,33 @@ public class NewRouteDetailController : PFUIPanel
|
||||
Utils.DisplayImageTempDict(left.Find("Icon").GetComponent<RawImage>(), area.CoverImage, caches
|
||||
, b =>
|
||||
{
|
||||
if (b != null)
|
||||
{
|
||||
cacheByte.Add(area.CoverImage, b);
|
||||
}
|
||||
else if(cacheByte.ContainsKey(area.CoverImage))
|
||||
{
|
||||
b = cacheByte[area.CoverImage];
|
||||
}
|
||||
// if (b != null)
|
||||
// {
|
||||
// cacheByte.Add(area.CoverImage, b);
|
||||
// }
|
||||
// else if(cacheByte.ContainsKey(area.CoverImage))
|
||||
// {
|
||||
// b = cacheByte[area.CoverImage];
|
||||
// }
|
||||
|
||||
#if UNITY_EDITOR
|
||||
var _t = new Texture2D(4, 4, TextureFormat.DXT5, false);
|
||||
#else
|
||||
#if UNITY_IOS
|
||||
var _t = new Texture2D(4, 4, TextureFormat.ASTC_RGB_4x4,false);
|
||||
Debug.Log("使用了壓縮");
|
||||
#elif UNITY_ANDROID
|
||||
var _t = new Texture2D(4, 4, TextureFormat.ASTC_RGB_4x4,false);
|
||||
Debug.Log("使用了壓縮");
|
||||
#else //pc
|
||||
var _t = new Texture2D(4, 4, TextureFormat.DXT5,false);
|
||||
#endif
|
||||
#endif
|
||||
_t.LoadImage(b);
|
||||
//Graphics.CopyTexture(t, _t);
|
||||
//Debug.Log($"{t.width},{t.height}");
|
||||
left.Find("Thumbnail").GetComponent<RawImage>().texture =
|
||||
ScaleTextureCutOut(_t, 0, _t.height / 2, _t.width / 3, _t.height / 3);
|
||||
//#if UNITY_EDITOR
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.DXT5, false);
|
||||
//#else
|
||||
//#if UNITY_IOS
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.ASTC_RGB_4x4,false);
|
||||
// Debug.Log("使用了壓縮");
|
||||
//#elif UNITY_ANDROID
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.ASTC_RGB_4x4,false);
|
||||
// Debug.Log("使用了壓縮");
|
||||
//#else //pc
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.DXT5,false);
|
||||
//#endif
|
||||
//#endif
|
||||
// _t.LoadImage(b);
|
||||
// //Graphics.CopyTexture(t, _t);
|
||||
// //Debug.Log($"{t.width},{t.height}");
|
||||
// left.Find("Thumbnail").GetComponent<RawImage>().texture =
|
||||
// ScaleTextureCutOut(_t, 0, _t.height / 2, _t.width / 3, _t.height / 3);
|
||||
});
|
||||
//Utils.DisplayImageTempDict(left.Find("Thumbnail").GetComponent<RawImage>(), area.CoverImage, caches);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user