Commit 67c1faf4 authored by zjz1994's avatar zjz1994

Merge branch 'dev' of http://gitlab2.dui88.com/wanghongyuan/xiaoxiaole into dev

# Conflicts:
#	egret/resource/default.res.json
parents 0b6dffc9 d23d5928
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="HelpBloodSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="HelpBloodSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="help_blood_1_bg_png" y="26" horizontalCenter="0"/> <e:Image source="help_blood_1_bg_png" y="26" horizontalCenter="0" visible="false"/>
<e:Group y="855" horizontalCenter="0"> <e:Group y="855" horizontalCenter="0">
<e:Image id="helpbtn" source="help_blood_1_btn_png" x="0" y="0"/> <e:Image id="helpbtn" source="help_blood_1_btn_png" x="0" y="0"/>
<e:Image id="gobtn" source="help_blood_fail_btn_png" x="0" y="0" visible="false"/> <e:Image id="gobtn" source="help_blood_fail_btn_png" x="0" y="0" 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" source="help_blood_1_text_png" y="0" horizontalCenter="0" visible="false"/> <e:Image id="txt_standby" source="help_blood_1_text_png" y="0" horizontalCenter="0" visible="false"/>
<e:Image id="txt_success" source="help_blood_success_text2_png" horizontalCenter="0" visible="false"/> <e:Image id="txt_success" source="help_blood_success_text2_png" horizontalCenter="0" visible="false"/>
<e:Image id="txt_error2002002026" source="help_blood_fail_text_png" horizontalCenter="0" visible="false"/> <e:Image id="txt_error2002002026" source="help_blood_fail_text_png" horizontalCenter="0" visible="false"/>
......
<?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:Image y="26" horizontalCenter="0" source="help_invite2_png"/> <e:Group id="g1"> </e:Group>
<e:Group y="855" horizontalCenter="0"> <e:Image y="26" horizontalCenter="0" source="help_invite2_png" visible="false"/>
<e:Group y="1000" 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"/>
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="HelpScratchSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="HelpScratchSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image y="26" horizontalCenter="0" source="help_invite2_png"/> <e:Image y="240" horizontalCenter="0" source="help_invite_bg_png"/>
<e:Group y="855" horizontalCenter="0"> <e:Group y="695" horizontalCenter="0">
<e:Image id="helpbtn" x="0" y="0" source="help_invite2_btn_png"/> <e:Image id="helpbtn" y="0" source="help_invite_btn1_png" horizontalCenter="0"/>
<e:Image id="gobtn" x="0" y="0" source="help_invite2_btn2_png" visible="false"/> <e:Image id="go2btn" x="0" y="0" source="help_invite_fail_btn_png" visible="false"/>
<e:Image id="go1btn" source="help_invite_success_btn_png" horizontalCenter="0" visible="false"/>
</e:Group> </e:Group>
<e:Group y="88" width="100%" horizontalCenter="0"> <e:Group y="294" 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_invite_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_invite_success_txt_png" visible="false"/>
<e:Image id="txt_error0200202" horizontalCenter="0" source="help_invite2_text3_png" visible="false"/> <e:Image id="txt_error0000024" source="help_invite_fail_text1_png" horizontalCenter="0" visible="false"/>
<e:Image id="txt_error400017" horizontalCenter="0" source="help_invite2_text4_png" visible="false"/> <e:Image id="txt_error0000022" source="help_invite_fail_text2_png" horizontalCenter="0" visible="false"/>
<e:Image id="txt_error0000023" source="help_invite_fail_text3_png" horizontalCenter="0" visible="false"/>
<e:Image id="txt_errorxxxx" horizontalCenter="0" source="help_invite_fail_text4_png" visible="false"/>
</e:Group> </e:Group>
<e:Image id="closeBtn" source="help_closebtn1_png" x="613" y="238"/>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -392,7 +392,7 @@ export default class MapScene extends Scene { ...@@ -392,7 +392,7 @@ export default class MapScene extends Scene {
if (!window['development']) { if (!window['development']) {
RES.getResAsync(`inviterulepanel_json`); RES.getResAsync(`inviterulepanel_json`);
} }
}, 5 * 1000); }, 10 * 1000);
loadFireworks(); loadFireworks();
......
...@@ -3,10 +3,14 @@ import { NetManager } from "../../../libs/tw/manager/NetManager"; ...@@ -3,10 +3,14 @@ import { NetManager } from "../../../libs/tw/manager/NetManager";
import { getlogItem } from "../../Main"; 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 { gotoNextLevel } from "../gotoNextLevel";
import { loadSvga } from "../../loadSvga";
import getResPath from "../../../libs/new_tc/getResPath";
export default class HelpBloodPanel extends Panel { export default class HelpBloodPanel extends Panel {
netCallback; netCallback;
code; code;
mv1;
mv2;
start(data) { start(data) {
this.netCallback = data.netCallback; this.netCallback = data.netCallback;
this.code = data.code; this.code = data.code;
...@@ -16,6 +20,57 @@ export default class HelpBloodPanel extends Panel { ...@@ -16,6 +20,57 @@ export default class HelpBloodPanel extends Panel {
this['helpbtn'].once(egret.TouchEvent.TOUCH_TAP, this.onClick, 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/blood_success.svga', this).then((mv: egret.DisplayObject) => {
mv.touchEnabled = false;
mv.visible = false;
this.mv1 = mv;
this.mv1.y = -250;
this.tostandby1();
this.mv1.addEventListener(egret.Event.ENTER_FRAME, () => {
if (this.mv1.currentFrame == this.mv1_end)
this.mv1.gotoAndPlay(this.mv1_start);
if (this.mv1.currentFrame == 420) {
this.mv1_start = 421;
this.mv1_end = this.mv1.totalFrames;
}
}, this);
});
loadSvga(getResPath() + 'resource/assets/svgas/blood_fail.svga', this).then((mv: egret.DisplayObject) => {
mv.touchEnabled = false;
mv.visible = true;
this.mv2 = mv;
this.mv2.y = -250;
this.tostandby2();
this.mv2.addEventListener(egret.Event.ENTER_FRAME, () => {
if (this.mv2.currentFrame == this.mv2_end)
this.mv2.gotoAndPlay(this.mv2_start);
if (this.mv2.currentFrame == 420) {
this.mv2_start = 421;
this.mv2_end = this.mv2.totalFrames;
}
}, this);
});
}
mv1_start;
mv1_end;
mv2_start;
mv2_end;
tostandby1() {
this.mv1_start = 1;
this.mv1_end = 180;
}
toAction1() {
this.mv1.gotoAndPlay(181);
}
toAction2() {
this.mv2.gotoAndPlay(181);
}
tostandby2() {
this.mv2_start = 1;
this.mv2_end = 180;
} }
onclick_gobtn() { onclick_gobtn() {
...@@ -27,17 +82,21 @@ export default class HelpBloodPanel extends Panel { ...@@ -27,17 +82,21 @@ export default class HelpBloodPanel extends Panel {
onClick() { onClick() {
this['helpbtn'].visible = false; this['helpbtn'].visible = false;
this['gobtn'].visible = true; this['gobtn'].visible = true;
this.mv1.visible = false;
this.mv2.visible = false;
NetManager.ins.showLog(getlogItem(88)); NetManager.ins.showLog(getlogItem(88));
NetManager.ins.clickLog(getlogItem(87)); NetManager.ins.clickLog(getlogItem(87));
NetManager.ins.doHelpNew((s, res) => { NetManager.ins.doHelpNew((s, res) => {
this.netCallback(); this.netCallback();
this['txt_standby'].visible = false; this['txt_standby'].visible = false;
// doHelpFlag = true;
if (s) { if (s) {
this.mv1.visible = true;
this['txt_success'].visible = true; this['txt_success'].visible = true;
// showToast("助力成功!一起闯关赢现金吧") this.toAction1();
} else { } else {
this.toAction2();
this.mv2.visible = true;
var codeMsgs = {//具体code还没给 var codeMsgs = {//具体code还没给
"2002002016": "不可以给自己助力哦~",// "2002002016": "不可以给自己助力哦~",//
"2002002036": "已经给好友助力过了哦~", "2002002036": "已经给好友助力过了哦~",
......
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 { 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) => {
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() {
...@@ -32,10 +56,15 @@ export default class HelpInvitePanel extends Panel { ...@@ -32,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": "不可以给自己助力哦~",
......
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 { NetManager } from "../../../libs/tw/manager/NetManager";
import { gotoNextLevel } from "../gotoNextLevel"; import { gotoNextLevel } from "../gotoNextLevel";
import { DataManager } from "../../../libs/tw/manager/DataManager";
export default class HelpScratchPanel extends Panel { export default class HelpScratchPanel extends Panel {
netCallback; netCallback;
...@@ -13,12 +11,17 @@ export default class HelpScratchPanel extends Panel { ...@@ -13,12 +11,17 @@ export default class HelpScratchPanel extends Panel {
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['closeBtn'].once(egret.TouchEvent.TOUCH_TAP, this.onclick_closeBtn, this);
this['go2btn'].once(egret.TouchEvent.TOUCH_TAP, this.onclick_gobtn, this);
this['go1btn'].once(egret.TouchEvent.TOUCH_TAP, this.onclick_gobtn, this);
this['helpbtn'].once(egret.TouchEvent.TOUCH_TAP, this.onClick, 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;
} }
onclick_closeBtn() {
this.hidePanel();
}
onclick_gobtn() { onclick_gobtn() {
// NetManager.ins.clickLog(getlogItem(88)); // NetManager.ins.clickLog(getlogItem(88));
this.hidePanel(); this.hidePanel();
...@@ -27,28 +30,46 @@ export default class HelpScratchPanel extends Panel { ...@@ -27,28 +30,46 @@ export default class HelpScratchPanel extends Panel {
onClick() { onClick() {
this['helpbtn'].visible = false; this['helpbtn'].visible = false;
this['gobtn'].visible = true;
const _code = this.code.slice(8); const _code = this.code.slice(8);
NetManager.ins.scratchDoHelp((success, res) => { NetManager.ins.scratchDoHelp((success, res) => {
this.netCallback(); this.netCallback();
switch (true) {
case (res.code == "0000024"): this['txt_standby'].visible = false;
showToast("今日刮卡次数已达到上线限哦~"); if (success) {
break; this['go1btn'].visible = true;
case (res.code == "0000022"): this['txt_success'].visible = true;
showToast("不可以给自己刮哦~"); } else {
break; this['go2btn'].visible = true;
case (res.code == "0000023"): var codeMsgs = {
showToast("已经给好友刮过了哦~"); "0000024": "今日刮卡次数已达到上线限哦~",
break; "0000022": "不可以给自己刮哦~",
default: "0000023": "已经给好友刮过了哦~",
break; }
} if (res && codeMsgs[res.code] && this[`txt_error${res.code}`]) {
if (!success) { this[`txt_error${res.code}`].visible = true;
return; } else {
showToast(res && codeMsgs[res.code] ? codeMsgs[res.code] : "助力失败");
}
} }
showToast("助力成功,参与闯关赢现金"/*"帮刮成功!"*/);
// switch (true) {
// case (res.code == "0000024"):
// showToast("今日刮卡次数已达到上线限哦~");
// break;
// case (res.code == "0000022"):
// showToast("不可以给自己刮哦~");
// break;
// case (res.code == "0000023"):
// showToast("已经给好友刮过了哦~");
// break;
// default:
// break;
// }
// if (!success) {
// return;
// }
// showToast("助力成功,参与闯关赢现金"/*"帮刮成功!"*/);
}, _code); }, _code);
} }
......
{ {
"success": false, "success": true,
"code": "2002002036", "code": "2002002036",
"desc": "OK", "desc": "OK",
"timestamp": 1571052938097, "timestamp": 1571052938097,
......
{ {
"success":true, "success":0,
"code":null, "code":"0000023",
"desc":null, "desc":null,
"timestamp":1566199822308, "timestamp":1566199822308,
"data":"" "data":""
......
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