Merge branch 'dev_cyp' into dev_ar_cyp

# Conflicts:
#	Assets/Resources/UI/Font/HanWangZonYi.ttf.meta
#	Assets/Resources/UI/language.json
#	Assets/Scenes/Login.unity
#	Assets/Scripts/Apis/Models/MapRoute.cs
#	Assets/Scripts/App.cs
#	Assets/Scripts/ConfigHelper.cs
#	Assets/Scripts/Scenes/Ride/Scripts/PlayerController.cs
#	Assets/Scripts/UIManager.cs
#	Assets/Scripts/Utils/Utils.cs
This commit is contained in:
lishuo committed 2022-06-02 11:30:37 +08:00
commit e513eeac5c
301 files changed
+49814 -11770

No files matched your search

@@ -119,6 +119,19 @@ public class ResultListController : PFUIPanel
#if UNITY_ANDROID || UNITY_IOS
GetList(2);
#endif
#region 划船机功能:隐藏骑行记录
#if UNITY_ANDROID || UNITY_IOS
btnRower.transform.localPosition = new Vector3(btnRower.transform.localPosition.x, btnRoute.transform.localPosition.y, btnRower.transform.localPosition.z);
btnRoute.gameObject.SetActive(false);
btnMatch.gameObject.SetActive(false);
transform.Find("ListPanel/Line").gameObject.SetActive(false);
transform.Find("ListPanel/Line2").gameObject.SetActive(false);
StartScroll(2);
//scrollContent.localPosition = new Vector3(674 * -2, scrollContent.localPosition.y, scrollContent.localPosition.z);//.DOLocalMoveX(674 * index * -1, 0.3f);
//btnRower.GetComponent<Text>().color = Utils.HexToColor("#ffffff");
#endif
#endregion
}
public void Load()
@@ -177,6 +190,7 @@ public class ResultListController : PFUIPanel
Load();
StartScroll(1);
}
}
Dictionary<int, bool> isEnd = new Dictionary<int, bool>
{
@@ -91,11 +91,32 @@ public class RouteItem : MonoBehaviour
{
Utils.DisplayImage(raw, result.Cover, true);
}
row1.Find("Time").GetComponent<Text>().text = $"<color=#5c5c6e>{App.GetLocalString("Rowing time")}:</color>{TimeSpan.FromSeconds(result.TotalTime).ToString()}";
row1.Find("Distance").GetComponent<Text>().text = $"<color=#5c5c6e>{App.GetLocalString("Distance")}:</color>{result.TotalDistance}M";
row1.Find("Time").GetComponent<Text>().text = $"<color=#5c5c6e>{App.GetLocalString("Rowing time")}:</color>{TimeSpan.FromSeconds(result.Ticks).ToString()}";
row1.Find("Distance").GetComponent<Text>().text = $"<color=#5c5c6e>{App.GetLocalString("row distance")}:</color>{result.TotalDistance}M";
row2.Find("Device").GetComponent<Text>().text = $"<color=#5c5c6e>{App.GetLocalString("Rowing equipment")}:</color>{result.ManufacturerName}";
left.Find("Progress").gameObject.SetActive(false);
left.Find("Main/Name").GetComponent<Text>().text = $"{result.CreateTime.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss")} Free Rowing";
string typeStr = "Free";
if (result.Type == 1)
{
typeStr = $"{result.TypeValue}M";
}
else if (result.Type == 2 && result.TypeValue.HasValue)
{
var ts = TimeSpan.FromSeconds(result.TypeValue.Value);
if (ts.TotalHours >= 1)
{
typeStr = ts.TotalHours.ToString("#0.0") + "h";
}
else if (ts.TotalMinutes >= 1)
{
typeStr = ts.TotalMinutes.ToString("#0.0") + "min";
}
else
{
typeStr = result.TypeValue.Value + "s";
}
}
left.Find("Main/Name").GetComponent<Text>().text = $"{result.CreateTime.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss")} {typeStr} Rowing";
left.Find("Main/Time").GetComponent<Text>().text = $"{result.StartTime.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss")} ~ {result.CreateTime.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss")}";
var rect = left.Find("Main").GetComponent<RectTransform>();
rect.sizeDelta = new Vector2(399,rect.sizeDelta.y);
@@ -108,7 +129,14 @@ public class RouteItem : MonoBehaviour
{
UIManager.AddEvent(btnDetail.gameObject, EventTriggerType.PointerClick, b =>
{
UIManager.ShowRowerResult(result.Id);
//UIManager.ShowActivityPanel("http://192.168.0.101:3081/rower/record/27C0BE5C-3818-45D0-A2FD-681AC2ACFB64?UserId=16650");
#if UNITY_ANDROID || UNITY_IOS
UIManager.ShowActivityPanel($"{App.websiteDict[App.Host]}rower/record/{result.Id}?UserId={App.CurrentUser.Id}");
#else
Application.OpenURL($"{App.websiteDict[App.Host]}rower/record/{result.Id}?Token={App.CurrentUser.cookie}");
#endif
//Application.OpenURL($"{App.websiteDict[App.Host]}rower/record/{result.Id}?Token={App.CurrentUser.cookie}");
//UIManager.ShowRowerResult(result.Id);
});
}
btnReRide = right.Find("BtnRide");
@@ -119,7 +147,7 @@ public class RouteItem : MonoBehaviour
UIManager.ShowConfirm("Re-Rowing", "Rowing again?", () =>
{
UIManager.CloseConfirm();
UIManager.ShowRowerPanel();
UIManager.ShowRowerPanel(result);
});
});
}