| | |
| | | var _result = "default"; |
| | | switch (Application.platform) |
| | | { |
| | | case RuntimePlatform.Android:
|
| | | case RuntimePlatform.Android: |
| | | _result = "android"; |
| | | break; |
| | | case RuntimePlatform.IPhonePlayer: |
| | |
| | | public void FreePlatformPay(string title, float money, string cpInfo) |
| | | { |
| | | // 提示是否使用代金券 |
| | | // var gameCash = UIHelper.GetAllVourcher(); |
| | | var gameCash = UIHelper.GetAllVourcher(); |
| | | |
| | | // bool isBuyGameCash = false; //代金券本身的充值不能用代金券购买 造成循环 |
| | | // int ctgID = ModelCenter.Instance.GetModel<VipModel>().orderInfoToCTGID[cpInfo]; |
| | | // if (ctgID != 0) |
| | | // { |
| | | // isBuyGameCash = CTGConfig.Get(ctgID).PayType == 17; |
| | | // } |
| | | bool isBuyGameCash = false; //代金券本身的充值不能用代金券购买 造成循环 |
| | | int ctgID = RechargeManager.Instance.orderInfoToCTGID[cpInfo]; |
| | | if (ctgID != 0) |
| | | { |
| | | isBuyGameCash = CTGConfig.Get(ctgID).PayType == 17; |
| | | } |
| | | |
| | | |
| | | // if (!isBuyGameCash && gameCash >= money * 100 && !LoginAwardModel.rechargeLimit.Contains(ctgID)) |
| | | // { |
| | | if (!isBuyGameCash && gameCash >= money * 100) |
| | | { |
| | | |
| | | // WindowCenter.Instance.Close<GotoChargeWin>(); |
| | | // if (DayRemind.Instance.GetDayRemind(DayRemind.DJQTip)) |
| | | // { |
| | | // var pack = new CA125_tagCMCoinBuyOrderInfo(); |
| | | // pack.AppID = VersionConfig.Get().appId; |
| | | // pack.AppIDLen = (byte)pack.AppID.Length; |
| | | // pack.OrderInfo = cpInfo; |
| | | // pack.OrderInfoLen = (byte)pack.OrderInfo.Length; |
| | | // GameNetSystem.Instance.SendInfo(pack); |
| | | // } |
| | | // else |
| | | // { |
| | | // ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), Language.Get("GameCashRule1", money), Language.Get("TodayNoNotify"), (bool isOk, bool isToggle) => |
| | | // { |
| | | // if (isOk) |
| | | // { |
| | | // var pack = new CA125_tagCMCoinBuyOrderInfo(); |
| | | // pack.AppID = VersionConfig.Get().appId; |
| | | // pack.AppIDLen = (byte)pack.AppID.Length; |
| | | // pack.OrderInfo = cpInfo; |
| | | // pack.OrderInfoLen = (byte)pack.OrderInfo.Length; |
| | | // GameNetSystem.Instance.SendInfo(pack); |
| | | // } |
| | | // if (isToggle) |
| | | // { |
| | | // DayRemind.Instance.SetDayRemind(DayRemind.DJQTip, true); |
| | | // } |
| | | // }); |
| | | // } |
| | | // } |
| | | // else |
| | | // { |
| | | // FreePlatformPayEx(title, money, cpInfo); |
| | | // } |
| | | UIManager.Instance.CloseWindow<GotoChargeWin>(); |
| | | if (DayRemind.Instance.GetDayRemind(DayRemind.DJQTip)) |
| | | { |
| | | var pack = new CA125_tagCMCoinBuyOrderInfo(); |
| | | pack.AppID = VersionConfig.Get().appId; |
| | | pack.AppIDLen = (byte)pack.AppID.Length; |
| | | pack.OrderInfo = cpInfo; |
| | | pack.OrderInfoLen = (byte)pack.OrderInfo.Length; |
| | | GameNetSystem.Instance.SendInfo(pack); |
| | | } |
| | | else |
| | | { |
| | | ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), Language.Get("GameCashRule1", money), Language.Get("TodayNoNotify"), (bool isOk, bool isToggle) => |
| | | { |
| | | if (isOk) |
| | | { |
| | | var pack = new CA125_tagCMCoinBuyOrderInfo(); |
| | | pack.AppID = VersionConfig.Get().appId; |
| | | pack.AppIDLen = (byte)pack.AppID.Length; |
| | | pack.OrderInfo = cpInfo; |
| | | pack.OrderInfoLen = (byte)pack.OrderInfo.Length; |
| | | GameNetSystem.Instance.SendInfo(pack); |
| | | } |
| | | if (isToggle) |
| | | { |
| | | DayRemind.Instance.SetDayRemind(DayRemind.DJQTip, true); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | FreePlatformPayEx(title, money, cpInfo); |
| | | } |
| | | } |
| | | |
| | | public void FreePlatformPayEx(string title, float money, string cpInfo) |