From 86402de3538fac2c4b8dd164c8b6a8103d0904e9 Mon Sep 17 00:00:00 2001 From: edy Date: Fri, 10 Jul 2026 15:09:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Plugins/iOS/H5View.m | 24 ++++++++++++------------ Assets/Scripts/ConfigSystem_sdk.cs | 27 ++++----------------------- Assets/Scripts/SdkManager.cs | 22 ++++++++++++++++++++-- 3 files changed, 36 insertions(+), 37 deletions(-) diff --git a/Assets/Plugins/iOS/H5View.m b/Assets/Plugins/iOS/H5View.m index 4d4fcfb..a13c448 100644 --- a/Assets/Plugins/iOS/H5View.m +++ b/Assets/Plugins/iOS/H5View.m @@ -334,24 +334,24 @@ //-(void)upDataH5times:(char*)weblink times:(int)times is_dark:(BOOL)is_dark{ -// +// // NSString *myNSString = [[NSString alloc] initWithUTF8String:weblink]; // if(is_dark){ // for (int counter = 0; counter < dark_url_array.count; counter++) { -// +// // if( [dark_url_array[counter][0] isEqualToString:myNSString]){ // dark_url_array[counter][2]=@(times); -// +// // dark_though_rate[[dark_url_array[counter][4] intValue]-1]=@([dark_url_array[counter][3] intValue]); -// -// +// +// // break; // } // } // } // else{ // for (int counter = 0; counter < light_url_array.count; counter++) { -// +// // if( [light_url_array[counter][0] isEqualToString:myNSString]){ // light_url_array[counter][2]=@(times); // //light_though_rate=[light_url_array[counter][3] intValue]; @@ -575,17 +575,17 @@ // float maxvalue=0; // float random3 ; // float rate=0; -// -// -// +// +// +// // for (int counter = 0; counter < dark_url_array.count; counter++) { // if([dark_url_array[counter][2] intValue]>0 ){ // if([dark_url_array[counter][4] intValue]!=(type+1) ) continue; // maxvalue+=[dark_url_array[counter][1] floatValue]; // } -// +// // } -// +// // if(maxvalue>0){ // random3=arc4random_uniform(maxvalue); // for (int counter = 0; counter < dark_url_array.count; counter++) { @@ -880,7 +880,7 @@ // NSString *objcString = [NSString stringWithUTF8String:darkWVDailyrefreshtimes_str]; // NSArray *stringArray = [objcString componentsSeparatedByString:@"|"]; // NSMutableArray *intArray = [NSMutableArray array]; -// +// // for (NSString *str in stringArray) { // [intArray addObject:@([str intValue])]; // } diff --git a/Assets/Scripts/ConfigSystem_sdk.cs b/Assets/Scripts/ConfigSystem_sdk.cs index 5f0ea72..5f223c2 100644 --- a/Assets/Scripts/ConfigSystem_sdk.cs +++ b/Assets/Scripts/ConfigSystem_sdk.cs @@ -134,26 +134,9 @@ namespace BingoBrain 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().flyswitch; @@ -171,9 +154,7 @@ namespace BingoBrain // SdkManager.Instance.SetPadding(0, top_offset / GRoot.inst.height, 0, buttom_offset / GRoot.inst.height); SdkManager.Instance.SetDarkThough(true); SdkManager.Instance.RefreshUrl(); - SdkManager.Instance.ShowH5View(false); - - } + SdkManager.Instance.ShowH5View(false); } public int GetRegisteredCalendarDaysByUTC(long regTimeTimestamp) { diff --git a/Assets/Scripts/SdkManager.cs b/Assets/Scripts/SdkManager.cs index 250ffe3..f1b7bef 100644 --- a/Assets/Scripts/SdkManager.cs +++ b/Assets/Scripts/SdkManager.cs @@ -127,7 +127,6 @@ namespace DontConfuse BrigdeIOS.setRewardBtnTag(flag); #endif } - public void ObjC_TouchClick(string name) { // Debug.Log("Touch click: " + name); @@ -385,9 +384,28 @@ namespace DontConfuse Debug.Log(light_str); Debug.Log(layer_click_probability); Debug.Log(add_time); + int reg_days = ConfigSystem_sdk.Instance.GetRegisteredCalendarDaysByUTC(LoginModel_sdk.Instance.reg_time); + bool open_dark_wv = true; + if (ConfigSystem_sdk.Instance. SDKConfig.h6Conf.switchCondition != null) + { + for (int i = 0; i < ConfigSystem_sdk.Instance.SDKConfig.h6Conf.switchCondition.retentionConf.Count; i++) + { + if ((reg_days >= ConfigSystem_sdk.Instance.SDKConfig.h6Conf.switchCondition.retentionConf[i].days.min) && + (reg_days <=ConfigSystem_sdk.Instance. SDKConfig.h6Conf.switchCondition.retentionConf[i].days.max)) + { + if (UnityEngine.Random.Range(0, 100) >= ConfigSystem_sdk.Instance.SDKConfig.h6Conf.switchCondition.retentionConf[i].prob) + { + open_dark_wv = false; + } + break; + } + } + } + Debug.Log(open_dark_wv); + addH5Field(ConfigSystem.GetConfig().flyCtRate, ConfigSystem.GetConfig().otherH5switch, UnityEngine.Random.Range(ConfigSystem_sdk.Instance.SDKConfig.h5Conf.f5Interval.min, ConfigSystem_sdk.Instance.SDKConfig.h5Conf.f5Interval.max + 1), -1, -1 - , darkWVRefreshtime_str, "", dark_str, light_str, GameHelper.IsGiftSwitch(), layer_click_probability, add_time); + , darkWVRefreshtime_str, "", dark_str, light_str,open_dark_wv , layer_click_probability, add_time); } }