Commit 99c18372 authored by wildfirecode's avatar wildfirecode

1

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