少年修仙传客户端代码仓库
client_Zxw
2018-09-17 90cd57232249a6d6ea2f69b373a432d0a9157883
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
3个文件已修改
52 ■■■■■ 已修改文件
System/Welfare/AwardExchangeWin.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Welfare/MultipleExpModel.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Welfare/OperationBase.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Welfare/AwardExchangeWin.cs
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
@@ -8,7 +9,7 @@
    {
        [SerializeField] InputField input;
        [SerializeField] Button receiveBtn;
        const string exchangeUrl = "http://center.2460web.com:53003/Coupon/CouponCode.php?";
        protected override void BindController()
        {
@@ -35,7 +36,7 @@
        protected override void OnAfterClose()
        {
        }
        private void InitUI()
@@ -51,7 +52,16 @@
                SysNotifyMgr.Instance.ShowTip("InputExchangeCode");
                return;
            }
            else
            {
                var tables = new Dictionary<string, string>();
                tables["channel"] = VersionConfig.Get().appId;
                tables["code"] = passward;
                tables["accid"] = SDKUtility.Instance.FreePlatformInfo.account;
                tables["sid"] = ServerListCenter.Instance.currentServer.region_flag.ToString();
                tables["pushurl"] = ServerListCenter.Instance.currentServer.region_domain;
                HttpRequest.Instance.RequestHttpGet(StringUtility.Contact(exchangeUrl, HttpRequest.HashtablaToString(tables)), HttpRequest.defaultHttpContentType, 1, null);
            }
        }
    }
}
System/Welfare/MultipleExpModel.cs
@@ -152,10 +152,36 @@
            return operation != null && operation.SatisfyOpenCondition() && operation.InDay(TimeUtility.ServerNow);
        }
        bool LastDayOutTime()
        {
            OperationBase operation;
            if (OperationTimeHepler.Instance.TryGetOperationTime(Operation.MultipleExp, out operation))
            {
                if (operation.allDay)
                {
                    return false;
                }
                if (operation.IsLastDay)
                {
                    bool outTime = true;
                    for (int i = 0; i < operation.times.Count; i++)
                    {
                        if (operation.times[i].CompareTime(TimeUtility.ServerNow) != 1)
                        {
                            outTime = false;
                            break;
                        }
                    }
                    return outTime;
                }
            }
            return false;
        }
        private void UpdateRedpoint()
        {
            multipleExpRedpoint.state = RedPointState.None;
            if (todayRemind || !Open())
            if (todayRemind || !Open() || LastDayOutTime())
            {
                multipleExpRedpoint.state = RedPointState.None;
                return;
System/Welfare/OperationBase.cs
@@ -42,6 +42,14 @@
            get { return endDate - startDate; }
        }
        public bool IsLastDay
        {
            get
            {
                return IndexOfDays(TimeUtility.ServerNow) == totalDays;
            }
        }
        public bool InTime(DateTime time)
        {
            if (!InDay(time))