首次提交
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
namespace ScrewsMaster
|
||||
{
|
||||
public class PixPayCtrl : BaseCtrl
|
||||
{
|
||||
public static PixPayCtrl Instance { get; private set; }
|
||||
|
||||
private PixPayModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.PixPayModel) as PixPayModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 143473f2c6453423f80a6e48992b9884
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,43 @@
|
||||
namespace ScrewsMaster
|
||||
{
|
||||
public class PixPayModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
// protected override void OnReset()
|
||||
// {
|
||||
// }
|
||||
// #endregion
|
||||
|
||||
// #region 读取数据
|
||||
// protected override void OnReadData()
|
||||
// {
|
||||
// }
|
||||
// #endregion
|
||||
|
||||
// #region 本地存储
|
||||
// protected override void WriteLocalStorage()
|
||||
// {
|
||||
|
||||
// }
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9918b9480495c4f7ea129aa33e5efbf1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,290 @@
|
||||
// using System.Linq;
|
||||
// using UnityEngine;
|
||||
|
||||
// namespace ScrewsMaster
|
||||
// {
|
||||
// public class PixPayUI : BaseUI
|
||||
// {
|
||||
// private PixPayUICtrl ctrl;
|
||||
// private PixPayModel model;
|
||||
// private FGUI.G007_makeup.com_PixPay ui;
|
||||
// private int pay_Type = 0;
|
||||
|
||||
// public PixPayUI(PixPayUICtrl ctrl) : base(ctrl)
|
||||
// {
|
||||
// uiName = UIConst.PixPayUI;
|
||||
// this.ctrl = ctrl;
|
||||
// }
|
||||
|
||||
// protected override void SetUIInfo(UIInfo uiInfo)
|
||||
// {
|
||||
// uiInfo.packageName = "G007_makeup";
|
||||
// uiInfo.assetName = "com_PixPay";
|
||||
// uiInfo.layerType = UILayerType.Popup;
|
||||
// uiInfo.isNeedOpenAnim = true;
|
||||
// uiInfo.isNeedCloseAnim = true;
|
||||
// uiInfo.isNeedUIMask = true;
|
||||
// }
|
||||
|
||||
// #region 生命周期
|
||||
// protected override void OnInit()
|
||||
// {
|
||||
// //model = ModuleManager.Instance.GetModel(ModelConst.PixPayModel) as PixPayModel;
|
||||
// }
|
||||
|
||||
// protected override void OnClose()
|
||||
// {
|
||||
// }
|
||||
|
||||
// protected override void OnBind()
|
||||
// {
|
||||
// ui = baseUI as FGUI.G007_makeup.com_PixPay;
|
||||
// }
|
||||
|
||||
// protected override void OnOpenBefore(object args)
|
||||
// {
|
||||
// pay_Type = (int)args;
|
||||
// InitView();
|
||||
// }
|
||||
|
||||
// protected override void OnOpen(object args)
|
||||
// {
|
||||
// }
|
||||
|
||||
// protected override void OnHide()
|
||||
// {
|
||||
// }
|
||||
|
||||
// protected override void OnDisplay(object args)
|
||||
// {
|
||||
// }
|
||||
// #endregion
|
||||
|
||||
// #region 消息
|
||||
// protected override void AddListener()
|
||||
// {
|
||||
// GameDispatcher.Instance.AddListener(GameMsg.PaySuccess, closeView);
|
||||
// }
|
||||
// protected override void RemoveListener()
|
||||
// {
|
||||
|
||||
// }
|
||||
// #endregion
|
||||
|
||||
// void closeView(object a)
|
||||
// {
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PixPayUI_Close);
|
||||
// // ULiteWebView.Ins.Close();
|
||||
// }
|
||||
|
||||
// //初始化页面逻辑
|
||||
// private void InitView()
|
||||
// {
|
||||
// ui.btn_close.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PixPayUI_Close); });
|
||||
// ui.btn_comfirmar.SetClick(BtnComfirmarClick);
|
||||
// ui.btn_close_view.visible = false;
|
||||
// ui.btn_close_view.SetClick(() =>
|
||||
// {
|
||||
// getOrderState();
|
||||
// ui.btn_close_view.visible = false;
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PixPayUI_Close);
|
||||
// // ULiteWebView.Ins.Close();
|
||||
// });
|
||||
// }
|
||||
|
||||
// public static void getOrderState()
|
||||
// {
|
||||
// HallManager.Instance.UpdateFiveSecondEvent -= getOrderState;
|
||||
// HallManager.Instance.UpdateFiveSecondEvent -= getOrderState;
|
||||
// HallManager.Instance.UpdateFiveSecondEvent -= getOrderState;
|
||||
// var orderId = PlayerPrefs.GetString("PAYFORH5", "");
|
||||
// var pay1_incheck = false;
|
||||
// if (orderId == "")
|
||||
// {
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //orderId = "1710323239_1000498_10";
|
||||
// var test = new { order_id = orderId };
|
||||
|
||||
// MakeupTaskData makeupTaskData = PreferencesMgr.Instance.MakeupTaskHistory.Last() as MakeupTaskData;
|
||||
// //makeupTaskData.videoCount = 100;
|
||||
// var vo = ConfigSystem.GetConfig<MakeupModel>().GetData(makeupTaskData.tableId);
|
||||
// if (vo != null)
|
||||
// {
|
||||
// //vo.task_need
|
||||
// //PreferencesMgr.Instance.MakeupTaskH5Time\
|
||||
// HallManager.Instance.UpdateFiveSecondEvent += getOrderState;
|
||||
// NetworkKit.PostWithHeader<orderState>("shop/pixPayOrderQuery", test, (isSuccess, obj) =>
|
||||
// {
|
||||
// if (isSuccess)
|
||||
// {
|
||||
// if (obj.status == 1)
|
||||
// {
|
||||
// pay1_incheck = true;
|
||||
// }
|
||||
// else if (obj.status == 2)
|
||||
// {
|
||||
// if (PreferencesMgr.Instance.MakeupTaskH5Time < vo.task_need)
|
||||
// {
|
||||
// PreferencesMgr.Instance.MakeupTaskH5Time = vo.task_need;
|
||||
// }
|
||||
// PlayerPrefs.SetString("PAYFORH5", "");
|
||||
// GameHelper.ShowTips("Parabéns pelo pagamento bem-sucedido, pulei a tarefa para você");
|
||||
// GameDispatcher.Instance.Dispatch(GameMsg.PaySuccess);
|
||||
// HallManager.Instance.UpdateFiveSecondEvent -= getOrderState;
|
||||
// HallManager.Instance.UpdateFiveSecondEvent -= getOrderState;
|
||||
// }
|
||||
// else if (obj.status == 3)
|
||||
// {
|
||||
// PlayerPrefs.SetString("PAYFORH5", "");
|
||||
// HallManager.Instance.UpdateFiveSecondEvent -= getOrderState;
|
||||
// HallManager.Instance.UpdateFiveSecondEvent -= getOrderState;
|
||||
// }
|
||||
// }
|
||||
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
// orderId = PlayerPrefs.GetString("PAYFORADS", "");
|
||||
// if (orderId == "")
|
||||
// {
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //orderId = "1710323239_1000498_10";
|
||||
// var test = new { order_id = orderId };
|
||||
|
||||
// MakeupTaskData makeupTaskData = PreferencesMgr.Instance.MakeupTaskHistory.Last() as MakeupTaskData;
|
||||
// //makeupTaskData.videoCount = 100;
|
||||
// var vo = ConfigSystem.GetConfig<MakeupModel>().GetData(makeupTaskData.tableId);
|
||||
// if (vo != null)
|
||||
// {
|
||||
// //vo.task_need
|
||||
// //PreferencesMgr.Instance.MakeupTaskH5Time\
|
||||
// if (!pay1_incheck) HallManager.Instance.UpdateFiveSecondEvent += getOrderState;
|
||||
// NetworkKit.PostWithHeader<orderState>("shop/pixPayOrderQuery", test, (isSuccess, obj) =>
|
||||
// {
|
||||
|
||||
|
||||
// if (isSuccess)
|
||||
// {
|
||||
// if (obj.status == 1)
|
||||
// {
|
||||
|
||||
// }
|
||||
// else if (obj.status == 2)
|
||||
// {
|
||||
// if (makeupTaskData.videoCount < vo.ad_need)
|
||||
// {
|
||||
// makeupTaskData.videoCount = vo.ad_need;
|
||||
// }
|
||||
// PlayerPrefs.SetString("PAYFORADS", "");
|
||||
// GameHelper.ShowTips("Parabéns pelo pagamento bem-sucedido, pulei a tarefa para você");
|
||||
// GameDispatcher.Instance.Dispatch(GameMsg.PaySuccess);
|
||||
// HallManager.Instance.UpdateFiveSecondEvent -= getOrderState;
|
||||
// HallManager.Instance.UpdateFiveSecondEvent -= getOrderState;
|
||||
|
||||
// }
|
||||
// else if (obj.status == 3)
|
||||
// {
|
||||
// PlayerPrefs.SetString("PAYFORADS", "");
|
||||
// HallManager.Instance.UpdateFiveSecondEvent -= getOrderState;
|
||||
// HallManager.Instance.UpdateFiveSecondEvent -= getOrderState;
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// void BtnComfirmarClick()
|
||||
// {
|
||||
|
||||
|
||||
// var email = ui.input_1.text.Trim();
|
||||
// var phone = ui.input_2.text.Trim();
|
||||
// var account = ui.input_3.text.Trim();
|
||||
|
||||
// if (email == "" || phone == "" || account == "")
|
||||
// {
|
||||
// GameHelper.ShowTips("Por favor, digite o conteúdo correto");
|
||||
// return;
|
||||
// }
|
||||
|
||||
// if ((PlayerPrefs.GetString("PAYFORH5", "") != "") || (PlayerPrefs.GetString("PAYFORADS", "") != ""))
|
||||
// {
|
||||
// GameHelper.ShowTips("Ordem em pagamento");
|
||||
// getOrderState();
|
||||
// return;
|
||||
// }
|
||||
|
||||
|
||||
// if (pay_Type == 1)
|
||||
// {
|
||||
// PayerData test = new PayerData()
|
||||
// {
|
||||
// name = account,
|
||||
// tel = phone,
|
||||
// email = email,
|
||||
// amount = ConfigSystem.GetConfig<CommonModel>().purchase1,
|
||||
|
||||
// };
|
||||
// NetworkKit.PostWithHeader<orderData>("shop/pixPayIn", test, (isSuccess, obj) =>
|
||||
// {
|
||||
// // ULiteWebView.Ins.LoadUrl(obj.pay_url);
|
||||
// // ULiteWebView.Ins.Show(0, 150, 0, 0);
|
||||
// ui.btn_close_view.visible = true;
|
||||
// PlayerPrefs.SetString("PAYFORH5", obj.order_id);
|
||||
// });
|
||||
// }
|
||||
// else if (pay_Type == 2)
|
||||
// {
|
||||
// PayerData test = new PayerData()
|
||||
// {
|
||||
// name = account,
|
||||
// tel = phone,
|
||||
// email = email,
|
||||
// amount = ConfigSystem.GetConfig<CommonModel>().purchase2,
|
||||
|
||||
// };
|
||||
// NetworkKit.PostWithHeader<orderData>("shop/pixPayIn", test, (isSuccess, obj) =>
|
||||
// {
|
||||
// // ULiteWebView.Ins.LoadUrl(obj.pay_url);
|
||||
// // ULiteWebView.Ins.Show(0, 150, 0, 0);
|
||||
// ui.btn_close_view.visible = true;
|
||||
// PlayerPrefs.SetString("PAYFORADS", obj.order_id);
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// }
|
||||
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
// public class PayerData
|
||||
// {
|
||||
// public string name;
|
||||
// public string tel;
|
||||
// public string email;
|
||||
// public int amount;
|
||||
// }
|
||||
// public class orderData
|
||||
// {
|
||||
// public string order_id;
|
||||
// public string pay_url;
|
||||
|
||||
// }
|
||||
// public class orderState
|
||||
// {
|
||||
// public string order_id;
|
||||
// public int status;
|
||||
|
||||
// }
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: efced3c2dfe304d8fa3ca0a3347a3f39
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,71 @@
|
||||
// namespace ScrewsMaster
|
||||
// {
|
||||
// public class PixPayUICtrl : BaseUICtrl
|
||||
// {
|
||||
// private PixPayUI ui;
|
||||
// private PixPayModel model;
|
||||
|
||||
// private uint openUIMsg = UICtrlMsg.PixPayUI_Open;
|
||||
// private uint closeUIMsg = UICtrlMsg.PixPayUI_Close;
|
||||
|
||||
// #region 生命周期
|
||||
// protected override void OnInit()
|
||||
// {
|
||||
// //model = ModuleManager.Instance.GetModel(ModelConst.PixPayModel) as PixPayModel;
|
||||
// }
|
||||
|
||||
// protected override void OnDispose()
|
||||
// {
|
||||
// }
|
||||
|
||||
// public override void OpenUI(object args = null)
|
||||
// {
|
||||
// if (ui == null)
|
||||
// {
|
||||
// ui = new PixPayUI(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,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 351e95d87df2b4f9eb180d0f2f3a14ae
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user