hch
4 天以前 df03c997716c6f5fbd4b87c01caef1d2e75165fc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using UnityEngine;
using UnityEngine.UI;
 
 
/// <summary>
/// 淘金自动续费
/// </summary>
public class GoldRushAutoBuyWin : UIBase
{
    [SerializeField] Text timeText;
 
    [SerializeField] Button closeBtn;
    [SerializeField] Button buyBtn;
    [SerializeField] Text buyText;
    [SerializeField] Text buyTipsText;
 
 
 
    protected override void InitComponent()
    {
        closeBtn.AddListener(CloseWindow);
        buyBtn.AddListener(Buy);
    }
 
 
 
    protected override void OnPreOpen()
    {
        Display();
    }
 
 
    void Display()
    { 
        var endTime = GoldRushManager.Instance.housekeeperEndTime;
        if (endTime > 0 && TimeUtility.AllSeconds < endTime)
        {
            //续费
            buyTipsText.text = Language.Get("GoldRush45", GoldRushManager.Instance.buyAutoDaysList[0]);
            RechargeManager.Instance.TryGetOrderInfo(GoldRushManager.Instance.buyAutoCTGIDList[0], out var orderInfo);
            buyText.text = Language.Get("PayMoneyNum", orderInfo.PayRMBNumOnSale);
            timeText.text = Language.Get("GoldRush48") + TimeUtility.SecondsToShortDHMS(endTime - TimeUtility.AllSeconds);
        }
    }
 
 
 
    void Buy()
    {
        RechargeManager.Instance.CTG(GoldRushManager.Instance.buyAutoCTGIDList[0]);
    }
 
}