| | |
| | | OperationBase operationBase;
|
| | | OperationTimeHepler.Instance.TryGetOperationTime(Operation.FlashSale, out operationBase);
|
| | | var seconds = 0;
|
| | | var inAdvance = false;
|
| | | if (operationBase != null)
|
| | | {
|
| | | OperationFlashSale operation = operationBase as OperationFlashSale;
|
| | | seconds = operation.GetResetSurplusTime();
|
| | | if (operationBase.InAdvanceTime(TimeUtility.ServerNow))
|
| | | {
|
| | | inAdvance = true;
|
| | | seconds = operationBase.GetSecondsBeforeStart(TimeUtility.ServerNow);
|
| | | }
|
| | | else
|
| | | {
|
| | | OperationFlashSale operation = operationBase as OperationFlashSale;
|
| | | seconds = operation.GetResetSurplusTime();
|
| | | }
|
| | | }
|
| | | if (seconds > 0)
|
| | | {
|
| | | m_SurplusTime.text = Language.Get("LimitGift1", TimeUtility.SecondsToDHMSCHS(seconds));
|
| | | if (inAdvance)
|
| | | {
|
| | | m_SurplusTime.text = string.Format("{0}之后开启", TimeUtility.SecondsToDHMSCHS(seconds));
|
| | | }
|
| | | else
|
| | | {
|
| | | m_SurplusTime.text = Language.Get("LimitGift1", TimeUtility.SecondsToDHMSCHS(seconds));
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|