Commit b41b8bb5 authored by zhangzhe's avatar zhangzhe

修改兑换逻辑

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