diff --git a/Assets/CrazyZoo/Runtime/Logic/Manager/NetworkManager.cs b/Assets/CrazyZoo/Runtime/Logic/Manager/NetworkManager.cs index f4ce021..b7d3a6d 100644 --- a/Assets/CrazyZoo/Runtime/Logic/Manager/NetworkManager.cs +++ b/Assets/CrazyZoo/Runtime/Logic/Manager/NetworkManager.cs @@ -2,15 +2,18 @@ namespace ScrewsMaster { public class NetworkManager : BaseUnityManager { -#if JarvisRelease - public static string CrazyUrl = DomainReleaseUrl; -#else - public static string CrazyUrl = DomainDebugUrl; -#endif - public const string DomainDebugUrl = @"https://api.jsoncompare.online/"; - public static readonly string DomainReleaseUrl = $"https://{DomainRelease}/api/"; - public const string DomainRelease = "zoomatchsolo.top"; + public static string DomainRelease = "zoomatchsolo.top"; + + // 改为只读属性,实时获取(等调用时 DomainRelease 早就初始化好了) + public static string DomainReleaseUrl => $"https://{DomainRelease}/api/"; + + // 改为只读属性,实时获取 +#if JarvisRelease + public static string CrazyUrl => DomainReleaseUrl; +#else + public static string CrazyUrl => DomainDebugUrl; +#endif public static bool haveSimCard = false; private LoginSystem loginSystem; private ConfigSystem configSystem; diff --git a/Assets/CrazyZoo/Runtime/Logic/System/Network/LoginSystem.cs b/Assets/CrazyZoo/Runtime/Logic/System/Network/LoginSystem.cs index 0a87c1a..86d89f8 100644 --- a/Assets/CrazyZoo/Runtime/Logic/System/Network/LoginSystem.cs +++ b/Assets/CrazyZoo/Runtime/Logic/System/Network/LoginSystem.cs @@ -134,8 +134,8 @@ namespace ScrewsMaster } else { -#if BingoBrainRelease - BrigdeIOS.showGameA(true); +#if JarvisRelease + BrigdeIOS.showGameA(true); #else AppDispatcher.Instance.Dispatch(AppMsg.Show_uid); DOVirtual.DelayedCall(2, () => diff --git a/Assets/CrazyZoo/Runtime/Logic/ToolKit/NetworkKit.cs b/Assets/CrazyZoo/Runtime/Logic/ToolKit/NetworkKit.cs index 20fc280..b57340a 100644 --- a/Assets/CrazyZoo/Runtime/Logic/ToolKit/NetworkKit.cs +++ b/Assets/CrazyZoo/Runtime/Logic/ToolKit/NetworkKit.cs @@ -66,10 +66,10 @@ namespace ScrewsMaster } SetRequestContentType(loginRequest); - Debug.Log($"request url1======= {url1}"); + Debug.Log($"request url1======= {url1}"); yield return loginRequest.SendWebRequest(); - Debug.Log($"requestData11111======={url1}=={requestJson}"); - Debug.Log($"requestData22222====={url1}==={JsonConvert.SerializeObject(loginRequest)}"); + Debug.Log($"requestData11111======={url1}=={requestJson}"); + Debug.Log($"requestData22222====={url1}==={JsonConvert.SerializeObject(loginRequest)}"); if (loginRequest.result is not UnityWebRequest.Result.Success) { onCompleted?.Invoke(false, default); @@ -258,21 +258,22 @@ namespace ScrewsMaster */ public static void BuriedPoint(string eventname, string eventproperty, int integer) { - if (eventname == BuriedPointEvent.Apple_AD_event || eventname == BuriedPointEvent.Apple_pay_event) { - if (GameHelper.IsAdModelOfPay()) + if (eventname == BuriedPointEvent.Apple_AD_event || eventname == BuriedPointEvent.Apple_pay_event) + { + if (GameHelper.IsAdModelOfPay()) { eventname = BuriedPointEvent.Apple_AD_event; - } - else + } + else { - eventname = MaxPayManager.isIOSPay? BuriedPointEvent.Apple_ios_pay_event : BuriedPointEvent.Apple_pay_event; + eventname = MaxPayManager.isIOSPay ? BuriedPointEvent.Apple_ios_pay_event : BuriedPointEvent.Apple_pay_event; } } androidPointObject.@event = eventname; androidPointObject.property = eventproperty; androidPointObject.n = integer; - Debug.Log("打点"+JsonConvert.SerializeObject(androidPointObject)); + Debug.Log("打点" + JsonConvert.SerializeObject(androidPointObject)); PostWithHeader("/event/incrN", androidPointObject, (isSuccess, obj) => { }); @@ -458,6 +459,8 @@ namespace ScrewsMaster public static string three_day2_success = "three_day2_success"; public static string three_day3_success = "three_day3_success"; public static string Three_days_gift_event = "Three_days_gift_event"; + public static string BuyProp = "buy_prop"; + diff --git a/Assets/Scripts/PurchasingManager.cs b/Assets/Scripts/PurchasingManager.cs index 7566193..9527acc 100644 --- a/Assets/Scripts/PurchasingManager.cs +++ b/Assets/Scripts/PurchasingManager.cs @@ -7,7 +7,6 @@ using System.Collections.Generic; using System.Collections; using System.Linq; using ScrewsMaster; -using System.Text; public class PurchasingManager @@ -177,7 +176,7 @@ public class PurchasingManager { ApplePayClass data_ = statusDictionary[transactionID]; var test = new checkData(); - test.signedPayload = Encoding.UTF8.GetString(Base64Kit.Encrypt(Encoding.UTF8.GetBytes(transactionID),NetworkManager.packName)); + test.signedPayload = Base64Kit.Encode(transactionID, true); test.innerOrderId = data_.innerOrderId; NetworkKit.PostWithHeader("shop/applePayCheck", test, (isSuccess, obj) => {