中文调整
This commit is contained in:
1 parent
265430053a
commit
23e5ae6ebd
13 files changed
+1865
-1534
No files matched your search
@@ -103,7 +103,7 @@ namespace Assets.Scripts.Apis
|
||||
//yield return request.Send();
|
||||
|
||||
var client = new HttpClient(httpClientHandler);
|
||||
client.DefaultRequestHeaders.Add("Language", "en");
|
||||
//client.DefaultRequestHeaders.Add("Language", "en");
|
||||
HandleHeaders(client.DefaultRequestHeaders);
|
||||
|
||||
var result = await client.GetByteArrayAsync(_url).ConfigureAwait(false);
|
||||
@@ -123,6 +123,8 @@ namespace Assets.Scripts.Apis
|
||||
defaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue("Unity", ConfigHelper.AppVersion));
|
||||
#endif
|
||||
defaultRequestHeaders.Add("deviceUniqueIdentifier", SystemInfo.deviceUniqueIdentifier);
|
||||
defaultRequestHeaders.Remove("Language");
|
||||
defaultRequestHeaders.Add("Language", App.GetLocalLanguage());
|
||||
}
|
||||
|
||||
protected async Task<byte[]> GetUrlAsync(string url)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -14,6 +15,10 @@ namespace Assets.Scripts.Apis
|
||||
//public dynamic data { get; set; }
|
||||
public string errMsg { get; set; }
|
||||
public JArray errFieldMsg { get; set; }
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this);
|
||||
}
|
||||
}
|
||||
|
||||
public class JsonResult<T> : JsonResult
|
||||
|
||||
@@ -18,7 +18,7 @@ public delegate void ChangeLanguageDelegate();
|
||||
|
||||
public static class App
|
||||
{
|
||||
public static string Host = "http://192.168.0.102:5082/";
|
||||
public static string Host = "http://192.168.0.101:5084/";
|
||||
|
||||
public static string AppVersion = Application.version;
|
||||
|
||||
@@ -175,7 +175,7 @@ public static class App
|
||||
{
|
||||
App._IsRowerMode = bool.Parse(isRower);
|
||||
}
|
||||
//App.ChangeLanguage("en");
|
||||
Screen.sleepTimeout = SleepTimeout.NeverSleep;
|
||||
Debug.Log(SystemInfo.deviceUniqueIdentifier);
|
||||
}
|
||||
}
|
||||
@@ -631,7 +631,9 @@ public class LoginController : BaseScene
|
||||
private void AdjustWxQrCode()
|
||||
{
|
||||
#if !(UNITY_IOS || UNITY_ANDROID)
|
||||
wxBrowser.EvalJSCSP(@"
|
||||
if (App.GetLocalLanguage() == "en")
|
||||
{
|
||||
wxBrowser.EvalJSCSP(@"
|
||||
document.getElementsByClassName('qrcode')[0].style.marginTop = 0;
|
||||
document.getElementsByClassName('title')[0].style.display = 'none';
|
||||
document.getElementById('wx_default_tip').childNodes[3].innerHTML = `""PowerFun""`;
|
||||
@@ -640,6 +642,20 @@ public class LoginController : BaseScene
|
||||
document.body.style.transformOrigin = 'top left';
|
||||
document.body.style.transform = 'scale(0.85106382978)';
|
||||
document.body.style.padding = '0';").Done();
|
||||
}
|
||||
else
|
||||
{
|
||||
wxBrowser.EvalJSCSP(@"
|
||||
document.getElementsByClassName('qrcode')[0].style.marginTop = 0;
|
||||
document.getElementsByClassName('title')[0].style.display = 'none';
|
||||
document.getElementById('wx_default_tip').childNodes[1].innerHTML = `请使用微信扫描二维码登录`;
|
||||
document.body.style.background = '#272732';
|
||||
document.body.style.overflow = 'hidden';
|
||||
document.body.style.transformOrigin = 'top left';
|
||||
document.body.style.transform = 'scale(0.85106382978)';
|
||||
document.body.style.padding = '0';").Done();
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
//浏览器加载回调
|
||||
|
||||
@@ -35,10 +35,10 @@ namespace Assets.Scripts.UI.Control
|
||||
}
|
||||
protected void Start()
|
||||
{
|
||||
Debug.Log(text.text);
|
||||
//Debug.Log(text.text);
|
||||
if (App.LanguageManager != null && App.LanguageManager.ContainsKey(key))
|
||||
{
|
||||
Debug.Log(text.text);
|
||||
//Debug.Log(text.text);
|
||||
text.text = App.LanguageManager[key];
|
||||
}
|
||||
App.ChangeLanguageEvent += App_ChangeLanguageEvent;
|
||||
|
||||
@@ -83,7 +83,7 @@ public class ConnectDeviceModal : PFUIPanel
|
||||
|
||||
UIManager.AddEvent(connectBtn.gameObject, EventTriggerType.PointerClick, new UnityEngine.Events.UnityAction<BaseEventData>(e =>
|
||||
{
|
||||
if (!connectBtnText.text.Equals("DISCONNECT"))
|
||||
if (!connectBtnText.text.Equals(App.GetLocalString("DISCONNECT")))
|
||||
{
|
||||
foreach (var item in deviceList)
|
||||
{
|
||||
@@ -208,11 +208,13 @@ public class ConnectDeviceModal : PFUIPanel
|
||||
var nontrainer = deviceItemObj.DeviceInfo.Sensor != SensorType.Trainer && SensorType != SensorType.Trainer && deviceItemObj.DeviceInfo.State == DeviceState.Connected;
|
||||
if (trainer || nontrainer)
|
||||
{
|
||||
connectBtnText.text = "DISCONNECT";
|
||||
connectBtnText.text = App.GetLocalString("DISCONNECT");
|
||||
connectBtnText.GetComponent<PFUIText>().key = "DISCONNECT";
|
||||
}
|
||||
else
|
||||
{
|
||||
connectBtnText.text = "CONNECT";
|
||||
connectBtnText.text = App.GetLocalString("CONNECT");
|
||||
connectBtnText.GetComponent<PFUIText>().key = "CONNECT";
|
||||
}
|
||||
|
||||
foreach (var item in deviceList)
|
||||
@@ -248,10 +250,12 @@ public class ConnectDeviceModal : PFUIPanel
|
||||
if(trainer || nontrainer)
|
||||
{
|
||||
connectBtnText.text = App.GetLocalString("DISCONNECT");
|
||||
connectBtnText.GetComponent<PFUIText>().key = "DISCONNECT";
|
||||
}
|
||||
else
|
||||
{
|
||||
connectBtnText.text = App.GetLocalString("CONNECT");
|
||||
connectBtnText.GetComponent<PFUIText>().key = "CONNECT";
|
||||
}
|
||||
//connectBtn.text.text = "DISCOUNECT";
|
||||
noDevice.text = firstDevice.DeviceInfo.Name;
|
||||
|
||||
@@ -286,7 +286,7 @@ public class DeviceView : MonoBehaviour
|
||||
else {
|
||||
hasDevice = App.MainDeviceAdapter.GetDevices().Any(d => d.Sensor == SensorType);
|
||||
}
|
||||
Debug.Log(hasDevice);
|
||||
//Debug.Log(hasDevice);
|
||||
if (hasDevice)
|
||||
{
|
||||
mSearchButton.SetActive(false);
|
||||
|
||||
@@ -128,6 +128,7 @@ public class EarthController : PFUIPanel
|
||||
map.OnCountryEnter += (int countryIndex, int regionIndex) =>
|
||||
{
|
||||
map.autoRotationSpeed = 0f;
|
||||
|
||||
var country = map.countries[countryIndex];
|
||||
if (country.name.ToLower().Contains("taiwan"))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user