Commit c62eac94 authored by wildfirecode's avatar wildfirecode

1

parent 15788746
...@@ -40,8 +40,8 @@ import getHomeData, { BLOOD_NUMS_MAX } from "../../src/getHomeData"; ...@@ -40,8 +40,8 @@ import getHomeData, { BLOOD_NUMS_MAX } from "../../src/getHomeData";
import BloodPanel2 from "../../src/panels/BloodPanel2"; import BloodPanel2 from "../../src/panels/BloodPanel2";
import ExchangePanel from "../../src/panels/ExchangePanel"; import ExchangePanel from "../../src/panels/ExchangePanel";
import { initstatistics } from "../../src/statistics"; import { initstatistics } from "../../src/statistics";
import TaskPanel from "../../src/panels/TaskItemRenderer";
import ADPanel from "../../src/panels/ADPanel"; import ADPanel from "../../src/panels/ADPanel";
import TaskPanel from "../../src/panels/TaskPanel";
export default class MainBase extends eui.UILayer { export default class MainBase extends eui.UILayer {
constructor() { constructor() {
......
{ {
"skins": {}, "skins": {},
"autoGenerateExmlsList": true, "autoGenerateExmlsList": true,
"exmls": [ "exmls": [
"resource/skins/AlertSkin.exml", "resource/skins/AlertSkin.exml",
"resource/skins/Blood2Skin.exml", "resource/skins/Blood2Skin.exml",
"resource/skins/BloodSkin.exml", "resource/skins/BloodSkin.exml",
"resource/skins/Box2Skin.exml", "resource/skins/Box2Skin.exml",
"resource/skins/BoxSkin.exml", "resource/skins/BoxSkin.exml",
"resource/skins/Buy1Skin.exml", "resource/skins/Buy1Skin.exml",
"resource/skins/Buy2Skin.exml", "resource/skins/Buy2Skin.exml",
"resource/skins/Buy3Skin.exml", "resource/skins/Buy3Skin.exml",
"resource/skins/ExchangeSkin.exml", "resource/skins/ExchangeSkin.exml",
"resource/skins/FailSkin.exml", "resource/skins/FailSkin.exml",
"resource/skins/IconButtonSkin.exml", "resource/skins/IconButtonSkin.exml",
"resource/skins/Main2Skin.exml", "resource/skins/Main2Skin.exml",
"resource/skins/MapBottomSkin.exml", "resource/skins/MapBottomSkin.exml",
"resource/skins/MapRepeatSkin.exml", "resource/skins/MapRepeatSkin.exml",
"resource/skins/MapSkin.exml", "resource/skins/MapSkin.exml",
"resource/skins/MapTopSkin.exml", "resource/skins/MapTopSkin.exml",
"resource/skins/NoPrizeSkin.exml", "resource/skins/NoPrizeSkin.exml",
"resource/skins/OptionItemSkin.exml", "resource/skins/OptionItemSkin.exml",
"resource/skins/OptionsSkin.exml", "resource/skins/OptionsSkin.exml",
"resource/skins/PlaySkin.exml", "resource/skins/PlaySkin.exml",
"resource/skins/Prize2Skin.exml", "resource/skins/Prize2Skin.exml",
"resource/skins/PrizeSkin.exml", "resource/skins/PrizeSkin.exml",
"resource/skins/QuitSkin.exml", "resource/skins/QuitSkin.exml",
"resource/skins/RankItemSkin.exml", "resource/skins/RankItemSkin.exml",
"resource/skins/RankSkin.exml", "resource/skins/RankSkin.exml",
"resource/skins/ReliveSkin.exml", "resource/skins/ReliveSkin.exml",
"resource/skins/RuleSkin.exml", "resource/skins/RuleSkin.exml",
"resource/skins/Share2Skin.exml", "resource/skins/Share2Skin.exml",
"resource/skins/ShareSkin.exml", "resource/skins/ShareSkin.exml",
"resource/skins/ShopSkin.exml", "resource/skins/ShopSkin.exml",
"resource/skins/ShowOffSkin.exml", "resource/skins/ShowOffSkin.exml",
"resource/skins/SignItemSkin.exml", "resource/skins/SignItemSkin.exml",
"resource/skins/SignPrizeSkin.exml", "resource/skins/SignPrizeSkin.exml",
"resource/skins/SignSkin.exml", "resource/skins/SignSkin.exml",
"resource/skins/StarSkin.exml", "resource/skins/StarSkin.exml",
"resource/skins/StartPanelSkin.exml", "resource/skins/StartPanelSkin.exml",
"resource/skins/StartSkin.exml", "resource/skins/StartSkin.exml",
"resource/skins/TargetItemSkin.exml", "resource/skins/TargetItemSkin.exml",
"resource/skins/TaskItemSkin.exml", "resource/skins/TaskItemSkin.exml",
"resource/skins/TaskSkin.exml", "resource/skins/TaskSkin.exml",
"resource/skins/ToastSkin.exml", "resource/skins/ToastSkin.exml",
"resource/skins/VScrollBarSkin.exml" "resource/skins/VScrollBarSkin.exml"
], ],
"path": "resource/default.thm.json" "path": "resource/default.thm.json"
} }
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="AddSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui">
<e:Image source="闯关失败_png" y="27" horizontalCenter="0"/>
<e:Button id="closeBtn" label="" x="609" y="197">
<e:skinName>
<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:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Label text="AD广告" x="260" y="604"/>
</e:Skin>
\ No newline at end of file
...@@ -67,7 +67,15 @@ ...@@ -67,7 +67,15 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="taskBtn" label="" x="31.7" y="305.41" visible="false"> <e:Button id="taskBtn" label="" x="31.7" y="305.41">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="recordbtn_png" source.down="recordbtn_png" source.disabled="recordbtn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="adBtn" label="" x="44.3" y="459.41">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="recordbtn_png" source.down="recordbtn_png" source.disabled="recordbtn_png"/> <e:Image width="100%" height="100%" source="recordbtn_png" source.down="recordbtn_png" source.disabled="recordbtn_png"/>
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="TaskItemSkin" width="400" height="300" xmlns:e="http://ns.egret.com/eui"> <e:Skin class="TaskItemSkin" width="400" height="50" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Label id="nameTxt" text="111" x="20" y="16"/>
</e:Skin> </e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="TaskSkin" width="400" height="300" xmlns:e="http://ns.egret.com/eui"> <e:Skin class="TaskSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="闯关失败_png" y="27" horizontalCenter="0"/>
<e:Button id="closeBtn" label="" x="609" y="197">
<e:skinName>
<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:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Scroller id="scroll" width="400" height="400" y="279" horizontalCenter="0" scrollPolicyV="on" scrollPolicyH="off">
<e:Group>
<e:List id="list" width="100%" itemRendererSkinName="TaskItemSkin">
<e:ArrayCollection>
<e:Array>
<e:Object a="taskname1"/>
<e:Object a="taskname2"/>
<e:Object a="taskname3"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
</e:Array>
</e:ArrayCollection>
<e:layout>
<e:VerticalLayout gap="0"/>
</e:layout>
</e:List>
</e:Group>
</e:Scroller>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -308,7 +308,10 @@ export default class MapScene extends Scene { ...@@ -308,7 +308,10 @@ export default class MapScene extends Scene {
this['bloodTxt'].text = `${data.remainEnargy}`; this['bloodTxt'].text = `${data.remainEnargy}`;
} }
onTap_taskBtn(){ onTap_taskBtn(){
console.log('onTap_taskBtn') PanelCtrl.instance.show('task');
}
onTap_adBtn(){
PanelCtrl.instance.show('ad');
} }
onTap_signBtn(){ onTap_signBtn(){
NetManager.ins.getSignInfo(() => { NetManager.ins.getSignInfo(() => {
...@@ -318,6 +321,7 @@ export default class MapScene extends Scene { ...@@ -318,6 +321,7 @@ export default class MapScene extends Scene {
protected initEvents() { protected initEvents() {
// this['goldBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_goldBtn, this) // this['goldBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_goldBtn, this)
this['adBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_adBtn, this)
this['taskBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_taskBtn, this) this['taskBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_taskBtn, this)
this['signBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_signBtn, this) this['signBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_signBtn, this)
this['bloodBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_bloodBtn, this) this['bloodBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_bloodBtn, this)
......
import Panel from "../../libs/new_wx/components/Panel"; import Panel from "../../libs/new_wx/components/Panel";
import getHomeData, { BLOOD_NUMS_MAX } from "../getHomeData";
import { NetManager } from "../../libs/tw/manager/NetManager";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { showToast } from "../../libs/new_wx/ctrls/toastCtrl";
import { getlogItem } from "../Main";
import wait from "../../libs/new_tc/wait";
import { showShare } from "../shareCtrl";
import { iswx } from "../iswx";
import getShowOffPic from "../getShowOffPic";
import getSharePic, { getShareUrl } from "../getSharePic";
import CountDown from "../mapScene/CountDown";
import { updateMainTimer } from "../../libs/new_wx/MainBase";
export default class ADPanel extends Panel { export default class ADPanel extends Panel {
start(data) { start(data) {
...@@ -23,15 +11,15 @@ export default class ADPanel extends Panel { ...@@ -23,15 +11,15 @@ export default class ADPanel extends Panel {
// NetManager.ins.showLog(getlogItem(4)); // NetManager.ins.showLog(getlogItem(4));
} }
initEvents() { initEvents() {
super.initEvents(); super.initEvents();
this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this) // this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this)
} }
onTapInvite() { onTapInvite() {
} }
protected get closeBtns(): eui.Button[] { return [this['closeBtn']] } protected get closeBtns(): eui.Button[] { return [this['closeBtn']] }
get skinKey() { return 'Task' } get skinKey() { return 'AD' }
} }
\ No newline at end of file
import Panel from "../../libs/new_wx/components/Panel"; import getSkinPath from "../../libs/new_wx/utils/getSkinPath";
import getHomeData, { BLOOD_NUMS_MAX } from "../getHomeData";
import { NetManager } from "../../libs/tw/manager/NetManager";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { showToast } from "../../libs/new_wx/ctrls/toastCtrl";
import { getlogItem } from "../Main";
import wait from "../../libs/new_tc/wait";
import { showShare } from "../shareCtrl";
import { iswx } from "../iswx";
import getShowOffPic from "../getShowOffPic";
import getSharePic, { getShareUrl } from "../getSharePic";
import CountDown from "../mapScene/CountDown";
import { updateMainTimer } from "../../libs/new_wx/MainBase";
export default class TaskPanel extends Panel { export default class TaskItemRenderer extends eui.ItemRenderer {
start(data) { constructor() {
super.start(); super();
this.showlog(); this.skinName = getSkinPath('TaskItem');
} }
showlog(){ dataChanged(){
// NetManager.ins.showLog(getlogItem(3)); this['nameTxt'].text = this.data + '';
// NetManager.ins.showLog(getlogItem(4));
} }
initEvents() {
super.initEvents();
this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this)
}
onTapInvite() {
}
protected get closeBtns(): eui.Button[] { return [this['closeBtn']] }
get skinKey() { return 'Task' }
} }
\ No newline at end of file
import Panel from "../../libs/new_wx/components/Panel"; import Panel from "../../libs/new_wx/components/Panel";
import getHomeData, { BLOOD_NUMS_MAX } from "../getHomeData"; import TaskItemRenderer from "./TaskItemRenderer";
import { NetManager } from "../../libs/tw/manager/NetManager";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { showToast } from "../../libs/new_wx/ctrls/toastCtrl";
import { getlogItem } from "../Main";
import wait from "../../libs/new_tc/wait";
import { showShare } from "../shareCtrl";
import { iswx } from "../iswx";
import getShowOffPic from "../getShowOffPic";
import getSharePic, { getShareUrl } from "../getSharePic";
import CountDown from "../mapScene/CountDown";
import { updateMainTimer } from "../../libs/new_wx/MainBase";
export default class TaskPanel extends Panel { export default class TaskPanel extends Panel {
public list: eui.List;
start(data) { start(data) {
super.start(); super.start();
this.showlog(); this.showlog();
this.list.useVirtualLayout = false;
this.list.itemRenderer = TaskItemRenderer;
const ac = new eui.ArrayCollection([1,2,3,4,5,6,7,8,9,10]);
this.list.dataProvider = ac;
} }
showlog(){ showlog(){
...@@ -26,7 +21,7 @@ export default class TaskPanel extends Panel { ...@@ -26,7 +21,7 @@ export default class TaskPanel extends Panel {
initEvents() { initEvents() {
super.initEvents(); super.initEvents();
this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this) // this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this)
} }
onTapInvite() { onTapInvite() {
......
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