登录页调整 增加半圆角组件 基本完成路线列表功能 基本完成骑行列表 开始做编辑页

This commit is contained in:
Caiyanpeng committed 2021-04-14 17:57:52 +08:00
1 parent 5156473bb2
commit 10e738f958
100 files changed
+20085 -11852

No files matched your search

@@ -21,10 +21,10 @@ namespace Assets.Scripts.UI.Prefab.Login
}
return op.options;
}
public static List<Dropdown.OptionData> dayOption28 = SetOptions(28);
public static List<Dropdown.OptionData> dayOption29 = SetOptions(29);
public static List<Dropdown.OptionData> dayOption30 = SetOptions(30);
public static List<Dropdown.OptionData> dayOption31 = SetOptions(31);
public static Dictionary<int, List<Dropdown.OptionData>> dayOption = new Dictionary<int, List<Dropdown.OptionData>>()
{
{28,SetOptions(28) },{29,SetOptions(29) },{30,SetOptions(30) },{31,SetOptions(31) }
};
}
public class CountryModel
{
@@ -76,22 +76,8 @@ namespace Assets.Scripts.UI.Prefab.Login
}
public List<Dropdown.OptionData> GetDayOptions(int year,int month)
{
if (new int[] { 1, 3, 5, 7, 8, 10, 12 }.Contains(month))
{
return DayOptions.dayOption31;
}
else if (new int[] { 4, 6, 9, 11 }.Contains(month))
{
return DayOptions.dayOption30;
}
else if (month == 2)
{
return DateTime.IsLeapYear(year) ? DayOptions.dayOption29 : DayOptions.dayOption28;
}
else
{
return days;
}
int day = DateTime.DaysInMonth(year, month);
return DayOptions.dayOption[day];
}
}
}