parent
b728102800
commit
9b4870c91a
|
|
@ -7,6 +7,7 @@ namespace Guru
|
||||||
using System;
|
using System;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
public class IAPModel
|
public class IAPModel
|
||||||
{
|
{
|
||||||
public static readonly float SaveInterval = 3;
|
public static readonly float SaveInterval = 3;
|
||||||
|
|
@ -14,7 +15,8 @@ namespace Guru
|
||||||
|
|
||||||
public static readonly string PlatformAndroid = "android";
|
public static readonly string PlatformAndroid = "android";
|
||||||
public static readonly string PlatformIOS = "ios";
|
public static readonly string PlatformIOS = "ios";
|
||||||
|
|
||||||
|
public bool isIapUser = false;
|
||||||
public int buyCount = 0;
|
public int buyCount = 0;
|
||||||
public List<string> androidTokens;
|
public List<string> androidTokens;
|
||||||
public List<string> iosReceipts;
|
public List<string> iosReceipts;
|
||||||
|
|
@ -219,12 +221,17 @@ namespace Guru
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
buyCount = value;
|
buyCount = value;
|
||||||
|
if (buyCount > 0 && isIapUser == false) isIapUser = true;
|
||||||
Save();
|
Save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void SetIsIapUser(bool isIap)
|
||||||
|
{
|
||||||
|
isIapUser = isIap;
|
||||||
|
Save();
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -881,6 +881,7 @@ namespace Guru
|
||||||
/// <param name="value"></param>
|
/// <param name="value"></param>
|
||||||
public static void SetIsIAPUser(bool value = true)
|
public static void SetIsIAPUser(bool value = true)
|
||||||
{
|
{
|
||||||
|
Instance._model.SetIsIapUser(value); // 用户属性
|
||||||
Analytics.SetUserProperty(Analytics.PropertyIsIAPUser, value ? "true" : "false");
|
Analytics.SetUserProperty(Analytics.PropertyIsIAPUser, value ? "true" : "false");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue