Commit b2e952dc authored by maxiaoliang's avatar maxiaoliang

修改进入天天提现时刷新列表

parent 27682429
......@@ -110,4 +110,6 @@ public enum MyEventType
CLOSE_CLOCKIN_PAGE,
//关闭防护罩
CLOSE_PROCTION,
//更新天天提现列表数据
UPDATE_EVERY_DAT_LIST,
}
using System.Collections.Generic;
public class MyWalletData
{
public int userCount;
public double cash;
public List<Withdraw> list;
public class Withdraw
{
public int id;
public int status;
public int cash;
public string cashStr;
public string unit;
public string text;
public string desc;
}
//是否微信登录
public int status;
//提现
public string reason;
}
fileFormatVersion: 2
guid: 50b8c7198d1e443b1858921d3f60650a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -23,7 +23,15 @@ public class EveryDayControl : MonoBehaviour
public GameObject Redheart;
void Start()
{
getHeartList();
//getHeartList();
}
private void Awake()
{
EventCenter.AddListener(MyEventType.UPDATE_EVERY_DAT_LIST, getHeartList);
}
private void OnDestroy()
{
EventCenter.RemoveListener(MyEventType.UPDATE_EVERY_DAT_LIST, getHeartList);
}
/// <summary>
/// 获取红心list
......@@ -178,28 +186,29 @@ public class EveryDayControl : MonoBehaviour
{
#if UNITY_ANDROID
AndroidJavaObject util = new AndroidJavaObject("com.ym.zxhcsdkaar.TDUtils");
//util.Call("TD", GetActivity(), new TdListenerProxy((s) =>
//{
// Dictionary<string, object> parameters = new Dictionary<string, object>();
// parameters.Add("id", id);
// parameters.Add("blackBox", s);
// HttpTool.Instance._Post("app/v1/game/module/hearts/wd", parameters,
// new Action<MyWalletData>((result) => {
// if (null != result)
// {
// if (result.status == 1)
// {
// EventUtils.OnEvent("user_cashOut", "提现成功");
// }
// getHeartList();
// ToastPlugin.ToastHelper.ShowToast(result.reason);
// //close();
// }
// }), new Action<string, string>((code, mes) => { }));
//}));
util.Call("TD", GetActivity(), new TdListenerProxy((s) =>
{
Dictionary<string, object> parameters = new Dictionary<string, object>();
parameters.Add("id", id);
parameters.Add("blackBox", s);
HttpTool.Instance._Post("app/v1/game/module/hearts/wd", parameters,
new Action<MyWalletData>((result) =>
{
if (null != result)
{
if (result.status == 1)
{
EventUtils.OnEvent("user_cashOut", "提现成功");
}
getHeartList();
ToastPlugin.ToastHelper.ShowToast(result.reason);
//close();
}
}), new Action<string, string>((code, mes) => { }));
}));
#else
callback("不支持");
#endif
......
......@@ -368,8 +368,9 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
//点击天天提现
public void onClickEveryDayWithDraw()
{
AudioUtils.ins.PlayBtnAudio();
AudioUtils.ins.PlayBtnAudio();
EveryDayWithDraw.SetActive(true);
EventCenter.Broadcast(MyEventType.UPDATE_EVERY_DAT_LIST);
}
//点击防火罩
public void onClickProction()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment