Commit 9cb143f2 authored by wildfirecode's avatar wildfirecode

1

parent 0434fda7
......@@ -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 = [
......
{
"skins": {},
"autoGenerateExmlsList": true,
"exmls": [
"resource/skins/AlertSkin.exml",
"resource/skins/BloodSkin.exml",
"resource/skins/Box2Skin.exml",
"resource/skins/BoxSkin.exml",
"resource/skins/Buy1Skin.exml",
"resource/skins/Buy2Skin.exml",
"resource/skins/Buy3Skin.exml",
"resource/skins/FailSkin.exml",
"resource/skins/IconButtonSkin.exml",
"resource/skins/MainSkin.exml",
"resource/skins/MapBottomSkin.exml",
"resource/skins/MapRepeatSkin.exml",
"resource/skins/MapSkin.exml",
"resource/skins/MapTopSkin.exml",
"resource/skins/NoPrizeSkin.exml",
"resource/skins/OptionItemSkin.exml",
"resource/skins/OptionsSkin.exml",
"resource/skins/PlaySkin.exml",
"resource/skins/PrizeSkin.exml",
"resource/skins/QuitSkin.exml",
"resource/skins/RankItemSkin.exml",
"resource/skins/RankSkin.exml",
"resource/skins/ReliveSkin.exml",
"resource/skins/RuleSkin.exml",
"resource/skins/Share2Skin.exml",
"resource/skins/ShareSkin.exml",
"resource/skins/ShopSkin.exml",
"resource/skins/ShowOffSkin.exml",
"resource/skins/StarSkin.exml",
"resource/skins/StartPanelSkin.exml",
"resource/skins/StartSkin.exml",
"resource/skins/ToastSkin.exml",
"resource/skins/VScrollBarSkin.exml"
],
"path": "resource/default.thm.json"
"skins": {},
"autoGenerateExmlsList": true,
"exmls": [
"resource/skins/Prize2Skin.exml",
"resource/skins/AlertSkin.exml",
"resource/skins/BloodSkin.exml",
"resource/skins/Box2Skin.exml",
"resource/skins/BoxSkin.exml",
"resource/skins/Buy1Skin.exml",
"resource/skins/Buy2Skin.exml",
"resource/skins/Buy3Skin.exml",
"resource/skins/FailSkin.exml",
"resource/skins/IconButtonSkin.exml",
"resource/skins/MainSkin.exml",
"resource/skins/MapBottomSkin.exml",
"resource/skins/MapRepeatSkin.exml",
"resource/skins/MapSkin.exml",
"resource/skins/MapTopSkin.exml",
"resource/skins/NoPrizeSkin.exml",
"resource/skins/OptionItemSkin.exml",
"resource/skins/OptionsSkin.exml",
"resource/skins/PlaySkin.exml",
"resource/skins/PrizeSkin.exml",
"resource/skins/QuitSkin.exml",
"resource/skins/RankItemSkin.exml",
"resource/skins/RankSkin.exml",
"resource/skins/ReliveSkin.exml",
"resource/skins/RuleSkin.exml",
"resource/skins/Share2Skin.exml",
"resource/skins/ShareSkin.exml",
"resource/skins/ShopSkin.exml",
"resource/skins/ShowOffSkin.exml",
"resource/skins/StarSkin.exml",
"resource/skins/StartPanelSkin.exml",
"resource/skins/StartSkin.exml",
"resource/skins/ToastSkin.exml",
"resource/skins/VScrollBarSkin.exml"
],
"path": "resource/default.thm.json"
}
\ No newline at end of file
......@@ -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
......@@ -2071,7 +2071,7 @@ export default class MainScene extends Scene {
} else {
Loading2.instace.hide();
PanelCtrl.instance.show(ModuleTypes.NO_PRIZE_PANEL, { level: this.chapter });
PanelCtrl.instance.show('prize2', { level: this.chapter });
}
} else {
Loading2.instace.hide();
......
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