fix:1、H5方案改为我们自己的sdk,跳转电商也是。2、同步部分ios的优化

This commit is contained in:
2026-07-21 15:51:14 +08:00
parent ad3b1d24f2
commit 7a3c54c243
39 changed files with 68010 additions and 67313 deletions
@@ -644,18 +644,18 @@ namespace ChillConnect
{
ui.btn_wv.visible = false;
}
ui.btn_wv.visible = false;
//
// ui.btn_wv.SetClick(() =>
// {
// SDKOpenConfig openConfig = new SDKOpenConfig
// {
// normal = true,
// url = ""
// };
// CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb,openConfig);
// });
//
ui.btn_wv.visible = true;
ui.btn_wv.SetClick(() =>
{
SDKOpenConfig openConfig = new SDKOpenConfig
{
normal = true,
url = ""
};
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb,openConfig);
});
ui.com_bottom.btn_skin.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.ArrowThemeUI_Open); });
ui.btn_petty.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.PettyAwardUI_Open); });
@@ -2182,7 +2182,7 @@ namespace ChillConnect
_heartCount = 3;
_collidedArrows.Clear();
_remainArrowCount = _levelConfig.arrows.Count;
DataMgr.ArrowResultLevel.Value = 1;
DataMgr.ArrowResultLevel.Value = 0;
InitView();
}
@@ -499,7 +499,7 @@ namespace ChillConnect
if ((float)DataMgr.Ticket.Value < vo.item_need)
{
string str = string.Format(GameHelper.getDesByKey("makeup_2"), vo.item_need);
string str = string.Format(GameHelper.getDesByKey("makeup_2"), GameHelper.getChString(vo.item_need));
ui.com_ch.ch_text.text = str;
if ((float)DataMgr.Ticket.Value > vo.item_need)
{
@@ -557,12 +557,12 @@ namespace ChillConnect
var vo1 = ConfigSystem.GetConfig<MakeupModel>().GetData(makeupTaskData.tableId + 1);
if (vo1 == null)
vo1 = vo;
string str1 = string.Format(GameHelper.getDesByKey("makeup_2"), vo1.item_need);
string str1 = string.Format(GameHelper.getDesByKey("makeup_2"), GameHelper.getChString(vo1.item_need));
ui.com_ch.ch_text.text = str1;
if ((float)(DataMgr.Ticket.Value - vo.item_need) < vo1.item_need)
{
string str = string.Format(GameHelper.getDesByKey("makeup_2"), vo1.item_need);
string str = string.Format(GameHelper.getDesByKey("makeup_2"), GameHelper.getChString(vo.item_need));
ui.com_ch.ch_text.text = str;
ui.com_ch.progress.width = 656f * ((float)(DataMgr.Ticket.Value - vo.item_need) / vo1.item_need);
+29 -11
View File
@@ -6,6 +6,8 @@ using FGUI.ZM_H5_15;
using IgnoreOPS;
using SGModule.NetKit;
using UnityEngine;
using UNSDK;
// using UNSDK;
namespace ChillConnect
@@ -40,9 +42,17 @@ namespace ChillConnect
protected override void OnClose()
{
FreeWebViewManager.Instance.CloseWeb();
ctrl.CloseSettingAlpha();
// if (_config.normal)
// {
SdkConfigMgr.Instance.Close();
// }
// else
// {
// FreeWebViewManager.Instance.CloseWeb();
// }
// SdkConfigMgr.Instance.Close();
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
GameDispatcher.Instance.Dispatch(GameMsg.showBroadCast);
@@ -59,14 +69,13 @@ namespace ChillConnect
private SDKOpenConfig _config;
protected override void OnOpenBefore(object args)
{
if (args is not SDKOpenConfig openConfig) return;
// if (args is not SDKOpenConfig openConfig) return;
// _config = openConfig;
_config = openConfig;
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
// Debug.Log($"H5UI OpenBefore url: {_config.url} normal: {_config.normal}");
GameDispatcher.Instance.Dispatch(GameMsg.hideBroadCast);
@@ -77,11 +86,20 @@ namespace ChillConnect
});
InitView();
DOVirtual.DelayedCall(0.35f, () =>
{
FreeWebViewManager.Instance.OpenWeb(_config.url);
});
// Debug.Log($"H5UI OpenWeb _config.normal=========: {_config.normal}");
// if (_config.normal)
// {
// SdkConfigMgr.Instance.Open();
// }
// else
// {
// DOVirtual.DelayedCall(0.35f, () =>
// {
// Debug.Log($"H5UI OpenWeb _config.url=========: {_config.url}");
// FreeWebViewManager.Instance.OpenWeb(_config.url);
// });
// }
}
protected override void OnOpen(object args)
+24
View File
@@ -1,6 +1,8 @@
using UnityEngine;
namespace ChillConnect
{
public class H5UICtrl : BaseUICtrl
@@ -11,9 +13,15 @@ namespace ChillConnect
private uint openUIMsg = UICtrlMsg.H5UI_Open;
private uint closeUIMsg = UICtrlMsg.H5UI_Close;
private AlphaController _alphaController;
#region
protected override void OnInit()
{
if (_alphaController == null)
{
_alphaController = GameObject.Find("AlphaController").GetComponent<AlphaController>();
}
//model = ModuleManager.Instance.GetModel(ModelConst.H5Model) as H5Model;
}
@@ -23,6 +31,8 @@ namespace ChillConnect
public override void OpenUI(object args = null)
{
OpenSettingAlpha();
if (ui == null)
{
ui = new H5UI(this);
@@ -75,5 +85,19 @@ namespace ChillConnect
}
#endregion
// 这个方法绑定到"打开面板"按钮
public void OpenSettingAlpha()
{
// 打开面板时,Unity 渲染层变为全透明
_alphaController?.SetPlayerAlpha(0.08f);
}
// 这个方法绑定到"关闭面板"按钮
public void CloseSettingAlpha()
{
// 关闭面板时,Unity 渲染层恢复不透明
_alphaController?.SetPlayerAlpha(1.0f);
}
}
}
@@ -46,6 +46,7 @@ namespace ChillConnect
}
private bool isOpenRecord = true;
protected override void OnClose()
{
@@ -62,7 +63,7 @@ namespace ChillConnect
gameDispatcher.Dispatch(GameMsg.MakeUpConfirmUIClosed);
if (UnityEngine.Random.Range(0, 100) < 50)
if (isOpenRecord && UnityEngine.Random.Range(0, 100) < 50)
{
if (UnityEngine.Random.Range(0, 50) < 25)
{
@@ -641,6 +642,10 @@ namespace ChillConnect
ui.text_ch_number.text = GameHelper.getChString(DataMgr.Ticket.Value);
var curValue = Math.Min(DataMgr.Ticket.Value, vo.item_need);
ui.pb_condi1.value = (double)curValue;
string str1 = string.Format(GameHelper.getDesByKey("makeup_2"), GameHelper.getChString(vo.item_need));
ui.ch_text.text = str1;
var textTitle = ui.pb_condi1.GetChild("title");
if (textTitle != null)
{
@@ -1060,6 +1065,7 @@ namespace ChillConnect
ui.btn_contact_us.SetClick(() =>
{
isOpenRecord = false;
// GameHelper.OpenEmail();
SDKOpenConfig openConfig = new SDKOpenConfig
{