提交
This commit is contained in:
@@ -83,30 +83,8 @@ namespace BingoBrain
|
||||
// HideLoadingUI();
|
||||
if (true)
|
||||
{
|
||||
WebviewManager.Instance.SetFullScreen();
|
||||
int flyswitch = ConfigSystem.GetConfig<CommonModel>().flyswitch;
|
||||
int propswitch = ConfigSystem.GetConfig<CommonModel>().propswitch;
|
||||
|
||||
int offset_y = ConfigSystem.GetConfig<CommonModel>().WVOffset[0];
|
||||
int offset_y1 = ConfigSystem.GetConfig<CommonModel>().WVOffset[1];
|
||||
Debug.Log("barry offset_y: " + offset_y + " offset_y1: " + offset_y1);
|
||||
float top_offset = 150;//fgui中的顶部信息的高度
|
||||
float buttom_offset = 0;
|
||||
if (Screen.safeArea.y != 0)
|
||||
{//刘海屏
|
||||
top_offset += Screen.safeArea.y;
|
||||
}
|
||||
WebviewManager.Instance.SetOffset(offset_y, offset_y1);
|
||||
WebviewManager.Instance.SetPadding(0, top_offset / GRoot.inst.height, 0, buttom_offset / GRoot.inst.height);
|
||||
|
||||
WebviewManager.Instance.RefreshUrl();
|
||||
// Debug.Log($"flyswitch==1 ------ {flyswitch == 1}");
|
||||
// Debug.Log($"propswitch==1 ------ {propswitch == 1}");
|
||||
WebviewManager.Instance.setFlyBtnTag(flyswitch == 1);
|
||||
WebviewManager.Instance.setRewardBtnTag(propswitch == 1);
|
||||
WebviewManager.Instance.SetDarkThough(true);
|
||||
WebviewManager.Instance.ShowH5View(false);
|
||||
WebviewManager.Instance.SetBtn(ConfigSystem.GetConfig<CommonModel>().propCoord[0], ConfigSystem.GetConfig<CommonModel>().propCoord[1], 60, 60);
|
||||
}
|
||||
});
|
||||
SaveingPotHelper.ResetHistory();
|
||||
@@ -118,7 +96,7 @@ namespace BingoBrain
|
||||
UICtrlDispatcher.Instance.Dispatch(SkinInfo.EnterBingoUI_Open);
|
||||
GameHelper.PostFunnelLogin("enterButtonShow");
|
||||
isopen = true;
|
||||
// LoginSystem_sdk.Instance.RequestLogin();
|
||||
LoginSystem_sdk.Instance.RequestLogin();
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace BingoBrain
|
||||
// Debug.Log($"barry hall-----{configs != null}");
|
||||
if (configs != null)
|
||||
{
|
||||
WebviewManager.Instance.RefreshUrl();
|
||||
// WebviewManager.Instance.RefreshUrl();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,8 +37,7 @@ namespace BingoBrain
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
WebviewManager.Instance.setInH5View(false);
|
||||
WebviewManager.Instance.ShowH5View(false);
|
||||
SdkManager.Instance.ShowH5View(false);
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
@@ -48,10 +47,9 @@ namespace BingoBrain
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
WebviewManager.Instance.setInH5View(true);
|
||||
// delayedCall = DOVirtual.DelayedCall(0.3f, () =>
|
||||
// {
|
||||
WebviewManager.Instance.ShowH5View(true);
|
||||
SdkManager.Instance.ShowH5View(true);
|
||||
ui.btn_close.SetClick(() =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(SkinInfo.H5UI_Close);
|
||||
|
||||
@@ -6,15 +6,7 @@ using UnityEditor;
|
||||
|
||||
public class BrigdeIOS
|
||||
{
|
||||
[DllImport("__Internal")]
|
||||
public static extern void OpenWebview(string url);
|
||||
[DllImport("__Internal")]
|
||||
public static extern void CloseWebview();
|
||||
[DllImport("__Internal")]
|
||||
public static extern void showDarkWebview();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void SetFullScreen();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void addH5Field(int field1, int field2, int field3, int field4, int field5, string field6, string field7, string dark_url, string light_url, bool is_gift, string web_through_str, string click_add_time);
|
||||
@@ -31,34 +23,24 @@ public class BrigdeIOS
|
||||
[DllImport("__Internal")]
|
||||
public static extern void SetBtn(int left, int top, int right, int bottom);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void SetCTEnable(bool flag);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void ShowH5View(bool flag);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void SetIconProgress(float val);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void SetClickView();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void ShowFlyBtn(bool flag);
|
||||
[DllImport("__Internal")]
|
||||
public static extern void setInH5View(bool flag);
|
||||
[DllImport("__Internal")]
|
||||
public static extern void upDataH5times(string weblink, int times, bool is_dark);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void setFlyBtnTag(bool flag);
|
||||
[DllImport("__Internal")]
|
||||
public static extern void setRewardBtnTag(bool flag);
|
||||
[DllImport("__Internal")]
|
||||
public static extern void SetOffset(int offset_y, int offset_y2);
|
||||
[DllImport("__Internal")]
|
||||
public static extern void copyText(string text);
|
||||
[DllImport("__Internal")]
|
||||
public static extern void showGameA(bool flag);
|
||||
public static extern void OpenWv();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -108,10 +108,10 @@ public class LoginSystem : BaseSystem
|
||||
BrigdeIOS.showGameA(true);
|
||||
#else
|
||||
AppDispatcher.Instance.Dispatch(CsjInfoC.Show_uid);
|
||||
DOVirtual.DelayedCall(2, () =>
|
||||
{
|
||||
BrigdeIOS.showGameA(true);
|
||||
});
|
||||
// DOVirtual.DelayedCall(2, () =>
|
||||
// {
|
||||
// BrigdeIOS.showGameA(true);
|
||||
// });
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -12,23 +12,9 @@ namespace BingoBrain.Core
|
||||
{
|
||||
public static void Init()
|
||||
{
|
||||
#if !UNITY_EDITOR
|
||||
// 注册 ab事件,0或1,0为自然量版本,1为激励版本
|
||||
MYp0ZVTT2QSDKHelper.Instance.RegistIosParam((i =>
|
||||
{
|
||||
BingoBea.Instance.attribution = i == 0 ? "organic" : "non_organic";
|
||||
Debug.Log($"ios ab param : {i} attribution=== {BingoBea.Instance.attribution}");
|
||||
NetworkDispatcher.Instance.Dispatch(NetworkMsg.Login);
|
||||
|
||||
}));
|
||||
NetworkDispatcher.Instance.Dispatch(NetworkMsg.Login);
|
||||
|
||||
void GameConfig(bool result, string config)
|
||||
{
|
||||
Debug.Log($"************* game config result : {result}, config : {config}");
|
||||
}
|
||||
// SDK初始化方法
|
||||
MYp0ZVTT2QSDKHelper.Instance.Init(null, null, GameConfig);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -50,35 +36,7 @@ namespace BingoBrain.Core
|
||||
#if UNITY_EDITOR
|
||||
onVideoAdCompleted?.Invoke(true);
|
||||
#else
|
||||
// TrackKit.SendEvent(VideoBehaviorTrack.Event, VideoBehaviorTrack.Property.watch_ad_people);
|
||||
// TrackKit.SendEvent(VideoBehaviorTrack.Event, VideoBehaviorTrack.Property.Rewarded_videos_trigger_number);
|
||||
|
||||
if (CheckRewardedReady())
|
||||
{
|
||||
MYp0ZVTT2QSDKHelper.Instance.ShowRewardVideo(_placement, b =>
|
||||
{
|
||||
DOVirtual.DelayedCall(0.1f, () =>
|
||||
{
|
||||
onVideoAdCompleted?.Invoke(b);
|
||||
});
|
||||
}, ()=>
|
||||
{
|
||||
DOVirtual.DelayedCall(0.2f, () =>
|
||||
{
|
||||
Debug.Log($"激励广告关闭");
|
||||
if (GameHelper.IsGiftSwitch() && !SaveData.GetSaveobject().is_get_removead && (UnityEngine.Random.Range(0, 100) < GameHelper.GetCommonModel().rewardinsertion))
|
||||
{
|
||||
// TrackKit.SendEvent(ADEventTrack.Event, ADEventTrack.Property.afterRewardAdShow);
|
||||
|
||||
GameHelper.ShowInterstitial("AfterReward");
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
onVideoAdCompleted?.Invoke(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -57,36 +57,7 @@ namespace DontConfuse
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
public void OpenWebView(string url)
|
||||
{
|
||||
//Debug.Log("[WebviewManager] OpenWebView");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.OpenWebview(url);
|
||||
#endif
|
||||
}
|
||||
public void showDarkWebview()
|
||||
{
|
||||
//Debug.Log("[WebviewManager] OpenWebView");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.showDarkWebview();
|
||||
#endif
|
||||
}
|
||||
|
||||
public void CloseWebview()
|
||||
{
|
||||
//Debug.Log("[WebviewManager] CloseWebview");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.CloseWebview();
|
||||
#endif
|
||||
}
|
||||
|
||||
public void SetOffset(int offset_y, int offset_y1)
|
||||
{
|
||||
// Debug.Log($"barry [WebviewManager] SetOffset:{offset_y}, {offset_y1}");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.SetOffset(offset_y, offset_y1);
|
||||
#endif
|
||||
}
|
||||
|
||||
public void SetPadding(float left, float top, float right, float bottom)
|
||||
{
|
||||
@@ -98,17 +69,6 @@ namespace DontConfuse
|
||||
public void SetDarkThough(bool though)
|
||||
{
|
||||
if (!GameHelper.IsGiftSwitch()) return;
|
||||
// if (though)
|
||||
// {
|
||||
// if (UI.Instance.IsExistUI(UIConst.LevelSuccessUI) || UI.Instance.IsExistUI(UIConst.MakeupConfirmUI) ||
|
||||
// UI.Instance.IsExistUI(UIConst.NewTaskUI) || UI.Instance.IsExistUI(UIConst.PackrewardUI) || UI.Instance.IsExistUI(UIConst.SaveingPotUI)
|
||||
// )
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// }
|
||||
// Debug.Log("[WebviewManager] SetPadding");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.SetDarkThough(though);
|
||||
#endif
|
||||
@@ -120,22 +80,6 @@ namespace DontConfuse
|
||||
BrigdeIOS.SetBtn(left, top, right, bottom);
|
||||
#endif
|
||||
}
|
||||
public void SetCTEnable(bool flag)
|
||||
{
|
||||
// Debug.Log("[WebviewManager] SetCTEnable");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.SetCTEnable(flag);
|
||||
#endif
|
||||
}
|
||||
|
||||
public void SetFullScreen()
|
||||
{
|
||||
// Debug.Log("[WebviewManager] SetFullScreen");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.SetFullScreen();
|
||||
#endif
|
||||
}
|
||||
|
||||
public void addH5Field(int field1, int field2, int field3, int field4, int field5, string field6, string field7, string dark_url, string light_url, bool is_gift, string web_through_str, string click_add_time)
|
||||
{
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
@@ -155,19 +99,6 @@ namespace DontConfuse
|
||||
// Debug.Log("[WebviewManager] SetCTEnable");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.SetIconProgress(val);
|
||||
#endif
|
||||
}
|
||||
public void setInH5View(bool flag)
|
||||
{
|
||||
// Debug.Log("[WebviewManager] SetCTEnable");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.setInH5View(flag);
|
||||
#endif
|
||||
}
|
||||
public void upDataH5times(string weblink, int times, bool is_dark)
|
||||
{
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.upDataH5times( weblink, times,is_dark);
|
||||
#endif
|
||||
}
|
||||
public void ShowFlyBtn(bool flag)
|
||||
@@ -371,7 +302,7 @@ namespace DontConfuse
|
||||
}
|
||||
}
|
||||
if (numbers < 0) numbers = 0;
|
||||
upDataH5times(temp_array[0], numbers, false);
|
||||
// upDataH5times(temp_array[0], numbers, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -393,7 +324,7 @@ namespace DontConfuse
|
||||
}
|
||||
}
|
||||
if (numbers < 0) numbers = 0;
|
||||
upDataH5times(temp_array[0], numbers, true);
|
||||
// upDataH5times(temp_array[0], numbers, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -161,22 +161,22 @@ NSInteger _forceInterfaceOrientationMask = 0;
|
||||
[UIApplication sharedApplication].statusBarHidden = YES;
|
||||
|
||||
|
||||
UIView* unityView = UnityGetGLView();
|
||||
|
||||
UIViewController *vc = [UIViewController new];
|
||||
vc.modalPresentationStyle = UIModalPresentationFullScreen;
|
||||
//[vc.view setFrame:self.window.bounds];
|
||||
//[vc.view setBackgroundColor:[UIColor orangeColor]];
|
||||
[self.window setRootViewController:vc];
|
||||
vc.modalPresentationStyle = UIModalPresentationFullScreen;
|
||||
[vc.view addSubview:unityView];
|
||||
H5View *hview;
|
||||
hview = [H5View shared];
|
||||
[vc.view addSubview:hview];
|
||||
|
||||
|
||||
[hview setFrame:self.window.bounds];
|
||||
[hview initView];
|
||||
// UIView* unityView = UnityGetGLView();
|
||||
//
|
||||
// UIViewController *vc = [UIViewController new];
|
||||
// vc.modalPresentationStyle = UIModalPresentationFullScreen;
|
||||
// //[vc.view setFrame:self.window.bounds];
|
||||
// //[vc.view setBackgroundColor:[UIColor orangeColor]];
|
||||
// [self.window setRootViewController:vc];
|
||||
// vc.modalPresentationStyle = UIModalPresentationFullScreen;
|
||||
// [vc.view addSubview:unityView];
|
||||
// H5View *hview;
|
||||
// hview = [H5View shared];
|
||||
// [vc.view addSubview:hview];
|
||||
//
|
||||
//
|
||||
// [hview setFrame:self.window.bounds];
|
||||
// [hview initView];
|
||||
CTTelephonyNetworkInfo *networkInfo = [[CTTelephonyNetworkInfo alloc] init];
|
||||
|
||||
if (@available(iOS 12.0, *)) {
|
||||
|
||||
+30341
-38711
File diff suppressed because it is too large
Load Diff
@@ -778,6 +778,50 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &462163429
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 462163431}
|
||||
- component: {fileID: 462163430}
|
||||
m_Layer: 0
|
||||
m_Name: SdkManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &462163430
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 462163429}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9e4a4fc2ee037174b95c916ef5475ee2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!4 &462163431
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 462163429}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &543681602
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -1314,3 +1358,4 @@ SceneRoots:
|
||||
- {fileID: 137049540}
|
||||
- {fileID: 1574430834}
|
||||
- {fileID: 395099095}
|
||||
- {fileID: 462163431}
|
||||
|
||||
@@ -9,7 +9,7 @@ using Newtonsoft.Json;
|
||||
using BingoBrain;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using DontConfuse;
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class ConfigSystem_sdk
|
||||
@@ -83,23 +83,6 @@ namespace BingoBrain
|
||||
AppDispatcher.Instance.Dispatch(CsjInfoC.LoginInit);
|
||||
GameHelper.PostFunnelLogin("loadFinish");
|
||||
}
|
||||
// else //没有就从StreamingAssets读取
|
||||
// {
|
||||
// var path = $"{Application.streamingAssetsPath}/Config/{configFileName}.txt";
|
||||
// #if UNITY_IOS
|
||||
// path = "file://" + path;
|
||||
// #endif
|
||||
// // Debug.Log($"[UNITY] Load config from streaming asset: {path}");
|
||||
// IsfvKit.StartCoroutine(CachKit.GetTextFromUrl(path, configFileName, content =>
|
||||
// {
|
||||
// ParseConfig(content);
|
||||
// // UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.NetLoadingUI_Close);
|
||||
// AppDispatcher.Instance.Dispatch(CsjInfoC.LoginInit);
|
||||
// GameHelper.PostFunnelLogin("loadFinish");
|
||||
// }, configFileSavePath));
|
||||
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
private void ParseConfig(string json)
|
||||
@@ -114,50 +97,86 @@ namespace BingoBrain
|
||||
{
|
||||
json = Encoding.UTF8.GetString(Base64Kit_sdk.Decrypt(Encoding.UTF8.GetBytes(json),
|
||||
"com.matchgame.captaindicedubloons"));
|
||||
// json = Base64Kit.Decode(json, "com.matchgame.captaindicedubloons");
|
||||
}
|
||||
Debug.Log("转化后的json" + json);
|
||||
SetConfig(json);
|
||||
if (true)
|
||||
|
||||
Debug.Log(LoginModel_sdk.Instance.reg_time);
|
||||
Debug.Log(GetRegisteredCalendarDaysByUTC(LoginModel_sdk.Instance.reg_time));
|
||||
int reg_days = GetRegisteredCalendarDaysByUTC(LoginModel_sdk.Instance.reg_time);
|
||||
bool open_dark_wv = true;
|
||||
if (SDKConfig.h6Conf.switchCondition != null)
|
||||
{
|
||||
for (int i = 0; i < SDKConfig.h6Conf.switchCondition.retentionConf.Count; i++)
|
||||
{
|
||||
if ((reg_days >= SDKConfig.h6Conf.switchCondition.retentionConf[i].days.min) &&
|
||||
(reg_days <= SDKConfig.h6Conf.switchCondition.retentionConf[i].days.max))
|
||||
{
|
||||
if (UnityEngine.Random.Range(0, 100) >= SDKConfig.h6Conf.switchCondition.retentionConf[i].prob)
|
||||
{
|
||||
open_dark_wv = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Debug.Log(open_dark_wv);
|
||||
if (open_dark_wv)
|
||||
{
|
||||
SdkManager.Instance.OpenWv();
|
||||
// int flyswitch = ConfigSystem.GetConfig<CommonModel>().flyswitch;
|
||||
// int propswitch = ConfigSystem.GetConfig<CommonModel>().propswitch;
|
||||
// float top_offset = 150;//fgui中的顶部信息的高度
|
||||
// float buttom_offset = 0;
|
||||
// if (Screen.safeArea.y != 0)
|
||||
// {//刘海屏
|
||||
// top_offset += Screen.safeArea.y;
|
||||
// }
|
||||
|
||||
// SdkManager.Instance.setFlyBtnTag(flyswitch == 1);
|
||||
// SdkManager.Instance.setRewardBtnTag(propswitch == 1);
|
||||
// SdkManager.Instance.SetBtn(ConfigSystem.GetConfig<CommonModel>().propCoord[0], ConfigSystem.GetConfig<CommonModel>().propCoord[1], 60, 60);
|
||||
// SdkManager.Instance.SetPadding(0, top_offset / GRoot.inst.height, 0, buttom_offset / GRoot.inst.height);
|
||||
SdkManager.Instance.SetDarkThough(true);
|
||||
SdkManager.Instance.ShowH5View(false);
|
||||
SdkManager.Instance.RefreshUrl();
|
||||
}
|
||||
// CtrlDispatcher.Instance.Dispatch(CtrlMsg.Game_StartBefore);
|
||||
}
|
||||
public int GetRegisteredCalendarDaysByUTC(long regTimeTimestamp)
|
||||
{
|
||||
// 1. 转换为 0时区 的日期部分(抹去具体时分秒,变成 00:00:00)
|
||||
DateTime regDateUtc = DateTimeOffset.FromUnixTimeSeconds(regTimeTimestamp).UtcDateTime.Date;
|
||||
|
||||
// 2. 获取当前 0时区 的日期部分
|
||||
DateTime nowDateUtc = DateTimeOffset.UtcNow.UtcDateTime.Date;
|
||||
|
||||
// 3. 两个 0时区的日期直接相减
|
||||
TimeSpan difference = nowDateUtc - regDateUtc;
|
||||
|
||||
int days = difference.Days;
|
||||
return days < 0 ? 0 : days;
|
||||
}
|
||||
public RootObject SDKConfig;
|
||||
private void SetConfig(string json_)
|
||||
{
|
||||
SDKConfig = JsonConvert.DeserializeObject<RootObject>(json_);
|
||||
|
||||
|
||||
// for (int i = 0; i < SDKConfig.h5Conf.links.Count; i++)
|
||||
// {
|
||||
// light_weblist.Add(data_new[i]);
|
||||
// }
|
||||
|
||||
|
||||
// List<int> type_list = new List<int>();
|
||||
|
||||
|
||||
// for (int i = 0; i < SDKConfig.h6Conf.layerConfList.Count; i++)
|
||||
// {
|
||||
|
||||
|
||||
|
||||
// dark_weblist.Add(data_new[i]);
|
||||
|
||||
// if (!type_list.Contains(data_new[i].wvType))
|
||||
// {
|
||||
// web_through_str += data_new[i].wvthrough;
|
||||
// web_through_str += "|";
|
||||
// type_list.Add(data_new[i].wvType);
|
||||
// }
|
||||
|
||||
|
||||
// }
|
||||
|
||||
// web_through_str.Remove(web_through_str.Length - 1);
|
||||
for (int i = 0; i < SDKConfig.h5Conf.links.Count; i++)
|
||||
{
|
||||
if (SDKConfig.h5Conf.links[i].maxF5Times < 0)
|
||||
{
|
||||
SDKConfig.h5Conf.links[i].maxF5Times = 99999;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < SDKConfig.h6Conf.layerConfList.Count; i++)
|
||||
{
|
||||
for (int j = 0; j < SDKConfig.h6Conf.layerConfList[i].links.Count; j++)
|
||||
{
|
||||
if (SDKConfig.h6Conf.layerConfList[i].links[j].maxF5Times < 0)
|
||||
{
|
||||
SDKConfig.h6Conf.layerConfList[i].links[j].maxF5Times = 99999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+70
-296
@@ -13,53 +13,53 @@ using BingoBrain.Core;
|
||||
using BingoBrain.HotFix;
|
||||
using Unity.VisualScripting.FullSerializer;
|
||||
using Unity.VisualScripting;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
|
||||
public class SdkManager : MonoBehaviour
|
||||
namespace DontConfuse
|
||||
{
|
||||
|
||||
private SdkManager()
|
||||
public class SdkManager : MonoBehaviour
|
||||
{
|
||||
}
|
||||
private static readonly SdkManager _instance = new SdkManager();
|
||||
private static SdkManager _instance;
|
||||
|
||||
// 供外部调用的公共属性
|
||||
public static SdkManager Instance
|
||||
{
|
||||
get { return _instance; }
|
||||
}
|
||||
|
||||
public void OpenWebView(string url)
|
||||
get
|
||||
{
|
||||
//Debug.Log("[WebviewManager] OpenWebView");
|
||||
// 如果实例为空,尝试在场景中寻找已经挂载的脚本
|
||||
if (_instance == null)
|
||||
{
|
||||
_instance = FindFirstObjectByType<SdkManager>();
|
||||
if (_instance == null)
|
||||
{
|
||||
Debug.LogError("场景中没有找到挂载 SdkManager 的物体!请确保场景中有一个 GameObject 挂载了该脚本。");
|
||||
}
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
private void Awake()
|
||||
{
|
||||
// 当场景加载时,如果 _instance 还没赋值,就由挂载在物体上的自己来赋值
|
||||
if (_instance == null)
|
||||
{
|
||||
_instance = this;
|
||||
DontDestroyOnLoad(gameObject); // 可选:如果跨场景不想被销毁,加上这行
|
||||
}
|
||||
else if (_instance != this)
|
||||
{
|
||||
// 防止场景里不小心挂载了多个 SdkManager, secondary 实例直接销毁,保证单例唯一
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
public void OpenWv()
|
||||
{
|
||||
// Debug.Log("[WebviewManager] SetPadding");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.OpenWebview(url);
|
||||
BrigdeIOS.OpenWv();
|
||||
#endif
|
||||
}
|
||||
public void showDarkWebview()
|
||||
{
|
||||
//Debug.Log("[WebviewManager] OpenWebView");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.showDarkWebview();
|
||||
#endif
|
||||
}
|
||||
|
||||
public void CloseWebview()
|
||||
{
|
||||
//Debug.Log("[WebviewManager] CloseWebview");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.CloseWebview();
|
||||
#endif
|
||||
}
|
||||
|
||||
public void SetOffset(int offset_y, int offset_y1)
|
||||
{
|
||||
// Debug.Log($"barry [WebviewManager] SetOffset:{offset_y}, {offset_y1}");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.SetOffset(offset_y, offset_y1);
|
||||
#endif
|
||||
}
|
||||
|
||||
public void SetPadding(float left, float top, float right, float bottom)
|
||||
{
|
||||
// Debug.Log("[WebviewManager] SetPadding");
|
||||
@@ -70,17 +70,6 @@ public class SdkManager : MonoBehaviour
|
||||
public void SetDarkThough(bool though)
|
||||
{
|
||||
if (!GameHelper.IsGiftSwitch()) return;
|
||||
// if (though)
|
||||
// {
|
||||
// if (UI.Instance.IsExistUI(UIConst.LevelSuccessUI) || UI.Instance.IsExistUI(UIConst.MakeupConfirmUI) ||
|
||||
// UI.Instance.IsExistUI(UIConst.NewTaskUI) || UI.Instance.IsExistUI(UIConst.PackrewardUI) || UI.Instance.IsExistUI(UIConst.SaveingPotUI)
|
||||
// )
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// }
|
||||
// Debug.Log("[WebviewManager] SetPadding");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.SetDarkThough(though);
|
||||
#endif
|
||||
@@ -92,22 +81,6 @@ public class SdkManager : MonoBehaviour
|
||||
BrigdeIOS.SetBtn(left, top, right, bottom);
|
||||
#endif
|
||||
}
|
||||
public void SetCTEnable(bool flag)
|
||||
{
|
||||
// Debug.Log("[WebviewManager] SetCTEnable");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.SetCTEnable(flag);
|
||||
#endif
|
||||
}
|
||||
|
||||
public void SetFullScreen()
|
||||
{
|
||||
// Debug.Log("[WebviewManager] SetFullScreen");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.SetFullScreen();
|
||||
#endif
|
||||
}
|
||||
|
||||
public void addH5Field(int field1, int field2, int field3, int field4, int field5, string field6, string field7, string dark_url, string light_url, bool is_gift, string web_through_str, string click_add_time)
|
||||
{
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
@@ -127,19 +100,6 @@ public class SdkManager : MonoBehaviour
|
||||
// Debug.Log("[WebviewManager] SetCTEnable");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.SetIconProgress(val);
|
||||
#endif
|
||||
}
|
||||
public void setInH5View(bool flag)
|
||||
{
|
||||
// Debug.Log("[WebviewManager] SetCTEnable");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.setInH5View(flag);
|
||||
#endif
|
||||
}
|
||||
public void upDataH5times(string weblink, int times, bool is_dark)
|
||||
{
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.upDataH5times( weblink, times,is_dark);
|
||||
#endif
|
||||
}
|
||||
public void ShowFlyBtn(bool flag)
|
||||
@@ -171,137 +131,55 @@ public class SdkManager : MonoBehaviour
|
||||
// Debug.Log("Touch click: " + name);
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.H5ViewClickBtn, name);
|
||||
}
|
||||
public void H5AutoRefresh(string times)
|
||||
public void H5AutoRefresh(string string_xcode)
|
||||
{
|
||||
if (times == "") return;
|
||||
DateTime today = DateTime.Now;
|
||||
var newDays = today.Day;
|
||||
|
||||
Debug.Log("string_xcode" + string_xcode);
|
||||
|
||||
if (times == "Dailyrefreshtimes")
|
||||
if (string_xcode.Contains("|h5"))
|
||||
{
|
||||
var last_time = PlayerPrefs.GetInt("Dayreftimes", 0);
|
||||
|
||||
if (last_time == newDays)
|
||||
Debug.Log(JsonConvert.SerializeObject(light_restoredList));
|
||||
string[] _string_arr = string_xcode.Split("|");
|
||||
if (_string_arr.Length >= 2)
|
||||
{
|
||||
var numbers = PlayerPrefs.GetInt("Dailyrefreshnum", 0);
|
||||
numbers++;
|
||||
PlayerPrefs.SetInt("Dailyrefreshnum", numbers);
|
||||
for (int i = 0; i < ConfigSystem_sdk.Instance.SDKConfig.h5Conf.links.Count; i++)
|
||||
{
|
||||
if (ConfigSystem_sdk.Instance.SDKConfig.h5Conf.links[i].url == _string_arr[0])
|
||||
{
|
||||
light_restoredList[i]++;
|
||||
string str = string.Join(",", light_restoredList);
|
||||
PlayerPrefs.SetString("Dailyrefreshnum", str);
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else if (string_xcode.Contains("|h6"))
|
||||
{
|
||||
|
||||
PlayerPrefs.SetInt("Dailyrefreshnum", 1);
|
||||
PlayerPrefs.SetInt("Dayreftimes", newDays);
|
||||
string darkWVRefreshtime_str = "";
|
||||
string darkWVDailyrefreshtimes_str = "";
|
||||
|
||||
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime.Length; i++)
|
||||
// {
|
||||
// if (i != 0) darkWVRefreshtime_str += "|";
|
||||
// darkWVRefreshtime_str += ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime[i].ToString();
|
||||
// }
|
||||
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime2.Length; i++)
|
||||
// {
|
||||
// darkWVRefreshtime_str += "|";
|
||||
// darkWVRefreshtime_str += ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime2[i].ToString();
|
||||
// }
|
||||
|
||||
int dark_type = -1;
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
string[] _string_arr = string_xcode.Split("|");
|
||||
if (_string_arr.Length >= 2)
|
||||
{
|
||||
if (dark_type != ConfigSystem.dark_weblist[i].wvType)
|
||||
for (int i = 0; i < ConfigSystem_sdk.Instance.SDKConfig.h6Conf.layerConfList.Count; i++)
|
||||
{
|
||||
if (i != 0) darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.dark_weblist[i].darkWVRefreshtime[0];
|
||||
darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.dark_weblist[i].darkWVRefreshtime[1];
|
||||
dark_type = ConfigSystem.dark_weblist[i].wvType;
|
||||
for (int j = 0; j < ConfigSystem_sdk.Instance.SDKConfig.h6Conf.layerConfList[i].links.Count; j++)
|
||||
{
|
||||
if (ConfigSystem_sdk.Instance.SDKConfig.h6Conf.layerConfList[i].links[j].url == _string_arr[0])
|
||||
{
|
||||
dark_restoredList[i][j]++;
|
||||
PlayerPrefs.SetString("Darkrefreshnum", string.Join(";", dark_restoredList.Select(row => string.Join(",", row))));
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes.Length; i++)
|
||||
// {
|
||||
// if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
// darkWVDailyrefreshtimes_str += ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[i].ToString();
|
||||
// }
|
||||
|
||||
dark_type = -1;
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
{
|
||||
if (dark_type != ConfigSystem.dark_weblist[i].wvType)
|
||||
{
|
||||
if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
darkWVDailyrefreshtimes_str += ConfigSystem.dark_weblist[i].darkWVDailyrefreshtimes;
|
||||
dark_type = ConfigSystem.dark_weblist[i].wvType;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
addH5Field(ConfigSystem.GetConfig<CommonModel>().flyCtRate, ConfigSystem.GetConfig<CommonModel>().otherH5switch,
|
||||
ConfigSystem.GetConfig<CommonModel>().H5Refreshtime, ConfigSystem.GetConfig<CommonModel>().Dailyrefreshtimes, ConfigSystem.GetConfig<CommonModel>().darkThoughProbability, darkWVRefreshtime_str,
|
||||
darkWVDailyrefreshtimes_str, "", "", GameHelper.IsGiftSwitch(), "", "");
|
||||
}
|
||||
}
|
||||
else if (times.Contains("dark_Dailyrefreshtimes"))
|
||||
{
|
||||
var last_time = PlayerPrefs.GetInt("dark_refreshDay", 0);
|
||||
if (last_time == newDays)
|
||||
{
|
||||
// var numbers = PlayerPrefs.GetInt("dark_Dayref", 0);
|
||||
// numbers++;
|
||||
// PlayerPrefs.SetInt("dark_Dayref", numbers);
|
||||
string[] temp_arr = times.Split("|");
|
||||
if (temp_arr.Length >= 2)
|
||||
{
|
||||
SaveData.GetSaveobject().dark_Dayref[Int32.Parse(temp_arr[1])]++;
|
||||
SaveData.saveDataFunc();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
// PlayerPrefs.SetInt("dark_Dayref", 1);
|
||||
string[] temp_arr = times.Split("|");
|
||||
if (temp_arr.Length >= 2)
|
||||
{
|
||||
SaveData.GetSaveobject().dark_Dayref[Int32.Parse(temp_arr[1])] = 1;
|
||||
SaveData.saveDataFunc();
|
||||
}
|
||||
PlayerPrefs.SetInt("dark_refreshDay", newDays);
|
||||
string darkWVRefreshtime_str = "";
|
||||
string darkWVDailyrefreshtimes_str = "";
|
||||
|
||||
int dark_type = -1;
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
{
|
||||
if (dark_type != ConfigSystem.dark_weblist[i].wvType)
|
||||
{
|
||||
if (i != 0) darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.dark_weblist[i].darkWVRefreshtime[0];
|
||||
darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.dark_weblist[i].darkWVRefreshtime[1];
|
||||
dark_type = ConfigSystem.dark_weblist[i].wvType;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dark_type = -1;
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
{
|
||||
if (dark_type != ConfigSystem.dark_weblist[i].wvType)
|
||||
{
|
||||
if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
darkWVDailyrefreshtimes_str += ConfigSystem.dark_weblist[i].darkWVDailyrefreshtimes;
|
||||
dark_type = ConfigSystem.dark_weblist[i].wvType;
|
||||
}
|
||||
}
|
||||
addH5Field(ConfigSystem.GetConfig<CommonModel>().flyCtRate, ConfigSystem.GetConfig<CommonModel>().otherH5switch,
|
||||
ConfigSystem.GetConfig<CommonModel>().H5Refreshtime, ConfigSystem.GetConfig<CommonModel>().Dailyrefreshtimes, ConfigSystem.GetConfig<CommonModel>().darkThoughProbability, darkWVRefreshtime_str,
|
||||
darkWVDailyrefreshtimes_str, "", "", GameHelper.IsGiftSwitch(), "", "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -334,10 +212,6 @@ public class SdkManager : MonoBehaviour
|
||||
public void RefreshUrl()
|
||||
{
|
||||
|
||||
// if (gameUrlInfo == null) return;
|
||||
//TODO: show invisible h5
|
||||
|
||||
|
||||
string Dailyrefresh_reamain = "";
|
||||
int last_time = PlayerPrefs.GetInt("Dayreftimes", 0);
|
||||
DateTime today = DateTime.Now;
|
||||
@@ -366,16 +240,7 @@ public class SdkManager : MonoBehaviour
|
||||
|
||||
if (last_time == newDays)
|
||||
{
|
||||
// for (int i = 0; i < light_restoredList.Count; i++)
|
||||
// {
|
||||
// if (i != 0) Dailyrefresh_reamain += "|";
|
||||
|
||||
// if (ConfigSystem_sdk.Instance.SDKConfig.h5Conf.links.Count > i)
|
||||
// {
|
||||
// Dailyrefresh_reamain += (ConfigSystem_sdk.Instance.SDKConfig.h5Conf.links[i].maxF5Times - light_restoredList[i]);
|
||||
// }
|
||||
// else Dailyrefresh_reamain += 0;
|
||||
// }
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -386,15 +251,6 @@ public class SdkManager : MonoBehaviour
|
||||
}
|
||||
string str = string.Join(",", light_restoredList);
|
||||
PlayerPrefs.SetString("Dailyrefreshnum", str);
|
||||
|
||||
|
||||
// for (int i = 0; i < light_restoredList.Count; i++)
|
||||
// {
|
||||
// if (i != 0) Dailyrefresh_reamain += "|";
|
||||
// if (ConfigSystem_sdk.Instance.SDKConfig.h5Conf.links.Count > i) Dailyrefresh_reamain += ConfigSystem_sdk.Instance.SDKConfig.h5Conf.links[i].maxF5Times;
|
||||
// else Dailyrefresh_reamain += 0;
|
||||
// }
|
||||
|
||||
PlayerPrefs.SetInt("Dayreftimes", newDays);
|
||||
}
|
||||
|
||||
@@ -404,10 +260,6 @@ public class SdkManager : MonoBehaviour
|
||||
string darkWVDailyrefreshtimes_str = "";
|
||||
|
||||
string dark_refresh_str = PlayerPrefs.GetString("Darkrefreshnum", "");
|
||||
// if (SaveData.GetSaveobject().dark_Dayref == null)
|
||||
// {
|
||||
// SaveData.GetSaveobject().dark_Dayref = new List<int>() { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
// }
|
||||
if (string.IsNullOrEmpty(dark_refresh_str))
|
||||
{
|
||||
dark_restoredList = new List<List<int>>();
|
||||
@@ -447,32 +299,9 @@ public class SdkManager : MonoBehaviour
|
||||
|
||||
if (dark_last_time == newDays)
|
||||
{
|
||||
// for (int i = 0; i < dark_restoredList.Count; i++)
|
||||
// {
|
||||
// for (int j = 0; j < dark_restoredList[i].Count; j++)
|
||||
// {
|
||||
// // darkWVDailyrefreshtimes_str += ConfigSystem_sdk.Instance.SDKConfig.h6Conf.layerConfList[i].links[j].maxF5Times - dark_restoredList[i][j]
|
||||
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
// int dark_type_ = -1;
|
||||
// for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
// {
|
||||
// if (dark_type_ != ConfigSystem.dark_weblist[i].wvType)
|
||||
// {
|
||||
// dark_type_ = ConfigSystem.dark_weblist[i].wvType;
|
||||
// if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
// Debug.Log(dark_type_);
|
||||
// darkWVDailyrefreshtimes_str += ConfigSystem.dark_weblist[i].darkWVDailyrefreshtimes - SaveData.GetSaveobject().dark_Dayref[dark_type_ - 1];
|
||||
// }
|
||||
// }
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
for (int i = 0; i < dark_restoredList.Count; i++)
|
||||
{
|
||||
for (int j = 0; j < dark_restoredList[i].Count; j++)
|
||||
@@ -483,25 +312,6 @@ public class SdkManager : MonoBehaviour
|
||||
|
||||
PlayerPrefs.SetInt("dark_refreshDay", newDays);
|
||||
PlayerPrefs.SetString("Darkrefreshnum", string.Join(";", dark_restoredList.Select(row => string.Join(",", row))));
|
||||
// PlayerPrefs.SetInt("dark_Dayref", 0);
|
||||
|
||||
// for (int i = 0; i < SaveData.GetSaveobject().dark_Dayref.Count; i++)
|
||||
// {
|
||||
// SaveData.GetSaveobject().dark_Dayref[i] = 0;
|
||||
// }
|
||||
// SaveData.saveDataFunc();
|
||||
|
||||
// int dark_type_ = -1;
|
||||
// for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
// {
|
||||
// if (dark_type_ != ConfigSystem.dark_weblist[i].wvType)
|
||||
// {
|
||||
// dark_type_ = ConfigSystem.dark_weblist[i].wvType;
|
||||
// if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
// darkWVDailyrefreshtimes_str += ConfigSystem.dark_weblist[i].darkWVDailyrefreshtimes;
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
string light_str = "";
|
||||
@@ -568,41 +378,5 @@ public class SdkManager : MonoBehaviour
|
||||
, darkWVRefreshtime_str, "", dark_str, light_str, GameHelper.IsGiftSwitch(), layer_click_probability, add_time);
|
||||
|
||||
}
|
||||
|
||||
public void ClickAdEvent(string ad_msg)
|
||||
{
|
||||
string[] temp_array = ad_msg.Split("|");
|
||||
if (temp_array.Length >= 2 && temp_array[0] != null && temp_array[0] != "")
|
||||
{
|
||||
H5sendClass info = new H5sendClass() { link = temp_array[0], type = temp_array[1] };
|
||||
NetworkKit.PostWithHeader<object>("/event/h5Clicks", info, (isSuccess, obj) =>
|
||||
{
|
||||
// if (isSuccess)
|
||||
// {
|
||||
// Debug.Log("dadianchenggong" + temp_array[0]);
|
||||
// }
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public static bool haveSimCard = false;
|
||||
public void diaoyongtest(string have)
|
||||
{
|
||||
if (have == "TRUE") haveSimCard = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class H5refreshTimes
|
||||
{
|
||||
public string link;
|
||||
public int times;
|
||||
|
||||
}
|
||||
public class H5sendClass
|
||||
{
|
||||
public string link;
|
||||
public string type;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user