Commit 0bddfaf6 authored by wildfirecode's avatar wildfirecode

1

parent f276e0c2
......@@ -115,6 +115,10 @@
{
"key": "data.img",
"value": "http://yun.duiba.com.cn/babi/img/bm2ryg8wht.gif"
},
{
"key": "data.url",
"value": "turnprize_icon1_png"
}
]
},
......
......@@ -11,14 +11,43 @@ import { NetManager } from "../../tw/manager/NetManager";
import Panel from "./Panel";
export default class PrizePanel extends Panel {
_level;
updateOption(option: any) {
const { categoryType, img, num, propType,realValue } = option;// 2次数 3道具 4元宝 5实物 6优惠券 7虚拟商品
this['propnums'].text = 'x1';
if(num)
this['propnums'].text = 'x' + num;
switch (categoryType) {
case 2:
this['blood'].visible = true;
this['numsgroup'].visible = true;
break;
case 3:
this['numsgroup'].visible = true;
this['img'].visible = true;
this.data.url = `turnprize_icon${propType}_png`;
break;
case 4:
this['numsgroup'].visible = true;
this['money'].visible = true;
this['propnums'].text = 'x' + realValue;
break;
default:
this['img'].visible = true;
this.data.url = img;
break;
}
}
start(data) {
super.start();
setGray(this['pica']);
setGray(this['picb']);
setGray(this['picc']);
this._level = parseInt(data.level + '');
const itemid = DataManager.ins.getData('getPlugOrderStatus').lottery.itemId;
this.data.img = `http://yun.duiba.com.cn/db_games/${window['imgver']}/${itemid}.png`;
this.updateOption(data.option);
this['shareBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(15));
......@@ -29,7 +58,7 @@ export default class PrizePanel extends Panel {
}, this);
this['goBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
this.hidePanel();
if (this._level + 1 <= 70)
if (this._level + 1 <= window['last_level'])
changeMapScene({ level: this._level + 1 });
else
changeMapScene();
......
......@@ -4,6 +4,13 @@
<e:Component y="859.74" skinName="ADSmallSkin" x="84" visible="false"/>
<e:Image id="light" source="common_prizelight_png" x="374.19" y="253.76" anchorOffsetX="375.76" anchorOffsetY="327.27"/>
<e:Image source="prizePanelbg_png" y="61.15" horizontalCenter="0.5"/>
<e:Image id="img" width="508" height="225" source="{data.url}" horizontalCenter="0" y="411.76" visible="false"/>
<e:Image id="money" source="signprize元宝_png" y="402.2" horizontalCenter="0" scaleX="0.8" scaleY="0.8" visible="false"/>
<e:Image id="blood" source="singprize体力_png" y="364.8" horizontalCenter="0" visible="false"/>
<e:Group id="numsgroup" x="396.38" y="410.4" visible="false">
<e:Image id="numsbg0" source="signprize_numsbg_png" x="0" y="0"/>
<e:Label id="propnums0" text="X8" size="22" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center"/>
</e:Group>
<e:Button id="closeBtn" label="" x="618" y="235.25">
<e:skinName>
<e:Skin states="up,down,disabled">
......@@ -28,7 +35,6 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Image id="img" y="429.28" touchEnabled="true" source="{data.img}" width="512" height="240" x="117"/>
<e:Image id="picb" source="点亮 副本 2_png" x="142" y="118.28"/>
<e:Image id="pica" source="点亮 副本 2_png" x="608" y="118.28" scaleX="-1"/>
<e:Image id="picc" source="点亮_png" y="69.28" x="280"/>
......
......@@ -2474,34 +2474,41 @@ export default class MainScene extends Scene {
updateMainTimerAfterGetData();//submit之后再判断一次home,更新倒计时
});
const submitData = DataManager.ins.getData('hc_submit').data;
if (submitData.prizeType == 1) {
//提交成功后捞结果
NetManager.ins.getPlugOrderStatus((s) => {
Loading2.instace.hide();
playSound(SoundType.sucess);
if (s) {
const data = DataManager.ins.getData('getPlugOrderStatus');
//区分奖品
if (data.lottery && data.lottery.type != "thanks") {
PanelCtrl.instance.show(ModuleTypes.PRIZE_PANEL, { level: this.chapter });
} else {
PanelCtrl.instance.show(ModuleTypes.NO_PRIZE_PANEL, { level: this.chapter });
}
} else {
//失败直接显示未中奖
PanelCtrl.instance.show(ModuleTypes.NO_PRIZE_PANEL, { level: this.chapter });
}
},
submitData.prizeResponse.orderNum,
() => { return DataManager.ins.getData('getPlugOrderStatus').result == 0 });
} else if (submitData.prizeType == 2) {
if(submitData.option) {
Loading2.instace.hide();
PanelCtrl.instance.show('prize2', { level: this.chapter });
} else {
PanelCtrl.instance.show(ModuleTypes.PRIZE_PANEL, { level: this.chapter,option:submitData.option });
} else{
Loading2.instace.hide();
PanelCtrl.instance.show(ModuleTypes.NO_PRIZE_PANEL, { level: this.chapter });
}
// if (submitData.prizeType == 1) {
// //提交成功后捞结果
// NetManager.ins.getPlugOrderStatus((s) => {
// Loading2.instace.hide();
// playSound(SoundType.sucess);
// if (s) {
// const data = DataManager.ins.getData('getPlugOrderStatus');
// //区分奖品
// if (data.lottery && data.lottery.type != "thanks") {
// PanelCtrl.instance.show(ModuleTypes.PRIZE_PANEL, { level: this.chapter });
// } else {
// PanelCtrl.instance.show(ModuleTypes.NO_PRIZE_PANEL, { level: this.chapter });
// }
// } else {
// //失败直接显示未中奖
// PanelCtrl.instance.show(ModuleTypes.NO_PRIZE_PANEL, { level: this.chapter });
// }
// },
// submitData.prizeResponse.orderNum,
// () => { return DataManager.ins.getData('getPlugOrderStatus').result == 0 });
// } else if (submitData.prizeType == 2) {
// Loading2.instace.hide();
// PanelCtrl.instance.show('prize2', { level: this.chapter });
// } else {
// Loading2.instace.hide();
// PanelCtrl.instance.show(ModuleTypes.NO_PRIZE_PANEL, { level: this.chapter });
// }
} else {
Loading2.instace.hide();
if (!data) {
......
......@@ -46,7 +46,7 @@ const config = {
data: './happyclear/openTreasureBox.json'
},
'/customActivity/happyclear/home': {
data: './happyclear/homemax.json'
data: './happyclear/home.json'
},
'/customActivity/happyclear/getLevelInfo': {
data: './happyclear/getLevelInfo.json'
......
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