update: 代码优化
Signed-off-by: huyufei <yufei.hu@castbox.fm>
							parent
							
								
									1456a08003
								
							
						
					
					
						commit
						91e873880b
					
				|  | @ -32,23 +32,6 @@ namespace Guru | |||
|             get => PlayerPrefs.GetInt(nameof(BPlay), 0); | ||||
|             set => PlayerPrefs.SetInt(nameof(BPlay), value); | ||||
|         } | ||||
|         /// <summary> | ||||
|         /// 首次启动时间 | ||||
|         /// </summary> | ||||
|         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 | ||||
| 
 | ||||
|  |  | |||
|  | @ -12,9 +12,8 @@ namespace Guru | |||
|      | ||||
|     public abstract class IAPServiceBase<T>: IStoreListener where T: IAPServiceBase<T> , new() | ||||
|     { | ||||
| 
 | ||||
|         public static readonly int OrderRequestTimeout = 10; | ||||
|         public static readonly int OrderRequestRetryTimes = 3; | ||||
|         private const int OrderRequestTimeout = 10; | ||||
|         private const int OrderRequestRetryTimes = 3; | ||||
| 
 | ||||
|         #region 属性定义 | ||||
| 
 | ||||
|  | @ -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 | |||
|         /// 标记是否为付费用户 | ||||
|         /// </summary> | ||||
|         /// <param name="value"></param> | ||||
|         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); | ||||
|         } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue