Commit ae0c0936 authored by wildfirecode's avatar wildfirecode

Merge branch 'hotfix20200326'

parents 0acd7395 35baf4e8
......@@ -17,6 +17,7 @@ module.exports = {
'/hdtool/*': 'http://localhost:3000',
'/activityPlugin/*': 'http://localhost:3000',
'/aaw/*': 'http://localhost:3000',
'/activtyShareCode/*': 'http://localhost:3000',
'/wechatShare/*': 'http://localhost:3000',
'/summer/*': 'http://localhost:3000'
}
......
......@@ -78,6 +78,9 @@ import ShopTipPanel from "../../src/panels/ShopTipPanel";
import RechargePanel from "../../src/panels/RechargePanel";
import BombTips2Panel from "../../src/panels/BombTips2Panel";
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";
export default class MainBase extends eui.UILayer {
constructor() {
......@@ -166,6 +169,9 @@ export default class MainBase extends eui.UILayer {
['taskCenterNoPrize', { cls: TaskCenterNoPrize }],
['shopTip', { cls: ShopTipPanel }],
['recharge', { cls: RechargePanel }],
['HelpBloodPanel', { cls: HelpBloodPanel }],
['HelpInvitePanel', { cls: HelpInvitePanel }],
['HelpScratchPanel', { cls: HelpScratchPanel }],
];
const scenes = [
......
......@@ -239,6 +239,14 @@
{
"keys": "eleDisNew4_9_png,eleDisNew4_8_png,eleDisNew4_7_png,eleDisNew4_6_png,eleDisNew4_5_png,eleDisNew4_4_png,eleDisNew4_3_png,eleDisNew4_2_png,eleDisNew4_14_png,eleDisNew4_13_png,eleDisNew4_12_png,eleDisNew4_11_png,eleDisNew4_10_png,eleDisNew4_1_png,eleDisNew4_0_png,eleDisNew3_9_png,eleDisNew3_8_png,eleDisNew3_7_png,eleDisNew3_6_png,eleDisNew3_5_png,eleDisNew3_4_png,eleDisNew3_3_png,eleDisNew3_2_png,eleDisNew3_14_png,eleDisNew3_13_png,eleDisNew3_12_png,eleDisNew3_11_png,eleDisNew3_10_png,eleDisNew3_1_png,eleDisNew3_0_png,eleDisNew2_9_png,eleDisNew2_8_png,eleDisNew2_7_png,eleDisNew2_6_png,eleDisNew2_5_png,eleDisNew2_4_png,eleDisNew2_3_png,eleDisNew2_2_png,eleDisNew2_14_png,eleDisNew2_13_png,eleDisNew2_12_png,eleDisNew2_11_png,eleDisNew2_10_png,eleDisNew2_1_png,eleDisNew2_0_png,eleDisNew1_9_png,eleDisNew1_8_png,eleDisNew1_7_png,eleDisNew1_6_png,eleDisNew1_5_png,eleDisNew1_4_png,eleDisNew1_3_png,eleDisNew1_2_png,eleDisNew1_14_png,eleDisNew1_13_png,eleDisNew1_12_png,eleDisNew1_11_png,eleDisNew1_10_png,eleDisNew1_1_png,eleDisNew1_0_png,eleDisNew0_9_png,eleDisNew0_8_png,eleDisNew0_7_png,eleDisNew0_6_png,eleDisNew0_5_png,eleDisNew0_4_png,eleDisNew0_3_png,eleDisNew0_2_png,eleDisNew0_14_png,eleDisNew0_13_png,eleDisNew0_12_png,eleDisNew0_11_png,eleDisNew0_10_png,eleDisNew0_1_png,eleDisNew0_0_png",
"name": "eleDisNew"
},
{
"keys": "help_blood_1_btn_png,help_blood_1_text_png,help_blood_1_bg_png,help_blood_fail_text_png,help_blood_fail_btn_png,help_blood_fail_png,help_blood_success_text_png,help_blood_success_text2_png,help_blood_success_png,help_invite_bg_png,help_invite_success_btn_png,help_invite_success_png,help_invite_fail_btn_png,help_invite_fail_text1_png,help_invite_fail_text2_png,help_invite_fail_text3_png,help_invite_fail_text4_png,help_invite_fail_png,help_invite2_text_png,help_invite2_btn_png,help_invite2_png,help_invite2_btn2_png,help_invite2_text2_png",
"name": "helpGroup"
},
{
"name": "preload",
"keys": "help_blood_fail_text2_png,help_blood_fail_text3_png,help_blood_fail_text4_png,help_invite2_text3_png,help_invite2_text4_png,help_invite_text_png,help_invite_success_txt_png,help_closebtn1_png,help_invite_btn1_png"
}
],
"resources": [
......@@ -4947,6 +4955,166 @@
"url": "assets/sounds/haha.mp3",
"type": "sound",
"name": "haha_mp3"
},
{
"url": "assets/help/help_blood_1_btn.png",
"type": "image",
"name": "help_blood_1_btn_png"
},
{
"url": "assets/help/help_blood_1_text.png",
"type": "image",
"name": "help_blood_1_text_png"
},
{
"url": "assets/help/help_blood_1_bg.png",
"type": "image",
"name": "help_blood_1_bg_png"
},
{
"url": "assets/help/help_blood_fail_text.png",
"type": "image",
"name": "help_blood_fail_text_png"
},
{
"url": "assets/help/help_blood_fail_btn.png",
"type": "image",
"name": "help_blood_fail_btn_png"
},
{
"url": "assets/help/help_blood_fail.png",
"type": "image",
"name": "help_blood_fail_png"
},
{
"url": "assets/help/help_blood_success_text.png",
"type": "image",
"name": "help_blood_success_text_png"
},
{
"url": "assets/help/help_blood_success_text2.png",
"type": "image",
"name": "help_blood_success_text2_png"
},
{
"url": "assets/help/help_blood_success.png",
"type": "image",
"name": "help_blood_success_png"
},
{
"url": "assets/help/help_invite_bg.png",
"type": "image",
"name": "help_invite_bg_png"
},
{
"url": "assets/help/help_invite_success_btn.png",
"type": "image",
"name": "help_invite_success_btn_png"
},
{
"url": "assets/help/help_invite_success.png",
"type": "image",
"name": "help_invite_success_png"
},
{
"url": "assets/help/help_invite_fail_btn.png",
"type": "image",
"name": "help_invite_fail_btn_png"
},
{
"url": "assets/help/help_invite_fail_text1.png",
"type": "image",
"name": "help_invite_fail_text1_png"
},
{
"url": "assets/help/help_invite_fail_text2.png",
"type": "image",
"name": "help_invite_fail_text2_png"
},
{
"url": "assets/help/help_invite_fail_text3.png",
"type": "image",
"name": "help_invite_fail_text3_png"
},
{
"url": "assets/help/help_invite_fail_text4.png",
"type": "image",
"name": "help_invite_fail_text4_png"
},
{
"url": "assets/help/help_invite_fail.png",
"type": "image",
"name": "help_invite_fail_png"
},
{
"url": "assets/help/help_invite2_text.png",
"type": "image",
"name": "help_invite2_text_png"
},
{
"url": "assets/help/help_invite2_btn.png",
"type": "image",
"name": "help_invite2_btn_png"
},
{
"url": "assets/help/help_invite2.png",
"type": "image",
"name": "help_invite2_png"
},
{
"url": "assets/help/help_invite2_btn2.png",
"type": "image",
"name": "help_invite2_btn2_png"
},
{
"url": "assets/help/help_invite2_text2.png",
"type": "image",
"name": "help_invite2_text2_png"
},
{
"name": "help_blood_fail_text2_png",
"type": "image",
"url": "assets/help/help_blood_fail_text2.png"
},
{
"name": "help_blood_fail_text3_png",
"type": "image",
"url": "assets/help/help_blood_fail_text3.png"
},
{
"name": "help_blood_fail_text4_png",
"type": "image",
"url": "assets/help/help_blood_fail_text4.png"
},
{
"name": "help_invite2_text3_png",
"type": "image",
"url": "assets/help/help_invite2_text3.png"
},
{
"name": "help_invite2_text4_png",
"type": "image",
"url": "assets/help/help_invite2_text4.png"
},
{
"name": "help_invite_text_png",
"type": "image",
"url": "assets/help/help_invite_text.png"
},
{
"name": "help_invite_success_txt_png",
"type": "image",
"url": "assets/help/help_invite_success_txt.png"
},
{
"name": "help_closebtn1_png",
"type": "image",
"url": "assets/help/help_closebtn1.png"
},
{
"name": "help_invite_btn1_png",
"type": "image",
"url": "assets/help/help_invite_btn1.png"
}
]
}
\ No newline at end of file
{
"skins": {},
"autoGenerateExmlsList": true,
"exmls": [
"resource/skins/ADSkin.exml",
"resource/skins/ADSmallSkin.exml",
"resource/skins/AlertSkin.exml",
"resource/skins/AvatarSkin.exml",
"resource/skins/BackIndexSkin.exml",
"resource/skins/BackSkin.exml",
"resource/skins/BagItem2Skin.exml",
"resource/skins/BagItemSkin.exml",
"resource/skins/BagQuitSkin.exml",
"resource/skins/BagSkin.exml",
"resource/skins/Blood2Skin.exml",
"resource/skins/BloodSkin.exml",
"resource/skins/Box2Skin.exml",
"resource/skins/BoxSkin.exml",
"resource/skins/Buy1Skin.exml",
"resource/skins/Buy2Skin.exml",
"resource/skins/Buy3Skin.exml",
"resource/skins/ExchangeSkin.exml",
"resource/skins/FailSkin.exml",
"resource/skins/FriendItem2Skin.exml",
"resource/skins/FriendItemSkin.exml",
"resource/skins/FriendShareSkin.exml",
"resource/skins/FriendSkin.exml",
"resource/skins/H52Skin.exml",
"resource/skins/H5Skin.exml",
"resource/skins/HbCutTimeSkin.exml",
"resource/skins/HbGameSkin.exml",
"resource/skins/HbNoPrizeSkin.exml",
"resource/skins/HbPrizeSkin.exml",
"resource/skins/HbRuleSkin.exml",
"resource/skins/IconButtonSkin.exml",
"resource/skins/InviteCutTimePanelSkin.exml",
"resource/skins/InviteItemSkin.exml",
"resource/skins/InvitePrizePanelSkin.exml",
"resource/skins/InviteRulePanelSkin.exml",
"resource/skins/InviteRuleSkin.exml",
"resource/skins/InviteSkin.exml",
"resource/skins/Main2Skin.exml",
"resource/skins/MapBottomSkin.exml",
"resource/skins/MapRepeatSkin.exml",
"resource/skins/MapSkin.exml",
"resource/skins/MapTopSkin.exml",
"resource/skins/NoPrizeSkin.exml",
"resource/skins/OptionItemSkin.exml",
"resource/skins/OptionsSkin.exml",
"resource/skins/PlaySkin.exml",
"resource/skins/Prize2Skin.exml",
"resource/skins/PrizeSkin.exml",
"resource/skins/QuitSkin.exml",
"resource/skins/RankFriendListSkin.exml",
"resource/skins/RankItemSkin.exml",
"resource/skins/RankSkin.exml",
"resource/skins/RechargeSkin.exml",
"resource/skins/RedBagActivitySkin.exml",
"resource/skins/RedBagAlertSkin.exml",
"resource/skins/RedBombAlertSkin.exml",
"resource/skins/RedBombRuleSkin.exml",
"resource/skins/RedBombTips2Skin.exml",
"resource/skins/RedBombTipsSkin.exml",
"resource/skins/ReliveSkin.exml",
"resource/skins/RuleSkin.exml",
"resource/skins/ScratchItemSkin.exml",
"resource/skins/ScratchPrizeSkin.exml",
"resource/skins/ScratchRuleSkin.exml",
"resource/skins/ScratchSkin.exml",
"resource/skins/Share2Skin.exml",
"resource/skins/Share3Skin.exml",
"resource/skins/ShareCodePanelSkin.exml",
"resource/skins/ShareSkin.exml",
"resource/skins/ShareTipsSkin.exml",
"resource/skins/ShopSkin.exml",
"resource/skins/ShopTipSkin.exml",
"resource/skins/ShowOffSkin.exml",
"resource/skins/SignItemSkin.exml",
"resource/skins/SignPrizeSkin.exml",
"resource/skins/SignSkin.exml",
"resource/skins/StarSkin.exml",
"resource/skins/StartPanelSkin.exml",
"resource/skins/StartSkin.exml",
"resource/skins/TargetItemSkin.exml",
"resource/skins/TaskCenterItemSkin.exml",
"resource/skins/TaskCenterNoPrizeSkin.exml",
"resource/skins/TaskCenterPrizeSkin.exml",
"resource/skins/TaskCenterSkin.exml",
"resource/skins/TaskItemSkin.exml",
"resource/skins/TaskPrizeSkin.exml",
"resource/skins/TaskSkin.exml",
"resource/skins/Toast2Skin.exml",
"resource/skins/ToastSkin.exml",
"resource/skins/TurnRuleSkin.exml",
"resource/skins/TurntableNoPrizeSkin.exml",
"resource/skins/TurntablePrize2Skin.exml",
"resource/skins/TurntablePrizeSkin.exml",
"resource/skins/TurntableSkin.exml",
"resource/skins/VScrollBarSkin.exml"
],
"path": "resource/default.thm.json"
"skins": {},
"autoGenerateExmlsList": true,
"exmls": [
"resource/skins/HelpScratchSkin.exml",
"resource/skins/HelpBloodSkin.exml",
"resource/skins/HelpInviteSkin.exml",
"resource/skins/ADSkin.exml",
"resource/skins/ADSmallSkin.exml",
"resource/skins/AlertSkin.exml",
"resource/skins/AvatarSkin.exml",
"resource/skins/BackIndexSkin.exml",
"resource/skins/BackSkin.exml",
"resource/skins/BagItem2Skin.exml",
"resource/skins/BagItemSkin.exml",
"resource/skins/BagQuitSkin.exml",
"resource/skins/BagSkin.exml",
"resource/skins/Blood2Skin.exml",
"resource/skins/BloodSkin.exml",
"resource/skins/Box2Skin.exml",
"resource/skins/BoxSkin.exml",
"resource/skins/Buy1Skin.exml",
"resource/skins/Buy2Skin.exml",
"resource/skins/Buy3Skin.exml",
"resource/skins/ExchangeSkin.exml",
"resource/skins/FailSkin.exml",
"resource/skins/FriendItem2Skin.exml",
"resource/skins/FriendItemSkin.exml",
"resource/skins/FriendShareSkin.exml",
"resource/skins/FriendSkin.exml",
"resource/skins/H52Skin.exml",
"resource/skins/H5Skin.exml",
"resource/skins/HbCutTimeSkin.exml",
"resource/skins/HbGameSkin.exml",
"resource/skins/HbNoPrizeSkin.exml",
"resource/skins/HbPrizeSkin.exml",
"resource/skins/HbRuleSkin.exml",
"resource/skins/IconButtonSkin.exml",
"resource/skins/InviteCutTimePanelSkin.exml",
"resource/skins/InviteItemSkin.exml",
"resource/skins/InvitePrizePanelSkin.exml",
"resource/skins/InviteRulePanelSkin.exml",
"resource/skins/InviteRuleSkin.exml",
"resource/skins/InviteSkin.exml",
"resource/skins/Main2Skin.exml",
"resource/skins/MapBottomSkin.exml",
"resource/skins/MapRepeatSkin.exml",
"resource/skins/MapSkin.exml",
"resource/skins/MapTopSkin.exml",
"resource/skins/NoPrizeSkin.exml",
"resource/skins/OptionItemSkin.exml",
"resource/skins/OptionsSkin.exml",
"resource/skins/PlaySkin.exml",
"resource/skins/Prize2Skin.exml",
"resource/skins/PrizeSkin.exml",
"resource/skins/QuitSkin.exml",
"resource/skins/RankFriendListSkin.exml",
"resource/skins/RankItemSkin.exml",
"resource/skins/RankSkin.exml",
"resource/skins/RechargeSkin.exml",
"resource/skins/RedBagActivitySkin.exml",
"resource/skins/RedBagAlertSkin.exml",
"resource/skins/RedBombAlertSkin.exml",
"resource/skins/RedBombRuleSkin.exml",
"resource/skins/RedBombTips2Skin.exml",
"resource/skins/RedBombTipsSkin.exml",
"resource/skins/ReliveSkin.exml",
"resource/skins/RuleSkin.exml",
"resource/skins/ScratchItemSkin.exml",
"resource/skins/ScratchPrizeSkin.exml",
"resource/skins/ScratchRuleSkin.exml",
"resource/skins/ScratchSkin.exml",
"resource/skins/Share2Skin.exml",
"resource/skins/Share3Skin.exml",
"resource/skins/ShareCodePanelSkin.exml",
"resource/skins/ShareSkin.exml",
"resource/skins/ShareTipsSkin.exml",
"resource/skins/ShopSkin.exml",
"resource/skins/ShopTipSkin.exml",
"resource/skins/ShowOffSkin.exml",
"resource/skins/SignItemSkin.exml",
"resource/skins/SignPrizeSkin.exml",
"resource/skins/SignSkin.exml",
"resource/skins/StarSkin.exml",
"resource/skins/StartPanelSkin.exml",
"resource/skins/StartSkin.exml",
"resource/skins/TargetItemSkin.exml",
"resource/skins/TaskCenterItemSkin.exml",
"resource/skins/TaskCenterNoPrizeSkin.exml",
"resource/skins/TaskCenterPrizeSkin.exml",
"resource/skins/TaskCenterSkin.exml",
"resource/skins/TaskItemSkin.exml",
"resource/skins/TaskPrizeSkin.exml",
"resource/skins/TaskSkin.exml",
"resource/skins/Toast2Skin.exml",
"resource/skins/ToastSkin.exml",
"resource/skins/TurnRuleSkin.exml",
"resource/skins/TurntableNoPrizeSkin.exml",
"resource/skins/TurntablePrize2Skin.exml",
"resource/skins/TurntablePrizeSkin.exml",
"resource/skins/TurntableSkin.exml",
"resource/skins/VScrollBarSkin.exml"
],
"path": "resource/default.thm.json"
}
\ No newline at end of file
<?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:Image source="help_blood_1_bg_png" y="26" horizontalCenter="0" visible="false"/>
<e:Group y="855" horizontalCenter="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:Group>
<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_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_error2002002016" source="help_blood_fail_text2_png" horizontalCenter="0" visible="false"/>
<e:Image id="txt_error2002002036" source="help_blood_fail_text3_png" horizontalCenter="0" visible="false"/>
<e:Image id="txt_error2002002025" source="help_blood_fail_text4_png" horizontalCenter="0" visible="false"/>
</e:Group>
</e:Skin>
\ No newline at end of file
<?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:Group id="g1"> </e:Group>
<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="gobtn" x="0" y="0" source="help_invite2_btn2_png" visible="false"/>
</e:Group>
<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_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_error400017" horizontalCenter="0" source="help_invite2_text4_png" visible="false"/>
</e:Group>
</e:Skin>
\ No newline at end of file
<?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:Image y="240" horizontalCenter="0" source="help_invite_bg_png"/>
<e:Group y="695" 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="go1btn" source="help_invite_success_btn_png" horizontalCenter="0" visible="false"/>
</e:Group>
<e:Group y="294" width="100%" horizontalCenter="0">
<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_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_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:Image id="closeBtn" source="help_closebtn1_png" x="613" y="238"/>
</e:Skin>
\ No newline at end of file
......@@ -6,7 +6,7 @@
<e:Image id="light1" source="invitebg2_png" x="376" y="317" anchorOffsetX="356" anchorOffsetY="296"/>
<e:Image y="241.33" horizontalCenter="0" source="invite_bg_png"/>
<e:Group id="con" y="-67"/>
<e:Label text="邀请好友闯关可得现金券!" y="381.33" textColor="0xF54500" size="28" horizontalCenter="0" fontFamily="FZY3JW"/>
<e:Label text="邀请新玩家闯关可得现金券!" y="381.33" textColor="0xF54500" size="28" horizontalCenter="0" fontFamily="FZY3JW"/>
<e:Image id="prizeImg" y="439.33" horizontalCenter="0.5" source="" width="510" height="228"/>
<e:Button id="closeBtn" label="" x="605" y="227.33">
<e:skinName>
......
......@@ -55,95 +55,38 @@ export default class MapScene extends Scene {
private icons = {};
private actIcon: ActIcon = null;
sendInvite() {
private sendInvite(panels: any[], parmas: any[]) {
const code = Utils.getRequestByKey('shareCode') || Utils.getRequestByKey('token');//0224新加用token取一边
if (!code) return;
if (!code) return false;
if (doHelpFlag) {
return;
return false;
}
//0224修改,取sceneCode,
const sceneCode = Utils.getRequestByKey('sceneCode')
if (sceneCode == CodeChannels.AddBlood) {//加体力的,0228到时会修改成助力,这里要加逻辑
//if (window["test0228"]) {//测试助力,到时失败code再和后端对接
NetManager.ins.doHelpNew((s, res) => {
doHelpFlag = true;
if (s) {
NetManager.ins.showLog(getlogItem(83))
showToast("助力成功!一起闯关赢现金吧")
}
else {
var codeMsgs = {//具体code还没给
"2002002016": "不可以给自己助力哦~",//
"2002002036": "已经给好友助力过了哦~",
// "2002002037": "已经给好友助力过了哦~",
"2002002025": "今日助力次数已达上限啦!",
//新加的,还没给,其他的都用助力失败
"2002002013": "口令无效,请复制正确的口令!",
"2002002015": "口令不存在",
"2002002026": "好友今日被助力已达上限啦!"
}
showToast(res && codeMsgs[res.code] ? codeMsgs[res.code] : "助力失败");
}
}, code)
// } else {
// showToast("欢迎小主,闯关就能拿现金~");
// }
if (sceneCode == CodeChannels.AddBlood) {
const netCallback = () => { doHelpFlag = true; };
panels.push('HelpBloodPanel');
parmas.push({ netCallback: netCallback, code: code });
}
else if (sceneCode == CodeChannels.RankPlay) {//排行榜邀请好友的,不需要了
showToast("欢迎加入游戏,去闯关吧");
return false;
}//剩下的就是邀请有礼和刮刮卡了,本身code上有区分
else if (code.indexOf("12345678") == -1) { // 邀请有礼
const dojoin = DataManager.ins.getData('hc_doJoin');
if (!dojoin) {
showToast("开启消除之旅")
return;
showToast("开启消除之旅");
return false;
}
NetManager.ins.doHelp((success, res) => {
doHelpFlag = true;
switch (true) {
case (res.code == "400017"):
showToast("您不是新用户呢~");
break;
case (res.code == "0000022"):
showToast("不可以给自己助力哦~");
break;
case (res.code == "0200202"):
showToast("已经给好友助力过了哦~");
break;
default:
break;
}
if (!success) {
return;
}
showToast("助力成功");
NetManager.ins.showLog(getlogItem(36));
}, code, dojoin.data);
const netCallback = () => { doHelpFlag = true; };
panels.push('HelpInvitePanel');
parmas.push({ netCallback: netCallback, code: code });
} else { // 刮刮卡
const _code = code.slice(8);
NetManager.ins.scratchDoHelp((success, res) => {
doHelpFlag = true;
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("助力成功,参与闯关赢现金"/*"帮刮成功!"*/);
NetManager.ins.showLog(getlogItem(52));
NetManager.ins.showLog(getlogItem(36));
}, _code);
const netCallback = () => { doHelpFlag = true; };
panels.push('HelpScratchPanel');
parmas.push({ netCallback: netCallback, code: code });
}
return true;
}
// 邀请有礼角标倒计时
......@@ -181,7 +124,7 @@ export default class MapScene extends Scene {
this.addIcon(); // 添加Icon
this.sendInvite();
this.hcRedBoobBaseInfo();
this.updateSignBtn();
this.updateMyInfo();
......@@ -198,7 +141,13 @@ export default class MapScene extends Scene {
stopGamebg();
NetManager.ins.getSignInfo(() => {
const parmas = [];
const panels = [];
const result = this.sendInvite(panels, parmas);
if (result) {
PanelCtrl.instance.showPanels(panels, parmas, this.onAllPanelHide);
return;
}
const date = new Date();
date.setHours(0, 0, 0, 0);
const nowTimerStr = date.getTime() + '';
......@@ -279,13 +228,13 @@ export default class MapScene extends Scene {
if (!readCache() && getHomeData().levels.length <= 0) { //引导
const guide = new GuideCon(() => {
PanelCtrl.instance.showPanels(panels, [], this.onAllPanelHide);
PanelCtrl.instance.showPanels(panels, parmas, this.onAllPanelHide);
});
this.addChild(guide);
guide.play(1)
// console.log(guide)
} else { //不用引导
PanelCtrl.instance.showPanels(panels, [], this.onAllPanelHide);
PanelCtrl.instance.showPanels(panels, parmas, this.onAllPanelHide);
}
}, window['signActivityId']);
......@@ -443,7 +392,7 @@ export default class MapScene extends Scene {
if (!window['development']) {
RES.getResAsync(`inviterulepanel_json`);
}
}, 5 * 1000);
}, 10 * 1000);
loadFireworks();
......
......@@ -140,7 +140,7 @@ export default class ScratchPanel extends Panel {
this.data.avatarList.push("scratch_invite_png");
}
// 添加假用户
this.data.avatarList.unshift("scratch_user1_png", "scratch_user2_png");
// this.data.avatarList.unshift("scratch_user1_png", "scratch_user2_png");
// 创建渲染列表
let rendererList = [];
......@@ -182,7 +182,9 @@ export default class ScratchPanel extends Panel {
progress = 0;
}
this['numLabel'].textFlow = (new HtmlTextParser).parser(`共<b>${2 + this.data.helpedCount}</b>位好友帮你刮了<b>${progress.toFixed(2)}</b>%`);
this['numLabel'].textFlow = (new HtmlTextParser).parser(
`再邀请${this.data.totalNeedCount-this.data.helpedCount }位好友助力可得现金券`
);
this["progressLabel"].textFlow = (new HtmlTextParser).parser(`仅剩<b>${(100 - progress).toFixed(2)}</b>%`); // 进度条文字
let _width = this["progressBg"].width * progress / 100; // 宽度
let dProgress = Math.abs(progress - this["progress"].width / this["progressBg"].width); // 比当前进度的差值的绝对值
......
......@@ -155,59 +155,7 @@ export default class StartPanel extends Panel {
onTap_startBtn() {
const homeData = getHomeData();
if (homeData.remainEnargy <= 0) {
if (/*homeData.askForEnergy*/this.askForEnergyCount) {
PanelCtrl.instance.show('blood2Panel');
} else {
if (iswx()) {
getShareUrl(this.stage);
NetManager.ins.hc_askForEnergy((success) => {
NetManager.ins.hc_home(() => {
SceneCtrl.instance.updateScene();
}, window['collectRuleId']);
wait(2000).then(() => {
showToast('分享成功~');
});
})
} else {
// if (window["test0228"]) {
//如果之前没获取到,就再发接口,几率很低
if (!DataManager.ins.getData("getUserShareCode")) {
this.touchEnabled = false
this.touchChildren = false
NetManager.ins.getUserShareCode((s, res) => {
this.touchEnabled = true
this.touchChildren = true
if (!s) {
showToast("获取分享信息失败,请重试")
} else {
showShareCodePanel(
CodeChannels.AddBlood,
res.data,
() => { wait(2000).then(() => { showToast('分享成功'); }); }
)
}
})
} else {
showShareCodePanel(
CodeChannels.AddBlood,
DataManager.ins.getData("getUserShareCode").data,
() => { wait(2000).then(() => { showToast('分享成功'); }); }
);
}
// } else {
// showShareCodePanel(CodeChannels.AddBlood, null, () => {
// NetManager.ins.hc_askForEnergy((success) => {
// NetManager.ins.hc_home(() => {
// SceneCtrl.instance.updateScene();
// }, window['collectRuleId']);
// wait(2000).then(() => {
// showToast('分享成功');
// });
// })
// });
// }
}
}
PanelCtrl.instance.show('blood2Panel');
return;
}
......
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 { gotoNextLevel } from "../gotoNextLevel";
import { loadSvga } from "../../loadSvga";
import getResPath from "../../../libs/new_tc/getResPath";
export default class HelpBloodPanel extends Panel {
netCallback;
code;
mv1;
mv2;
start(data) {
this.netCallback = data.netCallback;
this.code = data.code;
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['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() {
NetManager.ins.clickLog(getlogItem(88));
this.hidePanel();
gotoNextLevel();
}
onClick() {
this['helpbtn'].visible = false;
this['gobtn'].visible = true;
this.mv1.visible = false;
this.mv2.visible = false;
NetManager.ins.showLog(getlogItem(88));
NetManager.ins.clickLog(getlogItem(87));
NetManager.ins.doHelpNew((s, res) => {
this.netCallback();
this['txt_standby'].visible = false;
if (s) {
this.mv1.visible = true;
this['txt_success'].visible = true;
this.toAction1();
} else {
this.toAction2();
this.mv2.visible = true;
var codeMsgs = {//具体code还没给
"2002002016": "不可以给自己助力哦~",//
"2002002036": "已经给好友助力过了哦~",
// "2002002037": "已经给好友助力过了哦~",
"2002002025": "今日助力次数已达上限啦!",
//新加的,还没给,其他的都用助力失败
"2002002013": "口令无效,请复制正确的口令!",
"2002002015": "口令不存在",
"2002002026": "好友今日被助力已达上限啦!"
}
if (res && codeMsgs[res.code] && this[`txt_error${res.code}`]) {
this[`txt_error${res.code}`].visible = true;
} else {
showToast(res && codeMsgs[res.code] ? codeMsgs[res.code] : "助力失败");
// this.hidePanel();
}
}
}, this.code)
}
get skinResKey() { return 'helpGroup' }
get skinKey() { return 'HelpBlood' }
}
\ No newline at end of file
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";
export default class HelpInvitePanel extends Panel {
netCallback;
code;
async start(data) {
this.netCallback = data.netCallback;
this.code = data.code;
// NetManager.ins.showLog(getlogItem(87));
this['txt_standby'].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() {
// NetManager.ins.clickLog(getlogItem(88));
this.hidePanel();
gotoNextLevel();
}
onClick() {
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;
if (success) {
this['list'][1].visible=true;
this['list'][1].gotoAndPlay(1);
this['txt_success'].visible = true;
} else {
this['list'][2].gotoAndPlay(1);
this['list'][2].visible=true;
var codeMsgs = {
"400017": "您不是新用户呢~",
"0000022": "不可以给自己助力哦~",
"0200202": "已经给好友助力过了哦~",
}
if (res && codeMsgs[res.code] && this[`txt_error${res.code}`]) {
this[`txt_error${res.code}`].visible = true;
} else {
showToast(res && codeMsgs[res.code] ? codeMsgs[res.code] : "助力失败");
}
}
}, this.code, dojoin.data);
}
get skinResKey() { return 'helpGroup' }
get skinKey() { return 'HelpInvite' }
}
\ No newline at end of file
import Panel from "../../../libs/new_wx/components/Panel";
import { showToast } from "../../../libs/new_wx/ctrls/toastCtrl";
import { NetManager } from "../../../libs/tw/manager/NetManager";
import { gotoNextLevel } from "../gotoNextLevel";
export default class HelpScratchPanel extends Panel {
netCallback;
code;
start(data) {
this.netCallback = data.netCallback;
this.code = data.code;
// NetManager.ins.showLog(getlogItem(87));
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['helpbtn'].visible = true;
}
onclick_closeBtn() {
this.hidePanel();
}
onclick_gobtn() {
// NetManager.ins.clickLog(getlogItem(88));
this.hidePanel();
gotoNextLevel();
}
onClick() {
this['helpbtn'].visible = false;
const _code = this.code.slice(8);
NetManager.ins.scratchDoHelp((success, res) => {
this.netCallback();
this['txt_standby'].visible = false;
if (success) {
this['go1btn'].visible = true;
this['txt_success'].visible = true;
} else {
this['go2btn'].visible = true;
var codeMsgs = {
"0000024": "今日刮卡次数已达到上线限哦~",
"0000022": "不可以给自己刮哦~",
"0000023": "已经给好友刮过了哦~",
}
if (res && codeMsgs[res.code] && this[`txt_error${res.code}`]) {
this[`txt_error${res.code}`].visible = true;
} else {
showToast(res && codeMsgs[res.code] ? codeMsgs[res.code] : "助力失败");
}
}
// 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);
}
get skinResKey() { return 'helpGroup' }
get skinKey() { return 'HelpScratch' }
}
\ No newline at end of file
......@@ -194,6 +194,12 @@ const config = {
},
'/customActivity/happyclear/cloudDrill/exchangeCoin':{
data: './happyclear/exchangeCoin.json'
},
'/activtyShareCode/getUserShareCode':{
data: './happyclear/exchangeCoin.json'
},
'/activtyShareCode/doHelpNew':{
data: './happyclear/doHelpNew.json'
}
};
......
{
"success":true,
"code":null,
"success":0,
"code":"0200202",
"desc":null,
"timestamp":1566199822308,
"data":""
......
{
"success": true,
"code": "2002002036",
"desc": "OK",
"timestamp": 1571052938097,
"data": {
"invitationId": null,
"invitationCount": 1,
"sysTime": 1571052938083,
"endTime": 1571134423000,
"completeFlag": 1,
"openPrizMsg": null,
"prizeType": "7",
"prizeName": null,
"prizeImg": "//yun.dui88.com/images/201910/oblhlej3a6.png",
"facePrice": "2",
"invitationUser": []
}
}
\ No newline at end of file
......@@ -2633,6 +2633,7 @@
"levelNum": 524,
"maxScore": 47440,
"stars": 1
<<<<<<< HEAD
},
{
"levelNum": 525,
......@@ -2763,6 +2764,8 @@
"levelNum": 550,
"maxScore": 47440,
"stars": 1
=======
>>>>>>> hotfix20200326
}
],
......@@ -2780,7 +2783,7 @@
"num": 3
}
],
"remainEnargy": 99,
"remainEnargy": 1,
"askForEnergy": false,
"canReceiveTreasureBoxNum": 10,
"nextRangeStarsNum": 150
......
{
"success":true,
"code":null,
"success":0,
"code":"0000023",
"desc":null,
"timestamp":1566199822308,
"data":""
......
......@@ -9,10 +9,10 @@
"prizeImage": "//yun.dui88.com/images/201910/gxqaecxymq.jpg",
"currentTime": 1572427313215,
"endTime": 1572513706000,
"completePercent": "99",
"completePercent": "90",
"remainPercent": "9.0",
"totalNeedCount": 1,
"helpedCount": 0,
"totalNeedCount": 3,
"helpedCount": 1,
"avatarList": []
}
}
\ No newline at end of file
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