Commit b19c448b authored by wildfirecode's avatar wildfirecode

1

parent 240d6e87
......@@ -8,6 +8,7 @@ import setGlow from "../setGlow";
import getHomeData from "../getHomeData";
import { showToast2 } from "../../libs/new_wx/ctrls/toastCtrl2";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import MainScene from "../mainScene/MainScene";
export default class Buy1Panel extends Panel {
buyBtn: eui.Button
......@@ -39,7 +40,12 @@ export default class Buy1Panel extends Panel {
this.buyBtn.enabled = true;
if (success) {
this.hidePanel();
if(SceneCtrl.instance.currentScene instanceof MainScene){
showToast('兑换成功');
}else {
showToast2();
}
NetManager.ins.hc_home(() => {
SceneCtrl.instance.updateScene();
}, window['collectRuleId']);
......
......@@ -8,6 +8,7 @@ import setGlow from "../setGlow";
import getHomeData from "../getHomeData";
import { showToast2 } from "../../libs/new_wx/ctrls/toastCtrl2";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import MainScene from "../mainScene/MainScene";
export default class Buy2Panel extends Panel {
onTouchTap_closeBtn(){
......@@ -33,7 +34,11 @@ export default class Buy2Panel extends Panel {
NetManager.ins.hc_exchange((success) => {
this.buyBtn.enabled = true;
if (success) {
if(SceneCtrl.instance.currentScene instanceof MainScene){
showToast('兑换成功');
}else {
showToast2();
}
this.hidePanel();
NetManager.ins.hc_home(() => {
SceneCtrl.instance.updateScene();
......
......@@ -8,6 +8,7 @@ import setGlow from "../setGlow";
import getHomeData from "../getHomeData";
import { showToast2 } from "../../libs/new_wx/ctrls/toastCtrl2";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import MainScene from "../mainScene/MainScene";
export default class Buy3Panel extends Panel {
onTouchTap_closeBtn(){
......@@ -34,7 +35,11 @@ export default class Buy3Panel extends Panel {
NetManager.ins.hc_exchange((success) => {
this.buyBtn.enabled = true;
if (success) {
if(SceneCtrl.instance.currentScene instanceof MainScene){
showToast('兑换成功');
}else {
showToast2();
}
this.hidePanel();
NetManager.ins.hc_home(() => {
SceneCtrl.instance.updateScene();
......
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