Commit dff8c6d1 authored by 邱旭's avatar 邱旭

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

parents 38fa88e1 fab95b7a
...@@ -127,8 +127,8 @@ ...@@ -127,8 +127,8 @@
// localStorage.clear(); // localStorage.clear();
window['imgver'] = '11112'; window['imgver'] = '11112';
//top 8 ,repeat 22 , bottom 3 //top 8 ,repeat 22 , bottom 3
window['total_level'] = 8 + 3 + 22 * 25; window['total_level'] = 8 + 3 + 22 * 26;
window['last_level'] = 550; window['last_level'] = 575;
var sharePic = document.getElementById('pic'); var sharePic = document.getElementById('pic');
sharePic.onclick = function () { sharePic.onclick = function () {
......
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"helpGroup","version":5,"files":["../assets/help/help_invite2_text4.png","../assets/help/help_invite2_text3.png","../assets/help/help_invite2_text2.png","../assets/help/help_invite2_text.png","../assets/help/help_invite2_btn2.png","../assets/help/help_invite2_btn.png","../assets/help/help_invite_text.png","../assets/help/help_invite_success_txt.png","../assets/help/help_invite_success_btn.png","../assets/help/help_invite_fail_text4.png","../assets/help/help_invite_fail_text3.png","../assets/help/help_invite_fail_text2.png","../assets/help/help_invite_fail_text1.png","../assets/help/help_invite_fail_btn.png","../assets/help/help_invite_btn1.png","../assets/help/help_invite_bg.png","../assets/help/help_closebtn1.png","../assets/help/help_blood_success_text2.png","../assets/help/help_blood_success_text.png","../assets/help/help_blood_fail_text4.png","../assets/help/help_blood_fail_text3.png","../assets/help/help_blood_fail_text2.png","../assets/help/help_blood_fail_text.png","../assets/help/help_blood_fail_btn.png","../assets/help/help_blood_1_text.png","../assets/help/help_blood_1_btn.png","../assets/help/help_card_prize.png","../assets/help/help_light.png","../assets/help/help_card_bg.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["../assets/help/help_light.png"]}
\ No newline at end of file
{ {
"skins": {}, "skins": {},
"autoGenerateExmlsList": true, "autoGenerateExmlsList": true,
"exmls": [ "exmls": [
"resource/skins/HelpScratchSkin.exml", "resource/skins/ADSkin.exml",
"resource/skins/HelpBloodSkin.exml", "resource/skins/ADSmallSkin.exml",
"resource/skins/HelpInviteSkin.exml", "resource/skins/AlertSkin.exml",
"resource/skins/ADSkin.exml", "resource/skins/AvatarSkin.exml",
"resource/skins/ADSmallSkin.exml", "resource/skins/BackIndexSkin.exml",
"resource/skins/AlertSkin.exml", "resource/skins/BackSkin.exml",
"resource/skins/AvatarSkin.exml", "resource/skins/BagItem2Skin.exml",
"resource/skins/BackIndexSkin.exml", "resource/skins/BagItemSkin.exml",
"resource/skins/BackSkin.exml", "resource/skins/BagQuitSkin.exml",
"resource/skins/BagItem2Skin.exml", "resource/skins/BagSkin.exml",
"resource/skins/BagItemSkin.exml", "resource/skins/Blood2Skin.exml",
"resource/skins/BagQuitSkin.exml", "resource/skins/BloodSkin.exml",
"resource/skins/BagSkin.exml", "resource/skins/Box2Skin.exml",
"resource/skins/Blood2Skin.exml", "resource/skins/BoxSkin.exml",
"resource/skins/BloodSkin.exml", "resource/skins/Buy1Skin.exml",
"resource/skins/Box2Skin.exml", "resource/skins/Buy2Skin.exml",
"resource/skins/BoxSkin.exml", "resource/skins/Buy3Skin.exml",
"resource/skins/Buy1Skin.exml", "resource/skins/ExchangeSkin.exml",
"resource/skins/Buy2Skin.exml", "resource/skins/FailSkin.exml",
"resource/skins/Buy3Skin.exml", "resource/skins/FriendItem2Skin.exml",
"resource/skins/ExchangeSkin.exml", "resource/skins/FriendItemSkin.exml",
"resource/skins/FailSkin.exml", "resource/skins/FriendShareSkin.exml",
"resource/skins/FriendItem2Skin.exml", "resource/skins/FriendSkin.exml",
"resource/skins/FriendItemSkin.exml", "resource/skins/H52Skin.exml",
"resource/skins/FriendShareSkin.exml", "resource/skins/H5Skin.exml",
"resource/skins/FriendSkin.exml", "resource/skins/HbCutTimeSkin.exml",
"resource/skins/H52Skin.exml", "resource/skins/HbGameSkin.exml",
"resource/skins/H5Skin.exml", "resource/skins/HbNoPrizeSkin.exml",
"resource/skins/HbCutTimeSkin.exml", "resource/skins/HbPrizeSkin.exml",
"resource/skins/HbGameSkin.exml", "resource/skins/HbRuleSkin.exml",
"resource/skins/HbNoPrizeSkin.exml", "resource/skins/HelpBloodSkin.exml",
"resource/skins/HbPrizeSkin.exml", "resource/skins/HelpInviteSkin.exml",
"resource/skins/HbRuleSkin.exml", "resource/skins/HelpScratchSkin.exml",
"resource/skins/IconButtonSkin.exml", "resource/skins/IconButtonSkin.exml",
"resource/skins/InviteCutTimePanelSkin.exml", "resource/skins/InviteCutTimePanelSkin.exml",
"resource/skins/InviteItemSkin.exml", "resource/skins/InviteItemSkin.exml",
"resource/skins/InvitePrizePanelSkin.exml", "resource/skins/InvitePrizePanelSkin.exml",
"resource/skins/InviteRulePanelSkin.exml", "resource/skins/InviteRulePanelSkin.exml",
"resource/skins/InviteRuleSkin.exml", "resource/skins/InviteRuleSkin.exml",
"resource/skins/InviteSkin.exml", "resource/skins/InviteSkin.exml",
"resource/skins/Main2Skin.exml", "resource/skins/Main2Skin.exml",
"resource/skins/MapBottomSkin.exml", "resource/skins/MapBottomSkin.exml",
"resource/skins/MapRepeatSkin.exml", "resource/skins/MapRepeatSkin.exml",
"resource/skins/MapSkin.exml", "resource/skins/MapSkin.exml",
"resource/skins/MapTopSkin.exml", "resource/skins/MapTopSkin.exml",
"resource/skins/NoPrizeSkin.exml", "resource/skins/NoPrizeSkin.exml",
"resource/skins/OptionItemSkin.exml", "resource/skins/OptionItemSkin.exml",
"resource/skins/OptionsSkin.exml", "resource/skins/OptionsSkin.exml",
"resource/skins/PlaySkin.exml", "resource/skins/PlaySkin.exml",
"resource/skins/Prize2Skin.exml", "resource/skins/Prize2Skin.exml",
"resource/skins/PrizeSkin.exml", "resource/skins/PrizeSkin.exml",
"resource/skins/QuitSkin.exml", "resource/skins/QuitSkin.exml",
"resource/skins/RankFriendListSkin.exml", "resource/skins/RankFriendListSkin.exml",
"resource/skins/RankItemSkin.exml", "resource/skins/RankItemSkin.exml",
"resource/skins/RankSkin.exml", "resource/skins/RankSkin.exml",
"resource/skins/RechargeSkin.exml", "resource/skins/RechargeSkin.exml",
"resource/skins/RedBagActivitySkin.exml", "resource/skins/RedBagActivitySkin.exml",
"resource/skins/RedBagAlertSkin.exml", "resource/skins/RedBagAlertSkin.exml",
"resource/skins/RedBombAlertSkin.exml", "resource/skins/RedBombAlertSkin.exml",
"resource/skins/RedBombRuleSkin.exml", "resource/skins/RedBombRuleSkin.exml",
"resource/skins/RedBombTips2Skin.exml", "resource/skins/RedBombTips2Skin.exml",
"resource/skins/RedBombTipsSkin.exml", "resource/skins/RedBombTipsSkin.exml",
"resource/skins/ReliveSkin.exml", "resource/skins/ReliveSkin.exml",
"resource/skins/RuleSkin.exml", "resource/skins/RuleSkin.exml",
"resource/skins/ScratchItemSkin.exml", "resource/skins/ScratchItemSkin.exml",
"resource/skins/ScratchPrizeSkin.exml", "resource/skins/ScratchPrizeSkin.exml",
"resource/skins/ScratchRuleSkin.exml", "resource/skins/ScratchRuleSkin.exml",
"resource/skins/ScratchSkin.exml", "resource/skins/ScratchSkin.exml",
"resource/skins/Share2Skin.exml", "resource/skins/Share2Skin.exml",
"resource/skins/Share3Skin.exml", "resource/skins/Share3Skin.exml",
"resource/skins/ShareCodePanelSkin.exml", "resource/skins/ShareCodePanelSkin.exml",
"resource/skins/ShareSkin.exml", "resource/skins/ShareSkin.exml",
"resource/skins/ShareTipsSkin.exml", "resource/skins/ShareTipsSkin.exml",
"resource/skins/ShopSkin.exml", "resource/skins/ShopSkin.exml",
"resource/skins/ShopTipSkin.exml", "resource/skins/ShopTipSkin.exml",
"resource/skins/ShowOffSkin.exml", "resource/skins/ShowOffSkin.exml",
"resource/skins/SignItemSkin.exml", "resource/skins/SignItemSkin.exml",
"resource/skins/SignPrizeSkin.exml", "resource/skins/SignPrizeSkin.exml",
"resource/skins/SignSkin.exml", "resource/skins/SignSkin.exml",
"resource/skins/StarSkin.exml", "resource/skins/StarSkin.exml",
"resource/skins/StartPanelSkin.exml", "resource/skins/StartPanelSkin.exml",
"resource/skins/StartSkin.exml", "resource/skins/StartSkin.exml",
"resource/skins/TargetItemSkin.exml", "resource/skins/TargetItemSkin.exml",
"resource/skins/TaskCenterItemSkin.exml", "resource/skins/TaskCenterItemSkin.exml",
"resource/skins/TaskCenterNoPrizeSkin.exml", "resource/skins/TaskCenterNoPrizeSkin.exml",
"resource/skins/TaskCenterPrizeSkin.exml", "resource/skins/TaskCenterPrizeSkin.exml",
"resource/skins/TaskCenterSkin.exml", "resource/skins/TaskCenterSkin.exml",
"resource/skins/TaskItemSkin.exml", "resource/skins/TaskItemSkin.exml",
"resource/skins/TaskPrizeSkin.exml", "resource/skins/TaskPrizeSkin.exml",
"resource/skins/TaskSkin.exml", "resource/skins/TaskSkin.exml",
"resource/skins/Toast2Skin.exml", "resource/skins/Toast2Skin.exml",
"resource/skins/ToastSkin.exml", "resource/skins/ToastSkin.exml",
"resource/skins/TurnRuleSkin.exml", "resource/skins/TurnRuleSkin.exml",
"resource/skins/TurntableNoPrizeSkin.exml", "resource/skins/TurntableNoPrizeSkin.exml",
"resource/skins/TurntablePrize2Skin.exml", "resource/skins/TurntablePrize2Skin.exml",
"resource/skins/TurntablePrizeSkin.exml", "resource/skins/TurntablePrizeSkin.exml",
"resource/skins/TurntableSkin.exml", "resource/skins/TurntableSkin.exml",
"resource/skins/VScrollBarSkin.exml" "resource/skins/VScrollBarSkin.exml"
], ],
"path": "resource/default.thm.json" "path": "resource/default.thm.json"
} }
\ No newline at end of file
<?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" visible="false"/> <e:Group id="g1" y="-250"> </e:Group>
<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="108" width="100%" horizontalCenter="0"> <e:Group y="128" 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:Group id="g1"> </e:Group> <e:Group id="g1"> </e:Group>
<e:Image y="26" horizontalCenter="0" source="help_invite2_png" visible="false"/>
<e:Group y="1000" horizontalCenter="0"> <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"/>
......
<?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="240" horizontalCenter="0" source="help_invite_bg_png"/> <e:Image id="light" source="help_light_png" y="401.34" x="381.82" anchorOffsetX="381.82" anchorOffsetY="421.22"/>
<e:Group y="695" horizontalCenter="0"> <e:Image y="352.12" horizontalCenter="0" source="help_invite_bg_png"/>
<e:Group y="807.12" horizontalCenter="0">
<e:Image id="helpbtn" y="0" source="help_invite_btn1_png" horizontalCenter="0"/> <e:Image id="helpbtn" y="0" source="help_invite_btn1_png" horizontalCenter="0"/>
<e:Image id="go2btn" x="0" y="0" source="help_invite_fail_btn_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:Image id="go1btn" source="help_invite_success_btn_png" horizontalCenter="0" visible="false"/>
</e:Group> </e:Group>
<e:Group y="294" width="100%" horizontalCenter="0"> <e:Group y="406.12" width="100%" horizontalCenter="0">
<e:Image id="txt_standby" y="0" horizontalCenter="0" source="help_invite_text_png" visible="false"/> <e:Image id="txt_standby" y="0" horizontalCenter="0" source="help_invite_text_png"/>
<e:Image id="txt_success" horizontalCenter="0" source="help_invite_success_txt_png" visible="false"/> <e:Image id="txt_success" horizontalCenter="0" source="help_invite_success_txt_png" visible="false"/>
<e:Image id="txt_error0000024" source="help_invite_fail_text1_png" horizontalCenter="0" visible="false"/> <e:Image id="txt_error0000024" source="help_invite_fail_text1_png" horizontalCenter="0" visible="false"/>
<e:Image id="txt_error0000022" source="help_invite_fail_text2_png" horizontalCenter="0" 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_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: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:Image id="closeBtn" source="help_closebtn1_png" x="613" y="350.12"/>
<e:Image source="help_card_bg_png" y="497.48" x="94"/>
<e:Image id="prizeImg" source="help_card_prize_png" x="121.5" y="517.96" width="508" height="227"/>
</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`);
} }
}, 10 * 1000); }, 20 * 1000);
loadFireworks(); loadFireworks();
......
...@@ -24,6 +24,7 @@ export default class ADPanel extends Panel { ...@@ -24,6 +24,7 @@ export default class ADPanel extends Panel {
this.data.img = result.img; this.data.img = result.img;
this['adBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => { this['adBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if(result.url=='0')return;
NetManager.ins.clickLog(getlogItem(25)); NetManager.ins.clickLog(getlogItem(25));
wait(100).then(()=>{ wait(100).then(()=>{
window.location.href = result.url; window.location.href = result.url;
......
...@@ -5,72 +5,48 @@ import { showToast } from "../../../libs/new_wx/ctrls/toastCtrl"; ...@@ -5,72 +5,48 @@ import { showToast } from "../../../libs/new_wx/ctrls/toastCtrl";
import { gotoNextLevel } from "../gotoNextLevel"; import { gotoNextLevel } from "../gotoNextLevel";
import { loadSvga } from "../../loadSvga"; import { loadSvga } from "../../loadSvga";
import getResPath from "../../../libs/new_tc/getResPath"; import getResPath from "../../../libs/new_tc/getResPath";
import { play2 } from "./svgaTool";
import wait from "../../../libs/new_tc/wait";
export default class HelpBloodPanel extends Panel { export default class HelpBloodPanel extends Panel {
netCallback; netCallback;
code; code;
mv1; // mv1;
mv2; // mv2;
start(data) { list: any[];
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));
const s = new egret.Sprite();
this.addChildAt(s,0);
s.y=-250;
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/blood_success.svga', this).then((mv: egret.DisplayObject) => { this.list = await Promise.all([
mv.touchEnabled = false; loadSvga(getResPath() + 'resource/assets/svgas/blood_standby.svga'),
mv.visible = false; loadSvga(getResPath() + 'resource/assets/svgas/blood_success.svga'),
this.mv1 = mv; loadSvga(getResPath() + 'resource/assets/svgas/blood_fail.svga'),
this.mv1.y = -250; ]);
this.tostandby1();
this.mv1.addEventListener(egret.Event.ENTER_FRAME, () => { this.list.forEach(i => {
if (this.mv1.currentFrame == this.mv1_end) i.gotoAndStop(1);
this.mv1.gotoAndPlay(this.mv1_start); this.addChild(i);
if (this.mv1.currentFrame == 420) { i.visible = false;
this.mv1_start = 421; i.touchEnabled = false;
this.mv1_end = this.mv1.totalFrames; i.y = -250;
}
}, 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);
}); });
} this.list[0].visible = true;
this.list[0].gotoAndPlay(1);
mv1_start; this['gobtn'].once(egret.TouchEvent.TOUCH_TAP, this.onclick_gobtn, this);
mv1_end; this['helpbtn'].once(egret.TouchEvent.TOUCH_TAP, this.onClick, this);
mv2_start;
mv2_end;
tostandby1() {
this.mv1_start = 1;
this.mv1_end = 180;
}
toAction1() {
this.mv1.gotoAndPlay(181);
}
toAction2() {
this.mv2.gotoAndPlay(181);
}
tostandby2() { loadSvga(getResPath() + 'resource/assets/svgas/bloodbg.svga', s);
this.mv2_start = 1;
this.mv2_end = 180;
} }
onclick_gobtn() { onclick_gobtn() {
...@@ -80,23 +56,28 @@ export default class HelpBloodPanel extends Panel { ...@@ -80,23 +56,28 @@ export default class HelpBloodPanel extends Panel {
} }
onClick() { onClick() {
this['helpbtn'].visible = false; NetManager.ins.clickLog(getlogItem(87));
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.doHelpNew((s, res) => { NetManager.ins.doHelpNew(async (s, res) => {
this.netCallback(); this.netCallback();
this['txt_standby'].visible = false;
if (s) { if (s) {
this.mv1.visible = true; play2(this.list[1]);
this.list[0].visible = false;
this.list[1].visible = true;
await wait(1200);
this['helpbtn'].visible = false;
this['gobtn'].visible = true;
this['txt_standby'].visible = false;
this['txt_success'].visible = true; this['txt_success'].visible = true;
this.toAction1();
} else { } else {
this.toAction2(); this.list[2].visible = true;
this.mv2.visible = true; play2(this.list[2]);
this['helpbtn'].visible = false;
this['gobtn'].visible = true;
this['txt_standby'].visible = false;
var codeMsgs = {//具体code还没给 var codeMsgs = {//具体code还没给
"2002002016": "不可以给自己助力哦~",// "2002002016": "不可以给自己助力哦~",//
"2002002036": "已经给好友助力过了哦~", "2002002036": "已经给好友助力过了哦~",
......
...@@ -5,6 +5,7 @@ import { DataManager } from "../../../libs/tw/manager/DataManager"; ...@@ -5,6 +5,7 @@ import { DataManager } from "../../../libs/tw/manager/DataManager";
import { NetManager } from "../../../libs/tw/manager/NetManager"; import { NetManager } from "../../../libs/tw/manager/NetManager";
import { loadSvga } from "../../loadSvga"; import { loadSvga } from "../../loadSvga";
import { gotoNextLevel } from "../gotoNextLevel"; import { gotoNextLevel } from "../gotoNextLevel";
import { getlogItem } from "../../Main";
export default class HelpInvitePanel extends Panel { export default class HelpInvitePanel extends Panel {
netCallback; netCallback;
...@@ -12,14 +13,16 @@ export default class HelpInvitePanel extends Panel { ...@@ -12,14 +13,16 @@ export default class HelpInvitePanel extends Panel {
async 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(91));
const s = new egret.Sprite();
this.addChildAt(s,0);
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); s.addChild(mv);
mv.y = -180; mv.y = -180;
}); });
...@@ -47,9 +50,13 @@ export default class HelpInvitePanel extends Panel { ...@@ -47,9 +50,13 @@ export default class HelpInvitePanel extends Panel {
// NetManager.ins.clickLog(getlogItem(88)); // NetManager.ins.clickLog(getlogItem(88));
this.hidePanel(); this.hidePanel();
gotoNextLevel(); gotoNextLevel();
NetManager.ins.clickLog(getlogItem(92));
} }
onClick() { onClick() {
NetManager.ins.clickLog(getlogItem(91));
NetManager.ins.showLog(getlogItem(92));
this['helpbtn'].visible = false; this['helpbtn'].visible = false;
this['gobtn'].visible = true; this['gobtn'].visible = true;
......
...@@ -2,45 +2,136 @@ import Panel from "../../../libs/new_wx/components/Panel"; ...@@ -2,45 +2,136 @@ import Panel from "../../../libs/new_wx/components/Panel";
import { showToast } from "../../../libs/new_wx/ctrls/toastCtrl"; import { showToast } from "../../../libs/new_wx/ctrls/toastCtrl";
import { NetManager } from "../../../libs/tw/manager/NetManager"; import { NetManager } from "../../../libs/tw/manager/NetManager";
import { gotoNextLevel } from "../gotoNextLevel"; import { gotoNextLevel } from "../gotoNextLevel";
import { loadSvga } from "../../loadSvga";
import getResPath from "../../../libs/new_tc/getResPath";
import { play2 } from "./svgaTool";
import wait from "../../../libs/new_tc/wait";
import { getlogItem } from "../../Main";
export default class HelpScratchPanel extends Panel { export default class HelpScratchPanel extends Panel {
netCallback; netCallback;
code; code;
start(data) { list: any[];
private myShape: egret.Shape = new egret.Shape();
private pIndex = 0;
setGtaphics(x, y) {
setTimeout(() => {
if (this.pIndex % 2 == 0) { // 双数
y -= 25;
if (y <= this["prizeImg"].y) {
this.pIndex++;
}
} else { // 单数
y += 25;
if (y >= (this["prizeImg"].y + this["prizeImg"].height)) {
this.pIndex++;
}
}
x += 5;
this.myShape.graphics.lineTo(x, y);
if (x > this["prizeImg"].x + (+this.data.completePercent) / 100 * this["prizeImg"].width - 60) {
return;
}
this.setGtaphics(x, y);
}, 20);
}
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(89));
egret.Tween.get(this['light'], { loop: true }).to({ rotation: 360 }, 5000);
this['light'].visible = false;
this['closeBtn'].once(egret.TouchEvent.TOUCH_TAP, this.onclick_closeBtn, 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['txt_standby'].visible = true; this['txt_standby'].visible = true;
this['helpbtn'].visible = true; this['helpbtn'].visible = true;
this.myShape.graphics.beginFill(0xff0000, 0);
this.myShape.graphics.drawRect(this["prizeImg"].x, this["prizeImg"].y, this["prizeImg"].width, this["prizeImg"].height);
this.myShape.graphics.endFill();
this.addChild(this.myShape);
this["prizeImg"].mask = this.myShape;
this.myShape.graphics.lineStyle(130, 0xff0000, 1);
this.myShape.graphics.moveTo(this["prizeImg"].x - 30, this["prizeImg"].y + this["prizeImg"].height);
this.list = await Promise.all([
loadSvga(getResPath() + 'resource/assets/svgas/scratch_standby.svga'),
loadSvga(getResPath() + 'resource/assets/svgas/scratch_success.svga'),
loadSvga(getResPath() + 'resource/assets/svgas/scratch_fail.svga'),
]);
this['go2btn'].once(egret.TouchEvent.TOUCH_TAP, this.onclick_gobtn2, this);
this['go1btn'].once(egret.TouchEvent.TOUCH_TAP, this.onclick_gobtn1, this);
this['helpbtn'].once(egret.TouchEvent.TOUCH_TAP, this.onClick, this);
const w = [313, 433, 356];
const y = [180, 20, 140];
this.list.forEach((i, index) => {
i.gotoAndStop(1);
this.addChildAt(i, 1);
i.visible = false;
i.touchEnabled = false;
i.anchorOffsetX = w[index] / 2;
i.x = 750 / 2;
i.y = y[index];
});
wait(1000).then(async () => {
this.list[0].visible = true;
await play2(this.list[0]);
this['light'].visible = true;
});
// setTimeout(() => {
// }, 2000);
}
startAni() {
this.setGtaphics(this["prizeImg"].x - 30, this["prizeImg"].y + this["prizeImg"].height);
} }
onclick_closeBtn() { onclick_closeBtn() {
this.hidePanel(); this.hidePanel();
} }
onclick_gobtn() { onclick_gobtn1() {
// NetManager.ins.clickLog(getlogItem(88)); this.hidePanel();
gotoNextLevel();
NetManager.ins.clickLog(getlogItem(90));
}
onclick_gobtn2() {
this.hidePanel(); this.hidePanel();
gotoNextLevel(); gotoNextLevel();
} }
onClick() { onClick() {
this['helpbtn'].visible = false; NetManager.ins.clickLog(getlogItem(89));
const _code = this.code.slice(8); const _code = this.code.slice(8);
NetManager.ins.scratchDoHelp((success, res) => { NetManager.ins.scratchDoHelp(async (success, res) => {
this.netCallback(); this.netCallback();
this.startAni();
await wait(2000);
this['txt_standby'].visible = false; this['txt_standby'].visible = false;
this.list[0].visible = false;
this['light'].visible = false;
this['helpbtn'].visible = false;
if (success) { if (success) {
NetManager.ins.showLog(getlogItem(90));
this['go1btn'].visible = true; this['go1btn'].visible = true;
this['txt_success'].visible = true; this['txt_success'].visible = true;
this.list[1].visible = true;
await play2(this.list[1]);
this['light'].visible = true;
} else { } else {
this['go2btn'].visible = true; this['go2btn'].visible = true;
this.list[2].visible = true;
var codeMsgs = { var codeMsgs = {
"0000024": "今日刮卡次数已达到上线限哦~", "0000024": "今日刮卡次数已达到上线限哦~",
"0000022": "不可以给自己刮哦~", "0000022": "不可以给自己刮哦~",
...@@ -51,27 +142,11 @@ export default class HelpScratchPanel extends Panel { ...@@ -51,27 +142,11 @@ export default class HelpScratchPanel extends Panel {
} else { } else {
showToast(res && codeMsgs[res.code] ? codeMsgs[res.code] : "助力失败"); showToast(res && codeMsgs[res.code] ? codeMsgs[res.code] : "助力失败");
} }
play2(this.list[2]);
} }
// 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);
} }
get skinResKey() { return 'helpGroup' } get skinResKey() { return 'helpGroup' }
get skinKey() { return 'HelpScratch' } get skinKey() { return 'HelpScratch' }
......
//播放完之后,在一个区间循环
// export const play1 = (mv, start, end, loopStart, loopEnd) => {
// const func1 = () => {
// if (mv.currentFrame == end)
// };
// mv.gotoAndPlay(start);
// mv.addEventListener(egret.Event.ENTER_FRAME, func1, this);
// mv.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);
// }
export const play2 = (mv, start = 1, end = -1) => {
return new Promise((r) => {
if (end == -1)
end = mv.totalFrames;
const func1 = () => {
if (mv.currentFrame == end) {
mv.stop();
mv.removeEventListener(egret.Event.ENTER_FRAME, func1, this);
r();
}
};
mv.gotoAndPlay(start);
mv.addEventListener(egret.Event.ENTER_FRAME, func1, this);
})
}
\ No newline at end of file
import { ChapterData } from "../interface/ChapterData";
//551-575
export const Chapters22: ChapterData[] = [
]
...@@ -23,6 +23,7 @@ import { Chapters18 } from "./Chapter18"; ...@@ -23,6 +23,7 @@ import { Chapters18 } from "./Chapter18";
import { Chapters19 } from "./Chapter19"; import { Chapters19 } from "./Chapter19";
import { Chapters20 } from "./Chapter20"; import { Chapters20 } from "./Chapter20";
import { Chapters21 } from "./Chapter21"; import { Chapters21 } from "./Chapter21";
import { Chapters22 } from "./Chapter22";
//所有的关卡 //所有的关卡
const chapters: ChapterData[] = [].concat( const chapters: ChapterData[] = [].concat(
...@@ -47,6 +48,7 @@ const chapters: ChapterData[] = [].concat( ...@@ -47,6 +48,7 @@ const chapters: ChapterData[] = [].concat(
Chapters19, Chapters19,
Chapters20, Chapters20,
Chapters21, Chapters21,
Chapters22,
) )
// console.log(chapters) // console.log(chapters)
chapters.forEach((chapter,index) => { chapters.forEach((chapter,index) => {
......
...@@ -9,11 +9,11 @@ ...@@ -9,11 +9,11 @@
"advertList":[ "advertList":[
{ {
"img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg", "img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg",
"url":"Http://www.baidu.com" "url":"0"
}, },
{ {
"img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg", "img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg",
"url":"Http://www.baidu.com" "url":"0"
} }
] ]
}, },
...@@ -22,11 +22,11 @@ ...@@ -22,11 +22,11 @@
"advertList":[ "advertList":[
{ {
"img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg", "img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg",
"url":"Http://www.baidu.com" "url":"0"
}, },
{ {
"img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg", "img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg",
"url":"Http://www.baidu.com" "url":"0"
} }
] ]
}, },
...@@ -35,11 +35,11 @@ ...@@ -35,11 +35,11 @@
"advertList":[ "advertList":[
{ {
"img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg", "img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg",
"url":"Http://www.baidu.com" "url":"0"
}, },
{ {
"img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg", "img":"http://yun.dui88.com/images/201909/lsh4tdkp5n.jpg",
"url":"Http://www.baidu.com" "url":"0"
} }
] ]
} }
......
{ {
"success": true, "success": 1,
"code": "2002002036", "code": "2002002036",
"desc": "OK", "desc": "OK",
"timestamp": 1571052938097, "timestamp": 1571052938097,
......
This diff is collapsed.
{ {
"success":0, "success":1,
"code":"0000023", "code":"0000023",
"desc":null, "desc":null,
"timestamp":1566199822308, "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