From 91e873880b94f60df772266f2937b907a4872521 Mon Sep 17 00:00:00 2001 From: huyufei Date: Wed, 7 Aug 2024 23:50:12 +0800 Subject: [PATCH] =?UTF-8?q?update=EF=BC=9A=20=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyufei --- .../Runtime/Analytics/Analytics.Property.cs | 17 ----------------- Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs | 11 ++++------- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/Runtime/GuruCore/Runtime/Analytics/Analytics.Property.cs b/Runtime/GuruCore/Runtime/Analytics/Analytics.Property.cs index ed16af0..60b3b6c 100644 --- a/Runtime/GuruCore/Runtime/Analytics/Analytics.Property.cs +++ b/Runtime/GuruCore/Runtime/Analytics/Analytics.Property.cs @@ -32,23 +32,6 @@ namespace Guru get => PlayerPrefs.GetInt(nameof(BPlay), 0); set => PlayerPrefs.SetInt(nameof(BPlay), value); } - /// - /// 首次启动时间 - /// - public static string FirstOpenTime - { - get - { - var stamp = PlayerPrefs.GetString(nameof(FirstOpenTime), ""); - if (string.IsNullOrEmpty(stamp)) - { - stamp = TimeUtil.GetCurrentTimeStamp().ToString(); - PlayerPrefs.SetString(nameof(FirstOpenTime), stamp); - } - return stamp; - } - } - #endregion diff --git a/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs b/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs index 5c67547..ace5bdf 100644 --- a/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs +++ b/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs @@ -12,10 +12,9 @@ namespace Guru public abstract class IAPServiceBase: IStoreListener where T: IAPServiceBase , new() { + private const int OrderRequestTimeout = 10; + private const int OrderRequestRetryTimes = 3; - public static readonly int OrderRequestTimeout = 10; - public static readonly int OrderRequestRetryTimes = 3; - #region 属性定义 private const string Tag = "[IAP]"; @@ -802,8 +801,6 @@ namespace Guru Debug.Log($"[IAP] --- Full receipt: \n{args.purchasedProduct.receipt}"); #endif - - allReceipts = _validator.Validate(args.purchasedProduct.receipt); // ---- Android 订单验证, 上报打点信息 ---- @@ -920,11 +917,11 @@ namespace Guru /// 标记是否为付费用户 /// /// - public static void SetIsIAPUser(bool value = true) + private static void SetIsIAPUser(bool value = true) { if (Instance != null && Instance._model != null && value) { - Instance._model.SetIsIapUser(value); // 用户属性 + Instance._model.SetIsIapUser(true); // 用户属性 } Analytics.SetIsIapUser(value); }