更新BridgeFunc
Made-with: Cursor
This commit is contained in:
@@ -15,6 +15,8 @@ namespace tysdk
|
|||||||
{
|
{
|
||||||
public class AccountInfo
|
public class AccountInfo
|
||||||
{
|
{
|
||||||
|
public const string hwVkid = "vk.global.app";
|
||||||
|
|
||||||
public int userId;
|
public int userId;
|
||||||
public string token;
|
public string token;
|
||||||
public string jwtToken;
|
public string jwtToken;
|
||||||
|
|||||||
@@ -61,8 +61,11 @@ namespace tysdk
|
|||||||
|
|
||||||
public static void FBShareLink(string title, string content, string url) { }
|
public static void FBShareLink(string title, string content, string url) { }
|
||||||
public static void MessengerShareLink(string title, string content, string url) { }
|
public static void MessengerShareLink(string title, string content, string url) { }
|
||||||
|
|
||||||
|
private static string EAccountTypeToStr(EAccoutType accoutType)
|
||||||
|
{
|
||||||
|
return accoutType == EAccoutType.hwVkid ? TYSdkFacade.AccountInfo.hwVkid : accoutType.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
#elif UNITY_ANDROID
|
#elif UNITY_ANDROID
|
||||||
|
|
||||||
@@ -107,10 +110,12 @@ namespace tysdk
|
|||||||
|
|
||||||
public static void UnityLogin(EAccoutType accoutType)
|
public static void UnityLogin(EAccoutType accoutType)
|
||||||
{
|
{
|
||||||
|
var accountInfo = EAccountTypeToStr(accoutType);
|
||||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||||
{
|
{
|
||||||
sdkManager.CallStatic("UnityLogin", accoutType.ToString());
|
sdkManager.CallStatic("UnityLogin",accountInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void UnityGetIdentityFun(string type)
|
public static void UnityGetIdentityFun(string type)
|
||||||
@@ -124,18 +129,20 @@ namespace tysdk
|
|||||||
public static void UnityLogOutByChannel(EAccoutType accoutType)
|
public static void UnityLogOutByChannel(EAccoutType accoutType)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
var accountInfo = EAccountTypeToStr(accoutType);
|
||||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||||
{
|
{
|
||||||
sdkManager.CallStatic("UnityLogOutByChannel", accoutType.ToString());
|
sdkManager.CallStatic("UnityLogOutByChannel", accountInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void LinkAccount(EAccoutType accoutType)
|
public static void LinkAccount(EAccoutType accoutType)
|
||||||
{
|
{
|
||||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
string userId = TYSdkFacade.TYAccountInfo.strUserId;
|
||||||
|
using (var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||||
{
|
{
|
||||||
string userId = TYSdkFacade.TYAccountInfo.strUserId;
|
var accountInfo = EAccountTypeToStr(accoutType);
|
||||||
sdkManager.CallStatic("LinkAccount", accoutType.ToString(), userId);
|
sdkManager.CallStatic("LinkAccount",accountInfo,userId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,17 +158,19 @@ namespace tysdk
|
|||||||
|
|
||||||
public static void ChangeLinkAccount(EAccoutType accoutType, int oldUserId, int newUserId)
|
public static void ChangeLinkAccount(EAccoutType accoutType, int oldUserId, int newUserId)
|
||||||
{
|
{
|
||||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
var accountInfo = EAccountTypeToStr(accoutType);
|
||||||
|
using (var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||||
{
|
{
|
||||||
sdkManager.CallStatic("ChangeLinkAccount", accoutType.ToString(), oldUserId, newUserId);
|
sdkManager.CallStatic("ChangeLinkAccount", accountInfo, oldUserId, newUserId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void LinkCheck(EAccoutType accoutType)
|
public static void LinkCheck(EAccoutType accoutType)
|
||||||
{
|
{
|
||||||
|
var accountInfo = EAccountTypeToStr(accoutType);
|
||||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||||
{
|
{
|
||||||
sdkManager.CallStatic("LinkCheck", accoutType.ToString());
|
sdkManager.CallStatic("LinkCheck",accountInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,6 +241,7 @@ namespace tysdk
|
|||||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||||
{
|
{
|
||||||
sdkManager.CallStatic("Review");
|
sdkManager.CallStatic("Review");
|
||||||
|
// sdkManager.CallStataic("RuStoreReview");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user