Commit d7b67162 authored by wildfirecode's avatar wildfirecode

Merge branch 'hotfix20200325' into dev

parents fab95b7a aa1f2945
......@@ -81,6 +81,7 @@ import BackIndexPanel from "../../src/panels/BackIndexPanel";
import HelpBloodPanel from "../../src/panels/help/HelpBloodPanel";
import HelpInvitePanel from "../../src/panels/help/HelpInvitePanel";
import HelpScratchPanel from "../../src/panels/help/HelpScratchPanel";
import HelpInvitePanel2 from "../../src/panels/help/HelpInvitePanel2";
export default class MainBase extends eui.UILayer {
constructor() {
......@@ -171,6 +172,7 @@ export default class MainBase extends eui.UILayer {
['recharge', { cls: RechargePanel }],
['HelpBloodPanel', { cls: HelpBloodPanel }],
['HelpInvitePanel', { cls: HelpInvitePanel }],
['HelpInvitePanel2', { cls: HelpInvitePanel2 }],
['HelpScratchPanel', { cls: HelpScratchPanel }],
];
......
......@@ -74,8 +74,8 @@ export default class MapScene extends Scene {
else if (code.indexOf("12345678") == -1) { // 邀请有礼
const dojoin = DataManager.ins.getData('hc_doJoin');
if (!dojoin) {
showToast("开启消除之旅");
return false;
panels.push('HelpInvitePanel2');
return true;
}
const netCallback = () => { doHelpFlag = true; };
panels.push('HelpInvitePanel');
......
......@@ -11,16 +11,15 @@ import wait from "../../../libs/new_tc/wait";
export default class HelpBloodPanel extends Panel {
netCallback;
code;
// mv1;
// mv2;
success;
list: any[];
async start(data) {
this.netCallback = data.netCallback;
this.code = data.code;
NetManager.ins.showLog(getlogItem(87));
const s = new egret.Sprite();
this.addChildAt(s,0);
s.y=-250;
this.addChildAt(s, 0);
s.y = -250;
this['txt_standby'].visible = true;
this['helpbtn'].visible = true;
......@@ -46,11 +45,14 @@ export default class HelpBloodPanel extends Panel {
loadSvga(getResPath() + 'resource/assets/svgas/bloodbg.svga', s);
}
onclick_gobtn() {
NetManager.ins.clickLog(getlogItem(88));
if (this.success)
NetManager.ins.clickLog(getlogItem(88));
// else
// NetManager.ins.clickLog(getlogItem(0));
this.hidePanel();
gotoNextLevel();
}
......@@ -58,11 +60,11 @@ export default class HelpBloodPanel extends Panel {
onClick() {
NetManager.ins.clickLog(getlogItem(87));
NetManager.ins.showLog(getlogItem(88));
NetManager.ins.doHelpNew(async (s, res) => {
this.netCallback();
if (s) {
this.success = 1;
NetManager.ins.showLog(getlogItem(88));
play2(this.list[1]);
this.list[0].visible = false;
this.list[1].visible = true;
......@@ -72,6 +74,7 @@ export default class HelpBloodPanel extends Panel {
this['txt_standby'].visible = false;
this['txt_success'].visible = true;
} else {
// NetManager.ins.showLog(getlogItem(0));
this.list[2].visible = true;
play2(this.list[2]);
this['helpbtn'].visible = false;
......
......@@ -6,20 +6,22 @@ import { NetManager } from "../../../libs/tw/manager/NetManager";
import { loadSvga } from "../../loadSvga";
import { gotoNextLevel } from "../gotoNextLevel";
import { getlogItem } from "../../Main";
import wait from "../../../libs/new_tc/wait";
export default class HelpInvitePanel extends Panel {
netCallback;
code;
success;
async start(data) {
this.netCallback = data.netCallback;
this.code = data.code;
NetManager.ins.showLog(getlogItem(91));
const s = new egret.Sprite();
this.addChildAt(s,0);
this.addChildAt(s, 0);
this['txt_standby'].visible = true;
this['helpbtn'].visible = true;
this['txt_standby'].visible = false;
this['helpbtn'].visible = false;
this['gobtn'].visible = true;
loadSvga(getResPath() + 'resource/assets/svgas/invitebg.svga', this).then((mv: egret.DisplayObject) => {
s.addChild(mv);
......@@ -33,45 +35,47 @@ export default class HelpInvitePanel extends Panel {
]);
// this['list'][0].visible=false;
this['list'][1].visible=false;
this['list'][2].visible=false;
this['list'][0].y=-140;
this['list'][1].y=-140;
this['list'][2].y=-140;
this['list'][1].visible = false;
this['list'][2].visible = false;
this['list'][0].y = -140;
this['list'][1].y = -140;
this['list'][2].y = -140;
this.addChild(this['list'][0]);
this.addChild(this['list'][1]);
this.addChild(this['list'][2]);
this['gobtn'].once(egret.TouchEvent.TOUCH_TAP, this.onclick_gobtn, this);
this['helpbtn'].once(egret.TouchEvent.TOUCH_TAP, this.onClick, this);
// wait(100).then(()=>{
this.onClick();
// })
}
onclick_gobtn() {
// NetManager.ins.clickLog(getlogItem(88));
this.hidePanel();
gotoNextLevel();
NetManager.ins.clickLog(getlogItem(92));
if (this.success)
NetManager.ins.clickLog(getlogItem(92));
// else
// NetManager.ins.clickLog(getlogItem(0));
}
onClick() {
NetManager.ins.clickLog(getlogItem(91));
NetManager.ins.showLog(getlogItem(92));
this['helpbtn'].visible = false;
this['gobtn'].visible = true;
const dojoin = DataManager.ins.getData('hc_doJoin');
NetManager.ins.doHelp((success, res) => {
this.netCallback();
this['list'][0].visible=false;
this['txt_standby'].visible = false;
this['list'][0].visible = false;
if (success) {
this['list'][1].visible=true;
this.success = 1;
NetManager.ins.showLog(getlogItem(92));
this['list'][1].visible = true;
this['list'][1].gotoAndPlay(1);
this['txt_success'].visible = true;
} else {
// NetManager.ins.showLog(getlogItem(0));
this['list'][2].gotoAndPlay(1);
this['list'][2].visible=true;
this['list'][2].visible = true;
var codeMsgs = {
"400017": "您不是新用户呢~",
"0000022": "不可以给自己助力哦~",
......
import getResPath from "../../../libs/new_tc/getResPath";
import Panel from "../../../libs/new_wx/components/Panel";
import { showToast } from "../../../libs/new_wx/ctrls/toastCtrl";
import { DataManager } from "../../../libs/tw/manager/DataManager";
import { NetManager } from "../../../libs/tw/manager/NetManager";
import { loadSvga } from "../../loadSvga";
import { gotoNextLevel } from "../gotoNextLevel";
import { getlogItem } from "../../Main";
export default class HelpInvitePanel2 extends Panel {
// netCallback;
// code;
async start(data) {
// this.netCallback = data.netCallback;
// this.code = data.code;
NetManager.ins.showLog(getlogItem(91));
const s = new egret.Sprite();
this.addChildAt(s,0);
this['txt_standby'].visible = true;
this['helpbtn'].visible = true;
loadSvga(getResPath() + 'resource/assets/svgas/invitebg.svga', this).then((mv: egret.DisplayObject) => {
s.addChild(mv);
mv.y = -180;
});
this['list'] = await Promise.all([
loadSvga(getResPath() + 'resource/assets/svgas/inviteAct1.svga')
]);
this['list'][0].y=-140;
this.addChild(this['list'][0]);
this['helpbtn'].once(egret.TouchEvent.TOUCH_TAP, this.onClick, this);
}
onClick() {
NetManager.ins.clickLog(getlogItem(91));
this.hidePanel();
gotoNextLevel();
}
get skinResKey() { return 'helpGroup' }
get skinKey() { return 'HelpInvite' }
}
\ No newline at end of file
......@@ -9,6 +9,7 @@ import wait from "../../../libs/new_tc/wait";
import { getlogItem } from "../../Main";
export default class HelpScratchPanel extends Panel {
netCallback;
code;
list: any[];
......@@ -85,12 +86,6 @@ export default class HelpScratchPanel extends Panel {
await play2(this.list[0]);
this['light'].visible = true;
});
// setTimeout(() => {
// }, 2000);
}
startAni() {
......@@ -109,6 +104,7 @@ export default class HelpScratchPanel extends Panel {
onclick_gobtn2() {
this.hidePanel();
gotoNextLevel();
// NetManager.ins.clickLog(getlogItem(0));
}
onClick() {
......@@ -130,6 +126,7 @@ export default class HelpScratchPanel extends Panel {
await play2(this.list[1]);
this['light'].visible = true;
} else {
// NetManager.ins.showLog(getlogItem(0));
this['go2btn'].visible = true;
this.list[2].visible = true;
var codeMsgs = {
......
{
"success":0,
"success":1,
"code":"0200202",
"desc":null,
"timestamp":1566199822308,
......
{
"success": 1,
"success": 0,
"code": "2002002036",
"desc": "OK",
"timestamp": 1571052938097,
......
{
"success":1,
"success":0,
"code":"0000023",
"desc":null,
"timestamp":1566199822308,
......
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