Commit ea6307e9 authored by wjf's avatar wjf

Merge branch 'dev' of gitlab2.dui88.com:wanghongyuan/xiaoxiaole into dev

parents 32754ae8 7e799c05
......@@ -34,6 +34,7 @@ import BoxPanel from "../../src/panels/BoxPanel";
import MainScene from "../../src/mainScene/MainScene";
import { Loading2 } from "../../src/something/uis/Loading2";
import Box2Panel from "../../src/panels/Box2Panel";
import Prize2Panel from "../../src/panels/Prize2Panel";
export default class MainBase extends eui.UILayer {
constructor() {
......@@ -62,6 +63,7 @@ export default class MainBase extends eui.UILayer {
['quit', { cls: QuitPanel }],
['box', { cls: BoxPanel }],
['box2', { cls: Box2Panel }],
['prize2', { cls: Prize2Panel }],
];
const scenes = [
......
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize2","version":5,"files":["../assets/nprize/擦肩而过弹窗 .png"]}
\ No newline at end of file
......@@ -71,6 +71,10 @@
{
"keys": "box2_bg_png",
"name": "box2"
},
{
"keys": "擦肩而过弹窗 _png",
"name": "prize2"
}
],
"resources": [
......
......@@ -20,6 +20,7 @@
"resource/skins/OptionItemSkin.exml",
"resource/skins/OptionsSkin.exml",
"resource/skins/PlaySkin.exml",
"resource/skins/Prize2Skin.exml",
"resource/skins/PrizeSkin.exml",
"resource/skins/QuitSkin.exml",
"resource/skins/RankItemSkin.exml",
......
......@@ -49,7 +49,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Group x="638" y="27.6">
<e:Group x="617" y="27.6" scaleX="1.4" scaleY="1.4">
<e:Group id="settingGroup" x="2" y="6.08" visible="false">
<e:Image id="settingbg" source="设置bg_png" y="0" x="0" scale9Grid="9,84,54,76" height="231"/>
<e:Button id="soundBtn" label="" y="120.24" horizontalCenter="0.5">
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="Prize2Skin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="169005181d0"/>
<e:Image source="prizePanelbg_png" y="30.85" horizontalCenter="0"/>
<e:Button id="closeBtn" label="" x="608" y="333">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="shareBtn" label="" y="787" horizontalCenter="-145.5">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="按钮 副本 3_png" source.down="按钮 副本 3_png" source.disabled="按钮 副本 3_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="goBtn" label="" y="787" horizontalCenter="144">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="按钮 副本 4_png" source.down="按钮 副本 4_png" source.disabled="按钮 副本 4_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Image id="img" y="502" touchEnabled="true" source="{data.img}" width="512" height="240" x="117"/>
<e:Image id="pic1" source="点亮 副本 2_png" x="142" y="191"/>
<e:Image id="pic3" source="点亮 副本 2_png" x="608" y="191" scaleX="-1"/>
<e:Image id="pic2" source="点亮_png" y="142" horizontalCenter="0"/>
<e:Label id="tips" text="这里显示元宝" y="382" horizontalCenter="0" textColor="0xff0000"/>
</e:Skin>
\ No newline at end of file
......@@ -2064,7 +2064,10 @@ export default class MainScene extends Scene {
submitData.prizeResponse.orderNum,
() => { return DataManager.ins.getData('getPlugOrderStatus').result == 0 });
} else {
} 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 });
}
......
import Panel from "../../libs/new_wx/components/Panel";
import { DataManager } from "../../libs/tw/manager/DataManager";
import { NetManager } from "../../libs/tw/manager/NetManager";
import { getlogItem } from "../Main";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { ModuleTypes } from "../../libs/new_wx/types/sceneTypes";
import setGray from "../setGray";
export default class Prize2Panel extends Panel {
_level;
start(data) {
super.start();
this._level = parseInt(data.level + '');
// const itemid = DataManager.ins.getData('getPlugOrderStatus').lottery.itemId;
// this.data.img = `http://yun.duiba.com.cn/db_games/0827/${itemid}.png`;
const submitdata = DataManager.ins.getData('hc_submit').data;
this['tips'].text = `本次获得元宝:${submitdata.prizeResponse.changeMoney}`;
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']);
const hc_submitData = DataManager.ins.getData('hc_submit').data;
this.setStar(hc_submitData.stars);
}
showlog() {
NetManager.ins.showLog(getlogItem(15));
}
setStar(nums: number) {
if (nums == 0) {
setGray(this['pic1']);
setGray(this['pic2']);
setGray(this['pic3']);
}
if (nums == 1) {
setGray(this['pic2']);
setGray(this['pic3']);
}
if (nums == 2) {
setGray(this['pic3']);
}
if (nums == 3) {
}
}
onTouchTap_closeBtn(): any {
super.onTouchTap_closeBtn();
SceneCtrl.instance.change(ModuleTypes.START_SCENE);
}
get picBigWidth() { return 510 };
get bigPicRatio() { return 640 / 300 }
img: eui.Image;
useBtn: eui.Button;
get skinKey() { return 'Prize2' }
protected get closeBtns(): eui.Button[] { return [this['closeBtn']] }
}
\ No newline at end of file
{
"success": true,
"code": "0000000000",
"desc": "OK",
"timestamp": 1566557834416,
"data": {
"prizeType": 1,
"prizeResponse": {
"orderNum": "1078836456709220393",
"errorMsg": null,
"success": true
"success":true,
"code":"0000000000",
"desc":"OK",
"timestamp":1566546925981,
"data":{
"prizeType":2,
"prizeResponse":{
"errorCode":null,
"changeMoney":30,
"balanceAmount":30,
"errorMsg":null,
"success":true
},
"stars": 2
"stars":3
}
}
\ No newline at end of file
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