fix:1、添加跳链接的webview的插件。2、修复bug

This commit is contained in:
2026-07-14 16:12:11 +08:00
parent 110660f299
commit bb84cea894
79 changed files with 4455 additions and 512 deletions
@@ -2028,7 +2028,7 @@ namespace RedHotRoast
var start = fguiPosition;
var end = GameHelper.GetUICenterPosition(ui.com_money.GetChild("text_gold"));
float[] cash_array = GameHelper.GetRewardValue(0);
var littleReward = GameHelper.GetExchangeRateVo().Multi * cash_array[0];
var littleReward = Math.Round(GameHelper.GetExchangeRateVo().Multi * cash_array[0],2);
Debug.Log($"小额奖励:{cash_array[0]} {littleReward}");
var rewardSingleData = new RewardSingleData(102, (decimal)littleReward, RewardOrigin.AdTask)
@@ -344,7 +344,7 @@ namespace RedHotRoast
GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
DOVirtual.DelayedCall(1, () =>
{
DOVirtual.Float(0, (float)DataMgr.Ticket.Value, 1,
DOVirtual.Float(0, (float)DataMgr.Ticket.Value * GameHelper.GetExchangeRateVo().Multi, 1,
value => { ui.top_money.GetChild("text_gold").text = ((decimal)value).ToString("0.00"); });
});
}
+33 -4
View File
@@ -1,4 +1,5 @@
using DG.Tweening;
using DontConfuse;
using FGUI.ZM_H5_15;
using RedHotRoast;
@@ -36,10 +37,24 @@ namespace RedHotRoast
protected override void OnClose()
{
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
GameDispatcher.Instance.Dispatch(GameMsg.showBroadCast);
WebviewManager.Instance.setInH5View(false);
WebviewManager.Instance.ShowH5View(false);
HallManager.Instance.SetCameraVisible(true);
if (_config.normal)
{
WebviewManager.Instance.setInH5View(false);
WebviewManager.Instance.ShowH5View(false);
}
else
{
FreeWebViewManager.Instance.CloseWeb();
}
}
private SDKOpenConfig _config;
protected override void OnBind()
{
@@ -48,12 +63,26 @@ namespace RedHotRoast
protected override void OnOpenBefore(object args)
{
if (args is not SDKOpenConfig openConfig) return;
_config = openConfig;
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
WebviewManager.Instance.setInH5View(true);
GameDispatcher.Instance.Dispatch(GameMsg.hideBroadCast);
// delayedCall = DOVirtual.DelayedCall(0.3f, () =>
// {
WebviewManager.Instance.ShowH5View(true);
if (_config.normal)
{
WebviewManager.Instance.setInH5View(true);
WebviewManager.Instance.ShowH5View(true);
}
else
{
DOVirtual.DelayedCall(0.2f, () =>
{
FreeWebViewManager.Instance.OpenWeb(_config.url);
});
}
ui.btn_close.SetClick(() =>
{
+1 -1
View File
@@ -491,7 +491,7 @@ namespace RedHotRoast
ui.btn_wv.visible = GameHelper.IsGiftSwitch();
ui.btn_wv.SetClick(() =>
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.H5UI_Open);
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.H5UI_Open);
});
ui.btn_egg.SetClick(OnClickEgg);
@@ -90,7 +90,7 @@ namespace RedHotRoast
_mLastState = DataMgr.PettyState.Value;
// Debug.Log($"PettyState============: {DataMgr.PettyState.Value}");
var num = GameHelper.GetCommonModel().SmallReward;
ui.com_get_panel.text_reward.text = $"{GameHelper.GetExchangeRateVo().Payicon}{GameHelper.Get102Str(num)}";
ui.com_get_panel.text_reward.text = $"{GameHelper.Get102Str(num)}";
ui.com_get_panel.btn_get.SetClick(GotoEnterAccount);
@@ -252,12 +252,12 @@ namespace RedHotRoast
var pettyAmount = DataMgr.PettyAmount.Value;
if (pettyAmount != 0)
{
ui.com_detail.text_amount.SetVar("num", $" {GameHelper.GetExchangeRateVo().Payicon}{GameHelper.Get102Str(pettyAmount)}").FlushVars();
ui.com_detail.text_amount.SetVar("num", $" {GameHelper.Get102Str(pettyAmount)}").FlushVars();
}
else
{
var num = GameHelper.GetCommonModel().SmallReward;
ui.com_detail.text_amount.SetVar("num", $" {GameHelper.GetExchangeRateVo().Payicon}{GameHelper.Get102Str(num)}").FlushVars();
ui.com_detail.text_amount.SetVar("num", $" {GameHelper.Get102Str(num)}").FlushVars();
DataMgr.PettyAmount.Value = num;
}
+3
View File
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d727ad32d6e44862ba3e6eff7fe909aa
timeCreated: 1784016283
@@ -0,0 +1,19 @@
namespace RedHotRoast
{
public class RedeemCodeCtrl : BaseCtrl
{
public static RedeemCodeCtrl Instance { get; private set; }
private RedeemCodeModel model;
protected override void OnInit()
{
Instance = this;
}
protected override void OnDispose()
{
Instance = null;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a93167d1dab140d2917cf72e64e89770
timeCreated: 1782269723
@@ -0,0 +1,15 @@
namespace RedHotRoast
{
public class RedeemCodeModel : BaseModel
{
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 20b6c254390a48eabb165d883f54bf67
timeCreated: 1782269723
@@ -0,0 +1,103 @@
using FGUI.tixian;
using IgnoreOPS;
namespace RedHotRoast
{
public class RedeemCodeUI : BaseUI
{
private RedeemCodeUICtrl ctrl;
private RedeemCodeModel model;
private com_redeem_code ui;
public RedeemCodeUI(RedeemCodeUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.RedeemCodeUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "tixian";
uiInfo.assetName = "com_redeem_code";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = true;
uiInfo.isNeedCloseAnim = true;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
}
protected override void OnClose()
{
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
}
protected override void OnBind()
{
ui = baseUI as com_redeem_code;
}
protected override void OnOpenBefore(object args)
{
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
InitView();
}
protected override void OnOpen(object args)
{
}
#endregion
private void InitView()
{
ui.lab_mn2.text = GameHelper.Get101Str(0);
ui.lab_ticket.text = GameHelper.GetPriceInt(DataMgr.PettyAmount.Value);
var strings = ConfigSystem.GetCommonConf().X_Redeemcode;
ui.lab_code.text = strings;
ui.text_rate.text = GameHelper.GetExchangeRateVo().Payicon + " 1";
ui.btn_copy.SetClick(() =>
{
GameHelper.CopyText(ui.lab_code.text);
});
ui.btn_contact_us.SetClick(() =>
{
SDKOpenConfig openConfig = new SDKOpenConfig
{
normal = false,
url = ConfigSystem.GetCommonConf().X_ShopURL
};
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb, openConfig);
CtrlCloseUI();
});
ui.btn_close1.SetClick(CtrlCloseUI);
}
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
#endregion
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 02aaefad43c146b18cb726f31814007e
timeCreated: 1782269723
@@ -0,0 +1,71 @@
namespace RedHotRoast
{
public class RedeemCodeUICtrl : BaseUICtrl
{
private RedeemCodeUI ui;
private RedeemCodeModel model;
private uint openUIMsg = UICtrlMsg.RedeemCodeUI_Open;
private uint closeUIMsg = UICtrlMsg.RedeemCodeUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.PettyAwardModel) as PettyAwardModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new RedeemCodeUI(this);
ui.Open(args);
}
}
public override void CloseUI(object args = null)
{
if (ui != null && !ui.isClose)
{
ui.Close();
}
ui = null;
}
#endregion
#region
public override uint GetOpenUIMsg(string uiName)
{
return openUIMsg;
}
public override uint GetCloseUIMsg(string uiName)
{
return closeUIMsg;
}
protected override void AddListener()
{
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
}
protected override void RemoveListener()
{
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
}
protected override void AddServerListener()
{
}
protected override void RemoveServerListener()
{
}
#endregion
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: db2d94c85bfc42988faab968658f117e
timeCreated: 1782269723
@@ -109,6 +109,9 @@ namespace RedHotRoast
ui.btn_watch.SetClick(WatchBtnClick);
AdExchangeManager.Instance.SetWatchAd(AdExchangeManager.SavingPotMakeupAd, ui.btn_task_watch as btn_watchAd, () => { });
AdExchangeManager.Instance.Start();
ui.text_rate1.text = GameHelper.GetExchangeRateVo().Payicon + " 1";
ui.text_rate.text = GameHelper.GetExchangeRateVo().Payicon + " 1";
ad_cool_down = ConfigSystem.GetCommonConf().WwalaccelerationCD;
HallManager.Instance.UpdateSecondEvent += updateSpeedCD;
@@ -156,7 +159,8 @@ namespace RedHotRoast
private void InitView()
{
Makeup_2 makeupVo = MakeupModel_2.GetData(makeupTaskData.tableId);
ui.text_ad.text = string.Format(GameHelper.getDesByKey("saving_pot_5"), makeupVo.ADIncrease);
ui.text_ad.text = string.Format(GameHelper.getDesByKey("saving_pot_5"),
SaveingPotHelper.getChNumber(makeupVo.ADIncrease));
string str = string.Format(GameHelper.getDesByKey("saving_pot_2"), makeupVo.PayIncrease);
ui.text_pay.text = str;
initTop();
@@ -213,7 +217,7 @@ namespace RedHotRoast
});
HallManager.Instance.UpdateSecondEvent -= upLvWatchAdsBtn;
InitView();
DOVirtual.DelayedCall(0.1f, InitView);
}
if (SaveData.GetSaveObject().saveingpot_ch > SaveData.GetSaveObject().last_saveingpot_ch)
{
@@ -344,7 +348,6 @@ namespace RedHotRoast
btn_watchad.enabled = true;
btn_watchad.can_buy.selectedIndex = 0;
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetCommonConf().PiggyBankSwitch == 1) btn_watchad.img_saveingpot.visible = true;
InitView();
}
}
@@ -138,7 +138,7 @@ namespace RedHotRoast
btnSign.title = signList[index].id + "";
btnSign.touchable = false;
btnSign.reward_num.text = GameHelper.Get101Str(signList[index].quantity[0]);
btnSign.reward_num.text = GameHelper.IsGiftSwitch()?GameHelper.getChString(signList[index].quantity[0]):GameHelper.Get101Str(signList[index].quantity[0]);
var animName = "appear2";
if (index % 5 == 4)