Commit b41b8bb5 authored by zhangzhe's avatar zhangzhe

修改兑换逻辑

parent 8cee60e3
......@@ -32,7 +32,7 @@ public class ExchangeItem : MonoBehaviour
ToastPlugin.ToastHelper.ShowToast("余额不足");
return;
}
FindObjectOfType<DialogControl>().ShowRealAwardsWinDialog().SetUpSubviews(bean.img, bean.name, bean.id+"");
FindObjectOfType<DialogControl>().ShowRealAwardsWinDialog().SetUpSubviews(bean.img, bean.name, bean.id);
}
}
......@@ -46,11 +46,23 @@ public class RAInputPhone : MonoBehaviour
if (RealAwardsVM.isFanYiFan)
{
RealAwardsVM.RequestInternetForChooseAward(RealAwardsVM.awardModel.id);
FindObjectOfType<DialogControl>().CloseRAInputPhone();
FindObjectOfType<DialogControl>().ShowRARankList(RealAwardsVM.isFanYiFan);
}
else
{
GameObject.Find("planttreewithdrawDialog").GetComponent<PlantTreeControl>().FinishWriteInfo(RealAwardsVM.id, new Action<string>((no) =>
{
RealAwardsVM.no = no;
FindObjectOfType<DialogControl>().CloseRAInputPhone();
FindObjectOfType<DialogControl>().CloseRAInputPhone();
FindObjectOfType<DialogControl>().ShowRARankList(RealAwardsVM.isFanYiFan);
FindObjectOfType<DialogControl>().ShowRARankList(RealAwardsVM.isFanYiFan);
}));
}
}
}));
......
......@@ -51,6 +51,8 @@ public class RARankList : MonoBehaviour
private void OnDisable()
{
EventCenter.RemoveListener(MyEventType.RefreshRealAwardsData, RefreshData);
GameObject.Find("planttreewithdrawDialog").GetComponent<PlantTreeControl>().clickthree();
}
/// <summary>
......
......@@ -45,6 +45,11 @@ public class RealAwardsVM : SingletonMono<RealAwardsVM>
/// </summary>
public static bool isFanYiFan;
/// <summary>
/// 兑换奖品的id
/// </summary>
public static int id;
/// <summary>
/// 兑换奖品的no
/// </summary>
......
......@@ -59,8 +59,8 @@ public class RealAwardsWinDialog : MonoBehaviour
/// </summary>
/// <param name="img">图片url</param>
/// <param name="name">名字</param>
/// <param name="no">兑换奖励的订单号</param>
public void SetUpSubviews(string img, string name, string no)
/// <param name="id">兑换奖励的id</param>
public void SetUpSubviews(string img, string name, int id)
{
isReal = false;
......@@ -68,7 +68,7 @@ public class RealAwardsWinDialog : MonoBehaviour
NameText.text = name;
RealAwardsVM.no = no;
RealAwardsVM.id = id;
RealAwardsVM.isFanYiFan = false;
}
......
......@@ -19,7 +19,7 @@
"dependencies": {
"com.unity.ugui": "1.0.0"
},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.analytics": {
"version": "3.3.5",
......@@ -28,21 +28,21 @@
"dependencies": {
"com.unity.ugui": "1.0.0"
},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.collab-proxy": {
"version": "1.2.16",
"depth": 0,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.ext.nunit": {
"version": "1.0.6",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.ide.rider": {
"version": "1.1.4",
......@@ -51,14 +51,14 @@
"dependencies": {
"com.unity.test-framework": "1.1.1"
},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.ide.vscode": {
"version": "1.2.3",
"depth": 0,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.multiplayer-hlapi": {
"version": "1.0.8",
......@@ -67,7 +67,7 @@
"dependencies": {
"nuget.mono-cecil": "0.1.6-preview"
},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.purchasing": {
"version": "2.2.1",
......@@ -76,7 +76,7 @@
"dependencies": {
"com.unity.ugui": "1.0.0"
},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.test-framework": {
"version": "1.1.20",
......@@ -87,7 +87,7 @@
"com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0"
},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.textmeshpro": {
"version": "2.1.1",
......@@ -96,14 +96,14 @@
"dependencies": {
"com.unity.ugui": "1.0.0"
},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.timeline": {
"version": "1.2.17",
"depth": 0,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.ugui": {
"version": "1.0.0",
......@@ -122,14 +122,14 @@
"com.unity.modules.vr": "1.0.0",
"com.unity.modules.xr": "1.0.0"
},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"nuget.mono-cecil": {
"version": "0.1.6-preview",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.modules.ai": {
"version": "1.0.0",
......
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