fix:1、H5方案改为我们自己的sdk,跳转电商也是。2、同步部分ios的优化
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user