Commit 6d270ce3 authored by wildfirecode's avatar wildfirecode

1

parent 56fdee13
...@@ -164,8 +164,8 @@ ...@@ -164,8 +164,8 @@
"16cc233ca3b": { "16cc233ca3b": {
"bindingDataTestObj": [ "bindingDataTestObj": [
{ {
"key": "data.img", "key": "data.url",
"value": "http://yun.duiba.com.cn/babi/img/bm2ryg8wht.gif" "value": "turnprize_icon1_png"
} }
] ]
}, },
......
...@@ -2,9 +2,8 @@ ...@@ -2,9 +2,8 @@
<e:Skin class="BoxSkin" width="750" height="1205" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="BoxSkin" width="750" height="1205" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16cc233ca3b"/> <w:Config id="16cc233ca3b"/>
<e:Component y="739.52" skinName="ADSmallSkin" x="84" visible="false"/> <e:Component y="739.52" skinName="ADSmallSkin" x="84" visible="false"/>
<e:Image source="boxbg_png" y="33.76" horizontalCenter="0"/> <e:Image source="boxbg_png" y="-32.9" horizontalCenter="0" scale9Grid="93,413,564,43" height="783"/>
<e:Image id="img" y="355" touchEnabled="true" source="{data.img}" width="512" height="240" scaleX="0.9" scaleY="0.9" horizontalCenter="0"/> <e:Button id="closeBtn" label="" x="604.96" y="124.18">
<e:Button id="closeBtn" label="" x="604.96" y="190.84">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled" xmlns:w="http://ns.egret.com/wing"> <e:Skin states="up,down,disabled" xmlns:w="http://ns.egret.com/wing">
<e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/> <e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/>
...@@ -12,7 +11,14 @@ ...@@ -12,7 +11,14 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="close2Btn" label="" y="602" horizontalCenter="0"> <e:Image id="img" width="508" height="225" source="{data.url}" horizontalCenter="0" y="311.1"/>
<e:Image id="money" source="signprize元宝_png" y="301.54" horizontalCenter="0" scaleX="0.8" scaleY="0.8" visible="false"/>
<e:Image id="blood" source="singprize体力_png" y="264.14" horizontalCenter="0" visible="false"/>
<e:Group id="numsgroup" x="396.38" y="309.74" visible="false">
<e:Image id="numsbg" source="signprize_numsbg_png" x="0" y="0"/>
<e:Label id="propnums" text="X8" size="22" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center"/>
</e:Group>
<e:Button id="close2Btn" label="" y="597.34" horizontalCenter="0">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="boxbtn_png" source.down="boxbtn_png" source.disabled="boxbtn_png"/> <e:Image width="100%" height="100%" source="boxbtn_png" source.down="boxbtn_png" source.disabled="boxbtn_png"/>
......
...@@ -773,33 +773,21 @@ export default class MapScene extends Scene { ...@@ -773,33 +773,21 @@ export default class MapScene extends Scene {
this['boxani'].touchEnabled = true; this['boxani'].touchEnabled = true;
this['boxani'].touchChildren = true; this['boxani'].touchChildren = true;
if(success) { if(success) {
const boxdata = DataManager.ins.getData('hc_openTreasureBox').data; const hc_openTreasureBox = DataManager.ins.getData('hc_openTreasureBox');
const boxdata = hc_openTreasureBox.data;
const homeData = DataManager.ins.getData('hc_home').data; const homeData = DataManager.ins.getData('hc_home').data;
homeData.canReceiveTreasureBoxNum = boxdata.canReceiveTreasureBoxNum; homeData.canReceiveTreasureBoxNum = boxdata.canReceiveTreasureBoxNum;
homeData.nextRangeStarsNum = boxdata.nextRangeStarsNum; homeData.nextRangeStarsNum = boxdata.nextRangeStarsNum;
homeData.totalStarts = boxdata.totalStarts; homeData.totalStarts = boxdata.totalStarts;
homeData.isGetAllTreasureBox = boxdata.isGetAllTreasureBox; homeData.isGetAllTreasureBox = boxdata.isGetAllTreasureBox;
this.updateBox(); this.updateBox();
const data = DataManager.ins.getData('hc_openTreasureBox').data;
NetManager.ins.getPlugOrderStatus((s) => { if(hc_openTreasureBox.success && boxdata && boxdata.option) {
if(s) { PanelCtrl.instance.show('box');
const data = DataManager.ins.getData('getPlugOrderStatus'); } else {
//区分奖品
if(data.lottery && data.lottery.type != 'thanks') {
PanelCtrl.instance.show('box');
} else {
showToast('哎呀!奖励与您擦肩而过!快继续闯关!');
}
} else {
showToast('哎呀!奖励与您擦肩而过!快继续闯关!');
}
},
data.orderNum,
() => {
return DataManager.ins.getData('getPlugOrderStatus').result == 0
});
showToast('哎呀!奖励与您擦肩而过!快继续闯关!');
}
} else { } else {
PanelCtrl.instance.show('box2'); PanelCtrl.instance.show('box2');
......
...@@ -12,13 +12,39 @@ export default class BoxPanel extends Panel { ...@@ -12,13 +12,39 @@ export default class BoxPanel extends Panel {
}, this); }, this);
this.showlog(); this.showlog();
// this.data.img = DataManager.ins.getData('getPlugOrderStatus').lottery.imgurl;
const itemid = DataManager.ins.getData('getPlugOrderStatus').lottery.itemId; addAdComp(84,739.52,this,27);
this.data.img = `http://yun.duiba.com.cn/db_games/${window['imgver']}/${itemid}.png`;
addAdComp(84,739.52,this,27) const hc_openTreasureBox = DataManager.ins.getData('hc_openTreasureBox');
const boxdata = hc_openTreasureBox.data;
this.updateOption(boxdata.option);
} }
updateOption(option: any) {
const { categoryType, img, num, propType } = option;// 2次数 3道具 4元宝 5实物 6优惠券 7虚拟商品
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;
break;
default:
this['img'].visible = true;
this.data.url = img;
break;
}
}
showlog() { showlog() {
NetManager.ins.showLog(getlogItem(17)); NetManager.ins.showLog(getlogItem(17));
NetManager.ins.showLog(getlogItem(27)); NetManager.ins.showLog(getlogItem(27));
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"desc": "OK", "desc": "OK",
"timestamp": 1572332426229, "timestamp": 1572332426229,
"data": { "data": {
"canReceiveTreasureBoxNum": 0, "canReceiveTreasureBoxNum": 1110,
"nextRangeStarsNum": 8, "nextRangeStarsNum": 8,
"totalStars": 6, "totalStars": 6,
"isGetAllTreasureBox": false, "isGetAllTreasureBox": false,
...@@ -12,15 +12,15 @@ ...@@ -12,15 +12,15 @@
"option": { "option": {
"id": "41", "id": "41",
"day": null, "day": null,
"categoryType": 2, "categoryType": 5,
"title": "游戏次数2", "title": "游戏次数2",
"rate": "10", "rate": "10",
"minValue": null, "minValue": null,
"maxValue": null, "maxValue": null,
"coinType": null, "coinType": 1,
"propType": null, "propType": 2,
"num": 2, "num": 2,
"img": "", "img": "//yun.dui88.com/images/201910/e6pmpk2pne.png",
"appItemId": null, "appItemId": null,
"name": "", "name": "",
"value": "" "value": ""
......
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