|
@@ -341,6 +341,7 @@ namespace GFGGame
|
|
|
RefreshBtnActivityFYJY();
|
|
|
RefreshBtnXdmhActivity();
|
|
|
}
|
|
|
+ RefreshBtnYuanXiaoActivity();
|
|
|
}
|
|
|
|
|
|
private void RefreshBtnNewYearRedEnvelope()
|
|
@@ -1617,6 +1618,78 @@ namespace GFGGame
|
|
|
RefreshBtnActivityFYJY();
|
|
|
RefreshBtnXdmhActivity();
|
|
|
}
|
|
|
+
|
|
|
+ private void ServerTimeUpdate(object param = null)
|
|
|
+ {
|
|
|
+ long timestamp = (long)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalMilliseconds;
|
|
|
+ if (Math.Abs(TimeHelper.ServerNow() - timestamp) >= 60000)
|
|
|
+ {
|
|
|
+ dateTime = unixStartTime.AddMilliseconds(TimeHelper.ServerNow());
|
|
|
+ _ui.m_serverTime.text = dateTime.ToString();
|
|
|
+ _ui.m_serverTime.visible = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _ui.m_serverTime.visible = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void HideMainUI()
|
|
|
+ {
|
|
|
+ _ui.m_hide.Play();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void ShowMainUI()
|
|
|
+ {
|
|
|
+ _ui.m_show.Play();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void OnClickBtnGetYuanXiao()
|
|
|
+ {
|
|
|
+ ViewManager.Show<ActivityGetYuanXiaoEntryView>();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void OnClickBtnGetZhongQiu()
|
|
|
+ {
|
|
|
+ ViewManager.Show<TurnTableView>();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void OnClickBtnFYJY()
|
|
|
+ {
|
|
|
+ ViewManager.Show<ActivityHuaRongDaoEntryView>(5016);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void OnClickBtnXDMH()
|
|
|
+ {
|
|
|
+ ViewManager.Show<BlindBoxView>();
|
|
|
+ }
|
|
|
+
|
|
|
+ public static bool IsOutsideWorkingHours()
|
|
|
+ {
|
|
|
+ // 获取当前时间
|
|
|
+ DateTime now = DateTime.Now;
|
|
|
+
|
|
|
+ // 判断今天是否是星期一到星期五(DayOfWeek.Monday 到 DayOfWeek.Friday)
|
|
|
+ if (now.DayOfWeek >= DayOfWeek.Monday && now.DayOfWeek <= DayOfWeek.Friday)
|
|
|
+ {
|
|
|
+ // 判断当前时间是否在 10:00 到 19:00 之间
|
|
|
+ if (now.Hour >= 10 && now.Hour < 19)
|
|
|
+ {
|
|
|
+ return false; // 在工作时间内返回 false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ // 判断当前时间是否在 10:00 到 19:00 之间
|
|
|
+ if (now.Hour >= 10 && now.Hour < 11)
|
|
|
+ {
|
|
|
+ return false; // 在工作时间内返回 false
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 否则,返回 true
|
|
|
+ return true;
|
|
|
+ }
|
|
|
|
|
|
private void CheckAutoShowViews()
|
|
|
{
|
|
@@ -1626,17 +1699,23 @@ namespace GFGGame
|
|
|
if (GameGlobal.AutoShowCompleted) return;
|
|
|
|
|
|
#if !GFGZSB
|
|
|
- int isRegisterRoleInfo = GameGlobal.myNumericComponent.GetAsInt(NumericType.IsRegisterRoleInfo);
|
|
|
- if (isRegisterRoleInfo == 0)
|
|
|
+ if (LauncherConfig.ChannelId != 101)
|
|
|
{
|
|
|
- ViewManager.Show<RoleInfoRegisterView>();
|
|
|
- return;
|
|
|
+ int isRegisterRoleInfo = GameGlobal.myNumericComponent.GetAsInt(NumericType.IsRegisterRoleInfo);
|
|
|
+ if (isRegisterRoleInfo == 0)
|
|
|
+ {
|
|
|
+ ViewManager.Show<RoleInfoRegisterView>();
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
- if (LauncherConfig.platformId == 1 && LauncherConfig.ChannelId == (int)ChannelID.DouYou)
|
|
|
+
|
|
|
+ if (IsOutsideWorkingHours())
|
|
|
{
|
|
|
- ViewManager.Show<QieHuanView>();
|
|
|
- return;
|
|
|
+ if (LauncherConfig.platformId == 1 && LauncherConfig.ChannelId == (int)ChannelID.DouYou)
|
|
|
+ {
|
|
|
+ ViewManager.Show<QieHuanView>();
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
#endif
|
|
|
|
|
@@ -1813,50 +1892,5 @@ namespace GFGGame
|
|
|
|
|
|
GameGlobal.AutoShowCompleted = true;
|
|
|
}
|
|
|
-
|
|
|
- private void ServerTimeUpdate(object param = null)
|
|
|
- {
|
|
|
- long timestamp = (long)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalMilliseconds;
|
|
|
- if (Math.Abs(TimeHelper.ServerNow() - timestamp) >= 60000)
|
|
|
- {
|
|
|
- dateTime = unixStartTime.AddMilliseconds(TimeHelper.ServerNow());
|
|
|
- _ui.m_serverTime.text = dateTime.ToString();
|
|
|
- _ui.m_serverTime.visible = true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- _ui.m_serverTime.visible = false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- private void HideMainUI()
|
|
|
- {
|
|
|
- _ui.m_hide.Play();
|
|
|
- }
|
|
|
-
|
|
|
- private void ShowMainUI()
|
|
|
- {
|
|
|
- _ui.m_show.Play();
|
|
|
- }
|
|
|
-
|
|
|
- private void OnClickBtnGetYuanXiao()
|
|
|
- {
|
|
|
- ViewManager.Show<ActivityGetYuanXiaoEntryView>();
|
|
|
- }
|
|
|
-
|
|
|
- private void OnClickBtnGetZhongQiu()
|
|
|
- {
|
|
|
- ViewManager.Show<TurnTableView>();
|
|
|
- }
|
|
|
-
|
|
|
- private void OnClickBtnFYJY()
|
|
|
- {
|
|
|
- ViewManager.Show<ActivityHuaRongDaoEntryView>(5016);
|
|
|
- }
|
|
|
-
|
|
|
- private void OnClickBtnXDMH()
|
|
|
- {
|
|
|
- ViewManager.Show<BlindBoxView>();
|
|
|
- }
|
|
|
}
|
|
|
}
|