Commit 35baf4e8 authored by wildfirecode's avatar wildfirecode

1

parent 750d53bc
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="HelpInviteSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="HelpInviteSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Group id="g1"> <e:Group id="g1"> </e:Group>
<e:Image y="26" horizontalCenter="0" source="help_invite2_png" visible="false"/>
</e:Group> <e:Group y="1000" horizontalCenter="0">
<e:Image y="26" horizontalCenter="0" source="help_invite2_png"/>
<e:Group y="855" horizontalCenter="0">
<e:Image id="helpbtn" x="0" y="0" source="help_invite2_btn_png"/> <e:Image id="helpbtn" x="0" y="0" source="help_invite2_btn_png"/>
<e:Image id="gobtn" x="0" y="0" source="help_invite2_btn2_png" visible="false"/> <e:Image id="gobtn" x="0" y="0" source="help_invite2_btn2_png" visible="false"/>
</e:Group> </e:Group>
<e:Group y="88" width="100%" horizontalCenter="0"> <e:Group y="108 " width="100%" horizontalCenter="0">
<e:Image id="txt_standby" y="0" horizontalCenter="0" source="help_invite2_text_png" visible="false"/> <e:Image id="txt_standby" y="0" horizontalCenter="0" source="help_invite2_text_png" visible="false"/>
<e:Image id="txt_success" horizontalCenter="0" source="help_invite2_text2_png" visible="false"/> <e:Image id="txt_success" horizontalCenter="0" source="help_invite2_text2_png" visible="false"/>
<e:Image id="txt_error0200202" horizontalCenter="0" source="help_invite2_text3_png" visible="false"/> <e:Image id="txt_error0200202" horizontalCenter="0" source="help_invite2_text3_png" visible="false"/>
......
import getResPath from "../../../libs/new_tc/getResPath";
import Panel from "../../../libs/new_wx/components/Panel"; import Panel from "../../../libs/new_wx/components/Panel";
import { NetManager } from "../../../libs/tw/manager/NetManager";
import { getlogItem } from "../../Main";
import { showToast } from "../../../libs/new_wx/ctrls/toastCtrl"; import { showToast } from "../../../libs/new_wx/ctrls/toastCtrl";
import { gotoNextLevel } from "../gotoNextLevel";
import { DataManager } from "../../../libs/tw/manager/DataManager"; import { DataManager } from "../../../libs/tw/manager/DataManager";
import { NetManager } from "../../../libs/tw/manager/NetManager";
import { loadSvga } from "../../loadSvga"; import { loadSvga } from "../../loadSvga";
import getResPath from "../../../libs/new_tc/getResPath"; import { gotoNextLevel } from "../gotoNextLevel";
export default class HelpInvitePanel extends Panel { export default class HelpInvitePanel extends Panel {
netCallback; netCallback;
code; code;
start(data) { async start(data) {
this.netCallback = data.netCallback; this.netCallback = data.netCallback;
this.code = data.code; this.code = data.code;
// NetManager.ins.showLog(getlogItem(87)); // NetManager.ins.showLog(getlogItem(87));
this['gobtn'].once(egret.TouchEvent.TOUCH_TAP, this.onclick_gobtn, this);
this['helpbtn'].once(egret.TouchEvent.TOUCH_TAP, this.onClick, this);
this['txt_standby'].visible = true; this['txt_standby'].visible = true;
this['helpbtn'].visible = true; this['helpbtn'].visible = true;
loadSvga(getResPath() + 'resource/assets/svgas/invitebg.svga', this).then((mv: egret.DisplayObject) => { loadSvga(getResPath() + 'resource/assets/svgas/invitebg.svga', this).then((mv: egret.DisplayObject) => {
this['g1'].addChild(mv) this['g1'].addChild(mv);
mv.y = -180;
}); });
this['list'] = await Promise.all([
loadSvga(getResPath() + 'resource/assets/svgas/inviteAct1.svga'),
loadSvga(getResPath() + 'resource/assets/svgas/inviteAct2.svga'),
loadSvga(getResPath() + 'resource/assets/svgas/inviteAct3.svga'),
]);
// 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.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);
} }
onclick_gobtn() { onclick_gobtn() {
...@@ -38,10 +56,15 @@ export default class HelpInvitePanel extends Panel { ...@@ -38,10 +56,15 @@ export default class HelpInvitePanel extends Panel {
const dojoin = DataManager.ins.getData('hc_doJoin'); const dojoin = DataManager.ins.getData('hc_doJoin');
NetManager.ins.doHelp((success, res) => { NetManager.ins.doHelp((success, res) => {
this.netCallback(); this.netCallback();
this['list'][0].visible=false;
this['txt_standby'].visible = false; this['txt_standby'].visible = false;
if (success) { if (success) {
this['list'][1].visible=true;
this['list'][1].gotoAndPlay(1);
this['txt_success'].visible = true; this['txt_success'].visible = true;
} else { } else {
this['list'][2].gotoAndPlay(1);
this['list'][2].visible=true;
var codeMsgs = { var codeMsgs = {
"400017": "您不是新用户呢~", "400017": "您不是新用户呢~",
"0000022": "不可以给自己助力哦~", "0000022": "不可以给自己助力哦~",
......
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