update:合并代码
This commit is contained in:
@@ -100,18 +100,18 @@ namespace tysdk
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public List<SKUDetail> BaseReadSkuFromData(string productData)
|
// public List<SKUDetail> BaseReadSkuFromData(string productData)
|
||||||
{
|
// {
|
||||||
var jsonObjList = JsonConvert.DeserializeObject<List<SKUDetail>>(productData);
|
// var jsonObjList = JsonConvert.DeserializeObject<List<SKUDetail>>(productData);
|
||||||
products = jsonObjList;
|
// products = jsonObjList;
|
||||||
return jsonObjList;
|
// return jsonObjList;
|
||||||
}
|
// }
|
||||||
public List<SKUDetail> ReadSkuFromData(string productData, EAccoutType accountChannel)
|
// public List<SKUDetail> ReadSkuFromData(string productData, EAccoutType accountChannel)
|
||||||
{
|
// {
|
||||||
var jsonObjList = JsonConvert.DeserializeObject<List<SKUDetail>>(productData);
|
// var jsonObjList = JsonConvert.DeserializeObject<List<SKUDetail>>(productData);
|
||||||
products = jsonObjList;
|
// products = jsonObjList;
|
||||||
return jsonObjList;
|
// return jsonObjList;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
#if UNITY_IOS
|
#if UNITY_IOS
|
||||||
@@ -146,10 +146,11 @@ namespace tysdk
|
|||||||
public string price;
|
public string price;
|
||||||
public string title;
|
public string title;
|
||||||
public string currency;
|
public string currency;
|
||||||
|
public string price_amount; //- 具体的值
|
||||||
//- 防止编译报错
|
//- 防止编译报错
|
||||||
public string price_currency_code => currency;
|
public string price_currency_code => currency;
|
||||||
|
|
||||||
public string ProdPriceStr => price;
|
public string ProdPriceStr => $"₽{ProdPrice}";
|
||||||
public float ProdPrice => float.Parse(price) / 100 ;
|
public float ProdPrice => float.Parse(price) / 100 ;
|
||||||
public string ProdID => ourProductId;
|
public string ProdID => ourProductId;
|
||||||
public string ProdKey => productId;
|
public string ProdKey => productId;
|
||||||
|
|||||||
@@ -142,20 +142,15 @@ namespace tysdk
|
|||||||
|
|
||||||
public static void LinkAccount(EAccoutType accoutType)
|
public static void LinkAccount(EAccoutType accoutType)
|
||||||
{
|
{
|
||||||
|
string userId = TYSdkFacade.TYAccountInfo.strUserId;
|
||||||
|
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||||
if (accoutType == EAccoutType.hwVkid)
|
if (accoutType == EAccoutType.hwVkid)
|
||||||
{
|
{
|
||||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
sdkManager.CallStatic("LinkAccount",AccountInfo.hwVkid,userId);
|
||||||
{
|
|
||||||
sdkManager.CallStatic("LinkAccount",AccountInfo.hwVkid);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
sdkManager.CallStatic("LinkAccount", accoutType.ToString(), userId);
|
||||||
{
|
|
||||||
string userId = TYSdkFacade.TYAccountInfo.strUserId;
|
|
||||||
sdkManager.CallStatic("LinkAccount", accoutType.ToString(), userId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user