Commit 99c18372 authored by wildfirecode's avatar wildfirecode

1

parent d9bf161c
...@@ -8,6 +8,8 @@ import { ModuleTypes } from "../../libs/new_wx/types/sceneTypes"; ...@@ -8,6 +8,8 @@ import { ModuleTypes } from "../../libs/new_wx/types/sceneTypes";
import getHomeData from "../getHomeData"; import getHomeData from "../getHomeData";
import getShowOffPic from "../getShowOffPic"; import getShowOffPic from "../getShowOffPic";
import getSharePic from "../getSharePic"; import getSharePic from "../getSharePic";
import { getlogItem } from "../Main";
import { NetManager } from "../../libs/tw/manager/NetManager";
export default class MapScene extends Scene { export default class MapScene extends Scene {
scrollGroup: eui.Group; scrollGroup: eui.Group;
...@@ -57,7 +59,16 @@ export default class MapScene extends Scene { ...@@ -57,7 +59,16 @@ export default class MapScene extends Scene {
// }, 2000); // }, 2000);
this.updateHomeData(); this.updateHomeData();
this.showLog();
}
showLog(){
NetManager.ins.showLog(getlogItem(1));
NetManager.ins.showLog(getlogItem(2));
NetManager.ins.showLog(getlogItem(5));
} }
updateScene() { updateScene() {
this.updateHomeData(); this.updateHomeData();
} }
...@@ -87,7 +98,8 @@ export default class MapScene extends Scene { ...@@ -87,7 +98,8 @@ export default class MapScene extends Scene {
this.toggleSettings(); this.toggleSettings();
} }
onTap_shopBtn() { onTap_shopBtn() {
PanelCtrl.instance.show('Shop') PanelCtrl.instance.show('Shop');
NetManager.ins.clickLog(getlogItem(5));
} }
toggleSettings() { toggleSettings() {
...@@ -99,6 +111,7 @@ export default class MapScene extends Scene { ...@@ -99,6 +111,7 @@ export default class MapScene extends Scene {
// } // }
onTap_bloodBtn() { onTap_bloodBtn() {
NetManager.ins.clickLog(getlogItem(2));
PanelCtrl.instance.show('bloodPanel') PanelCtrl.instance.show('bloodPanel')
} }
......
...@@ -3,11 +3,18 @@ import getHomeData from "../getHomeData"; ...@@ -3,11 +3,18 @@ import getHomeData from "../getHomeData";
import { NetManager } from "../../libs/tw/manager/NetManager"; import { NetManager } from "../../libs/tw/manager/NetManager";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl"; import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { showToast } from "../../libs/new_wx/ctrls/toastCtrl"; import { showToast } from "../../libs/new_wx/ctrls/toastCtrl";
import { getlogItem } from "../Main";
export default class BloodPanel extends Panel { export default class BloodPanel extends Panel {
start(data) { start(data) {
super.start(); super.start();
this.updateData(); this.updateData();
this.showlog();
}
showlog(){
NetManager.ins.showLog(getlogItem(3));
NetManager.ins.showLog(getlogItem(4));
} }
private updateData() { private updateData() {
...@@ -26,6 +33,7 @@ export default class BloodPanel extends Panel { ...@@ -26,6 +33,7 @@ export default class BloodPanel extends Panel {
} }
onTapBuy() { onTapBuy() {
NetManager.ins.clickLog(getlogItem(3));
this['buyBtn'].enabled = false; this['buyBtn'].enabled = false;
NetManager.ins.hc_exchange((success) => { NetManager.ins.hc_exchange((success) => {
this['buyBtn'].enabled = true; this['buyBtn'].enabled = true;
...@@ -39,6 +47,7 @@ export default class BloodPanel extends Panel { ...@@ -39,6 +47,7 @@ export default class BloodPanel extends Panel {
} }
onTapInvite() { onTapInvite() {
NetManager.ins.clickLog(getlogItem(4));
const data = getHomeData(); const data = getHomeData();
if (data.shared) { if (data.shared) {
showToast('今日已经分享过了.'); showToast('今日已经分享过了.');
......
...@@ -2,6 +2,7 @@ import Panel from "../../libs/new_wx/components/Panel"; ...@@ -2,6 +2,7 @@ import Panel from "../../libs/new_wx/components/Panel";
import { NetManager } from "../../libs/tw/manager/NetManager"; import { NetManager } from "../../libs/tw/manager/NetManager";
import PropType from "../PropType"; import PropType from "../PropType";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl"; import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { getlogItem } from "../Main";
export default class ShopPanel extends Panel { export default class ShopPanel extends Panel {
buyBtn1:eui.Button; buyBtn1:eui.Button;
...@@ -12,6 +13,13 @@ export default class ShopPanel extends Panel { ...@@ -12,6 +13,13 @@ export default class ShopPanel extends Panel {
this['buyBtn1'].addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBuy1,this); this['buyBtn1'].addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBuy1,this);
this['buyBtn2'].addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBuy2,this); this['buyBtn2'].addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBuy2,this);
this['buyBtn3'].addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBuy3,this); this['buyBtn3'].addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBuy3,this);
this.showLog();
}
showLog(){
NetManager.ins.showLog(getlogItem(6));
NetManager.ins.showLog(getlogItem(9));
NetManager.ins.showLog(getlogItem(12));
} }
onBuy1(){ onBuy1(){
......
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