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