Commit d9fd726b authored by wildfirecode's avatar wildfirecode

1

parent 41c4dfad
......@@ -11,7 +11,7 @@ export default class NoPrizePanel extends Panel {
start(data) {
super.start();
// this.data.score = `本局分数 ${DataManager.ins.getData('ngameSubmit').data.score}`;
this._level = parseInt(data.level+'');
this._level = parseInt(data.level + '');
this['shareBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(16));
......@@ -21,6 +21,14 @@ export default class NoPrizePanel extends Panel {
const hc_submitData = DataManager.ins.getData('hc_submit').data;
this.setStar(hc_submitData.stars);
this['goBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
this.hidePanel();
if (this._level + 1 <= 70)
SceneCtrl.instance.change(ModuleTypes.START_SCENE, { level: this._level + 1 });
else
SceneCtrl.instance.change(ModuleTypes.START_SCENE);
}, this);
}
showlog() {
......@@ -29,13 +37,14 @@ export default class NoPrizePanel extends Panel {
onTouchTap_closeBtn() {
super.onTouchTap_closeBtn();
if (this._level +1 <= 70)
SceneCtrl.instance.change(ModuleTypes.START_SCENE, { level: this._level + 1 });
else
SceneCtrl.instance.change(ModuleTypes.START_SCENE);
// if (this._level + 1 <= 70)
// SceneCtrl.instance.change(ModuleTypes.START_SCENE, { level: this._level + 1 });
// else
// SceneCtrl.instance.change(ModuleTypes.START_SCENE);
}
protected get closeBtns(): eui.Button[] { return [this['closeBtn'], this['goBtn']] }
protected get closeBtns(): eui.Button[] { return [this['closeBtn']] }
setStar(nums: number) {
if (nums == 0) {
setGray(this['pic1']);
......
......@@ -17,15 +17,21 @@ export default class PrizePanel extends Panel {
// this.img.height = this.picBigWidth / this.bigPicRatio;
// showCustomLog(lottery);
this._level = parseInt(data.level+'');
this._level = parseInt(data.level + '');
this.data.img = DataManager.ins.getData('getPlugOrderStatus').lottery.imgurl;
this['shareBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(15));
}, this);
this['goBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
this.hidePanel();
if (this._level + 1 <= 70)
SceneCtrl.instance.change(ModuleTypes.START_SCENE, { level: this._level + 1 });
else
SceneCtrl.instance.change(ModuleTypes.START_SCENE);
}, this);
this.showlog();
NetManager.ins.hc_home(() => { }, window['collectRuleId']);
......@@ -54,10 +60,11 @@ export default class PrizePanel extends Panel {
onTouchTap_closeBtn(): any {
super.onTouchTap_closeBtn();
if (this._level +1 <= 70)
SceneCtrl.instance.change(ModuleTypes.START_SCENE, { level: this._level + 1 });
else
SceneCtrl.instance.change(ModuleTypes.START_SCENE);
// if (this._level +1 <= 70)
// SceneCtrl.instance.change(ModuleTypes.START_SCENE, { level: this._level + 1 });
// else
// SceneCtrl.instance.change(ModuleTypes.START_SCENE);
// SceneCtrl.instance.change(ModuleTypes.MAP_SCENE, createData());
}
......@@ -68,5 +75,5 @@ export default class PrizePanel extends Panel {
useBtn: eui.Button;
get skinKey() { return 'Prize' }
protected get closeBtns(): eui.Button[] { return [this['closeBtn'], this['goBtn']] }
protected get closeBtns(): eui.Button[] { return [this['closeBtn']] }
}
\ No newline at end of file
......@@ -11,16 +11,16 @@ export default (data?: Data, netname?: NetName) => {
else if (data.code == '2002007013')
showToast('元宝不足哦,快去玩游戏赢元宝吧');
else if (data.code == 'E100202007' || data.code == 'E100202008' || data.code == 'E100202009' || data.code == 'E100202010')
showToast('对不起,您的体力不足~');
showToast('体力不足啦~邀请好友或去商城获得体力吧');
else if (data.code == 'E1002070002' || data.code == 'E1002070001') {
showToast('游戏分数提交失败~\n如有疑问,请联系客服')
}
else if (data.code == '600005')
showToast('体力值已达上限,不可购买')
else if (data.code == '444444')
showToast('操作太频繁,请稍后再试')
showToast('操作太频繁,请稍后再试');
else//其他异常
showToast('活动太火爆了\n请稍后再来')
showToast('活动太火爆了\n请稍后再来');
}
// export default (data: Data) => {
// if (data.code == 'E999999999')
......
......@@ -1817,7 +1817,7 @@ export class NetManager extends ABNetManager {
if (!net.hideMsg) {
GDispatcher.dispatchEvent(ABNetManager.ERROR, net);
showToast('活动太火爆了\n请稍后再来');
showToast('网络开小差了,再试一次吧');
}
}
// tslint:disable-next-line:max-file-line-count
......
......@@ -2,7 +2,7 @@
"result": 2,
"lotteryCode": 1,
"success": true,
"lotter1y": {
"lottery": {
"id": 1385,
"imgurl": "//yun.duiba.com.cn/developer/img/activityTool/slotMachine/virtual.png",
"isAppHidden": true,
......
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