| | |
| | | OperationFlashSale operation = operationBase as OperationFlashSale;
|
| | | m_OpreationTime.text = StringUtility.Contact(Language.Get("ExpActivity_Text1"), operation.ToDisplayTime());
|
| | | m_RefreshGiftTime.gameObject.SetActive(operation.allDay);
|
| | | var index = operation.IndexOfFlashShop();
|
| | | if (index != -1 && index < operation.flashShops.Count)
|
| | | OperationFlashSale.FlashSale flashSale;
|
| | | if (operation.TryGetFlashSale(TimeUtility.ServerNow, out flashSale))
|
| | | {
|
| | | var flashSale = operation.flashShops[index];
|
| | | if (flashSale.gifts.Length > 0)
|
| | | {
|
| | | var moneyType = flashSale.gifts[0].moneyType;
|
| | |
| | | if (i < flashSale.gifts.Length)
|
| | | {
|
| | | m_FlashSaleBehaviours[i].gameObject.SetActive(true);
|
| | | m_FlashSaleBehaviours[i].Display(index, flashSale.gifts[i].id);
|
| | | m_FlashSaleBehaviours[i].Display(flashSale.gifts[i]);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | 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.GetSurplusTime(operation.IndexOfFlashShop());
|
| | | 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
|
| | | {
|