144 lines
4.6 KiB
C#
144 lines
4.6 KiB
C#
|
|
using BingoBrain.Core;
|
||
|
|
using BingoBrain.HotFix;
|
||
|
|
using FGUI.ACommon;
|
||
|
|
using Newtonsoft.Json;
|
||
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
namespace BingoBrain
|
||
|
|
{
|
||
|
|
public class MakeupStepUI : BaseUI
|
||
|
|
{
|
||
|
|
private MakeupStepUICtrl ctrl;
|
||
|
|
private MakeupStepModel model;
|
||
|
|
private FGUI.G007_makeup.com_step ui;
|
||
|
|
private MakeupTaskData makeupTaskData;
|
||
|
|
public MakeupStepUI(MakeupStepUICtrl ctrl) : base(ctrl)
|
||
|
|
{
|
||
|
|
uiName = UIConst.MakeupStepUI;
|
||
|
|
this.ctrl = ctrl;
|
||
|
|
}
|
||
|
|
|
||
|
|
protected override void SetUIInfo(UIInfo uiInfo)
|
||
|
|
{
|
||
|
|
uiInfo.packageName = "G007_makeup";
|
||
|
|
uiInfo.assetName = "com_step";
|
||
|
|
uiInfo.layerType = UILayerType.Popup;
|
||
|
|
uiInfo.isNeedOpenAnim = false;
|
||
|
|
uiInfo.isNeedCloseAnim = false;
|
||
|
|
uiInfo.isNeedUIMask = true;
|
||
|
|
}
|
||
|
|
|
||
|
|
#region 生命周期
|
||
|
|
protected override void OnInit()
|
||
|
|
{
|
||
|
|
//model = ModuleManager.Instance.GetModel(ModelConst. MakeupStepModel) as MakeupStepModel;
|
||
|
|
}
|
||
|
|
|
||
|
|
protected override void OnClose()
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
protected override void OnBind()
|
||
|
|
{
|
||
|
|
ui = baseUI as FGUI.G007_makeup.com_step;
|
||
|
|
}
|
||
|
|
|
||
|
|
protected override void OnOpenBefore(object args)
|
||
|
|
{
|
||
|
|
makeupTaskData = args as MakeupTaskData;
|
||
|
|
Debug.Log(JsonConvert.SerializeObject(makeupTaskData));
|
||
|
|
InitView();
|
||
|
|
}
|
||
|
|
|
||
|
|
protected override void OnOpen(object args)
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
protected override void OnHide()
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
protected override void OnDisplay(object args)
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
#endregion
|
||
|
|
|
||
|
|
#region 消息
|
||
|
|
|
||
|
|
protected override void AddListener()
|
||
|
|
{
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
protected override void RemoveListener()
|
||
|
|
{
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
#endregion
|
||
|
|
|
||
|
|
private void InitView()
|
||
|
|
{
|
||
|
|
if (makeupTaskData == null)
|
||
|
|
{
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
ui.com_info.text_name.text = PreferencesMgr.Instance.ExchangeName;
|
||
|
|
ui.com_info.text_email.text = PreferencesMgr.Instance.ExchangeAccount;
|
||
|
|
|
||
|
|
ui.com_info.btn_change.SetClick(() =>
|
||
|
|
{
|
||
|
|
PreferencesMgr.Instance.ExchangeName = null;
|
||
|
|
PreferencesMgr.Instance.ExchangeAccount = null;
|
||
|
|
uiCtrlDispatcher.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData);
|
||
|
|
CtrlCloseUI();
|
||
|
|
});
|
||
|
|
|
||
|
|
ui.btn_confirm.touchable = false;
|
||
|
|
GameHelper.PlayFGUIFx(ui.fx_in, true, () => { ui.btn_confirm.touchable = true; });
|
||
|
|
|
||
|
|
ui.btn_confirm.SetClick(() =>
|
||
|
|
{
|
||
|
|
var info = new
|
||
|
|
{
|
||
|
|
email = PreferencesMgr.Instance.ExchangeAccount,
|
||
|
|
first_name = PreferencesMgr.Instance.short_name,
|
||
|
|
last_name = PreferencesMgr.Instance.long_name
|
||
|
|
};
|
||
|
|
NetworkKit.PostWithHeader("shop/payOutUserInfo", info);
|
||
|
|
NetworkKit.BuriedPoint(BuriedPointEvent.withdraw_behavior, BuriedPointEvent.withdraw_message, 1);
|
||
|
|
uiCtrlDispatcher.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData);
|
||
|
|
CtrlCloseUI();
|
||
|
|
});
|
||
|
|
|
||
|
|
//TextureHelper.GetCardIcon(true, spr => { ui.loader_payer.texture = spr; });
|
||
|
|
|
||
|
|
ui.text_warn.SetVar("app", Application.productName).FlushVars();
|
||
|
|
// if (GameHelper.GetCurrCountry().ToUpper().Equals("RU"))
|
||
|
|
// {
|
||
|
|
// ui.text_warn.SetVar("payer", "Qiwi").FlushVars();
|
||
|
|
// ui.com_info.cont_counrty.selectedIndex = com_info.Counrty_ru;
|
||
|
|
// ui.btn_confirm.country.selectedIndex = btn_confirm.Country_ru;
|
||
|
|
// ui.com_trans.cont_country.selectedIndex = com_trans.Country_ru;
|
||
|
|
// ui.lang.selectedIndex = com_step.Lang_en;
|
||
|
|
// }
|
||
|
|
// else if (AppConst.isPt())
|
||
|
|
// {
|
||
|
|
// ui.text_warn.SetVar("payer", "Pix").FlushVars();
|
||
|
|
// ui.com_info.cont_counrty.selectedIndex = com_info.Counrty_pt;
|
||
|
|
// ui.btn_confirm.country.selectedIndex = btn_confirm.Country_ru;
|
||
|
|
// ui.com_trans.cont_country.selectedIndex = com_trans.Country_pt;
|
||
|
|
// ui.lang.selectedIndex = com_step.Lang_pt;
|
||
|
|
// }
|
||
|
|
// else
|
||
|
|
// {
|
||
|
|
ui.text_warn.SetVar("payer", "Paypal").FlushVars();
|
||
|
|
ui.com_info.cont_counrty.selectedIndex =0;
|
||
|
|
ui.btn_confirm.country.selectedIndex = 0;
|
||
|
|
ui.com_trans.cont_country.selectedIndex = 0;
|
||
|
|
ui.lang.selectedIndex = 0;
|
||
|
|
//}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|