Commit 6f00a0d1 authored by 邱旭's avatar 邱旭

1

parent 7837a6b9
......@@ -74,6 +74,8 @@ import TaskCenter from "../../src/panels/TaskCenter/TaskCenter";
import TaskCenterPrize from "../../src/panels/TaskCenter/TaskCenterPrize";
import TaskCenterNoPrize from "../../src/panels/TaskCenter/TaskCenterNoPrize";
import { GDispatcher } from "../tc/util/GDispatcher";
import ShopTipPanel from "../../src/panels/ShopTipPanel";
import RechargePanel from "../../src/panels/RechargePanel";
export default class MainBase extends eui.UILayer {
constructor() {
......@@ -158,6 +160,8 @@ export default class MainBase extends eui.UILayer {
['task', { cls: TaskCenter }],
['taskCenterPrize', { cls: TaskCenterPrize }],
['taskCenterNoPrize', { cls: TaskCenterNoPrize }],
['shopTip', { cls: ShopTipPanel }],
['recharge', { cls: RechargePanel }],
];
const scenes = [
......
......@@ -37,7 +37,7 @@
"name": "quit"
},
{
"keys": "shopbtn1_png,道具商城_png,按钮 副本_png",
"keys": "shopbtn1_png,道具商城_png,按钮 副本_png,shop_quan_bg_png,shop_item3_bg_png,shop_item1_bg_png,shop_bg2_png,shop_bg1_png,shop_item2_bg_png,去充值_png",
"name": "shop"
},
{
......@@ -211,6 +211,14 @@
{
"keys": "TaskCenterNoPrizebg_png",
"name": "taskcenternoprize"
},
{
"keys": "shopTip_bg_png,shopTip_btn_png",
"name": "shoptip"
},
{
"keys": "recharge_bg_png,recharge_btn_bg_png,recharge_num_bg_png,recharge_10_ds_png,recharge_10_en_png,recharge_1000_ds_png,recharge_1000_en_png,recharge_500_ds_png,recharge_500_en_png,recharge_add_ds_png,recharge_add_en_png,recharge_sub_ds_png,recharge_sub_en_png,recharge_1_ds_png,recharge_1_en_png,recharge_100_ds_png,recharge_100_en_png,recharge_50_ds_png,recharge_50_en_png",
"name": "recharge"
}
],
"resources": [
......@@ -3685,6 +3693,146 @@
"url": "assets/sign/sign_quan35.png",
"type": "image",
"name": "sign_quan35_png"
},
{
"url": "assets/shop/shop_item1_bg.png",
"type": "image",
"name": "shop_item1_bg_png"
},
{
"url": "assets/shop/shop_item3_bg.png",
"type": "image",
"name": "shop_item3_bg_png"
},
{
"url": "assets/shop/shop_bg1.png",
"type": "image",
"name": "shop_bg1_png"
},
{
"url": "assets/shop/shop_bg2.png",
"type": "image",
"name": "shop_bg2_png"
},
{
"url": "assets/shop/shop_quan_bg.png",
"type": "image",
"name": "shop_quan_bg_png"
},
{
"url": "assets/shop/shop_item2_bg.png",
"type": "image",
"name": "shop_item2_bg_png"
},
{
"url": "assets/shop/去充值.png",
"type": "image",
"name": "去充值_png"
},
{
"url": "assets/shopTip/shopTip_bg.png",
"type": "image",
"name": "shopTip_bg_png"
},
{
"url": "assets/shopTip/shopTip_btn.png",
"type": "image",
"name": "shopTip_btn_png"
},
{
"url": "assets/recharge/recharge_bg.png",
"type": "image",
"name": "recharge_bg_png"
},
{
"url": "assets/recharge/recharge_num_bg.png",
"type": "image",
"name": "recharge_num_bg_png"
},
{
"url": "assets/recharge/recharge_btn_bg.png",
"type": "image",
"name": "recharge_btn_bg_png"
},
{
"url": "assets/recharge/recharge_10_en.png",
"type": "image",
"name": "recharge_10_en_png"
},
{
"url": "assets/recharge/recharge_500_en.png",
"type": "image",
"name": "recharge_500_en_png"
},
{
"url": "assets/recharge/recharge_1000_en.png",
"type": "image",
"name": "recharge_1000_en_png"
},
{
"url": "assets/recharge/recharge_10_ds.png",
"type": "image",
"name": "recharge_10_ds_png"
},
{
"url": "assets/recharge/recharge_500_ds.png",
"type": "image",
"name": "recharge_500_ds_png"
},
{
"url": "assets/recharge/recharge_1000_ds.png",
"type": "image",
"name": "recharge_1000_ds_png"
},
{
"url": "assets/recharge/recharge_add_en.png",
"type": "image",
"name": "recharge_add_en_png"
},
{
"url": "assets/recharge/recharge_sub_en.png",
"type": "image",
"name": "recharge_sub_en_png"
},
{
"url": "assets/recharge/recharge_sub_ds.png",
"type": "image",
"name": "recharge_sub_ds_png"
},
{
"url": "assets/recharge/recharge_add_ds.png",
"type": "image",
"name": "recharge_add_ds_png"
},
{
"url": "assets/recharge/recharge_1_en.png",
"type": "image",
"name": "recharge_1_en_png"
},
{
"url": "assets/recharge/recharge_1_ds.png",
"type": "image",
"name": "recharge_1_ds_png"
},
{
"url": "assets/recharge/recharge_100_ds.png",
"type": "image",
"name": "recharge_100_ds_png"
},
{
"url": "assets/recharge/recharge_100_en.png",
"type": "image",
"name": "recharge_100_en_png"
},
{
"url": "assets/recharge/recharge_50_ds.png",
"type": "image",
"name": "recharge_50_ds_png"
},
{
"url": "assets/recharge/recharge_50_en.png",
"type": "image",
"name": "recharge_50_en_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/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/RedBagActivitySkin.exml",
"resource/skins/RedBagAlertSkin.exml",
"resource/skins/RedBombAlertSkin.exml",
"resource/skins/RedBombRuleSkin.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/ShareSkin.exml",
"resource/skins/ShareTipsSkin.exml",
"resource/skins/ShopSkin.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/ADSkin.exml",
"resource/skins/ADSmallSkin.exml",
"resource/skins/AlertSkin.exml",
"resource/skins/AvatarSkin.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/RechargeSkin.exml",
"resource/skins/RankSkin.exml",
"resource/skins/RedBagActivitySkin.exml",
"resource/skins/RedBagAlertSkin.exml",
"resource/skins/RedBombAlertSkin.exml",
"resource/skins/RedBombRuleSkin.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/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
......@@ -33,7 +33,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="goldBtn" label="" x="385.2" y="16.6" visible="false">
<e:Button id="goldBtn" label="" x="401.45" y="16.6">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="关闭 拷贝_png" source.down="关闭 拷贝_png" source.disabled="关闭 拷贝_png"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="SignPrizeSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16d5c2563cb"/>
<e:Image y="186.48" source="recharge_bg_png" horizontalCenter="0"/>
<e:Button id="closeBtn" label="" x="610" y="178.48">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Group y="444.48" horizontalCenter="0">
<e:Image source="recharge_num_bg_png" y="0" x="0"/>
<e:Image id="addBtn" source="recharge_add_en_png" x="409" y="8"/>
<e:Image id="subBtn" source="recharge_sub_ds_png" x="6" y="8"/>
<e:Label id="numLabel" text="0" y="38" fontFamily="FZY4JW" textColor="0xf54500" horizontalCenter="0"/>
</e:Group>
<e:Group id="btn" y="719.48" horizontalCenter="0">
<e:Image source="recharge_btn_bg_png" y="0" x="0"/>
<e:Label id="btnLabel" text="-0云钻" size="40" horizontalCenter="0" verticalCenter="-12.5" stroke="1" strokeColor="0x005ad6" fontFamily="FZY4JW"/>
</e:Group>
<e:Label id="zuanLabel" text="我的云钻:0" y="833.48" textColor="0xf54500" size="26" fontFamily="FZY3JW" horizontalCenter="0.5"/>
<e:Image id="btn_10" x="123" y="578.48" source="recharge_10_ds_png"/>
<e:Image id="btn_50" x="303" y="578.48" source="recharge_50_ds_png"/>
<e:Image id="btn_100" x="482" y="578.48" source="recharge_100_ds_png"/>
</e:Skin>
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="ShopSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16c953f5068" horizontalCenter="0"/>
<e:Image source="道具商城_png" y="42" horizontalCenter="0"/>
<e:Label id="price1Txt" text="20" y="395.86" x="294.52" size="27" textColor="0xc33700" fontFamily="FZY3JW"/>
<e:Label id="price2Txt" text="20" y="541.44" textColor="0xC33700" x="295.4" size="27" fontFamily="FZY3JW"/>
<e:Label id="price3Txt" text="20" y="680.64" textColor="0xC33700" x="294.76" size="27" fontFamily="FZY3JW"/>
<e:Label id="price4Txt" text="20" y="819.28" textColor="0xC33700" x="297.16" size="27" fontFamily="FZY3JW" visible="false"/>
<e:Button id="closeBtn" label="" x="614" y="230">
<e:Image y="117" horizontalCenter="0" source="shop_bg2_png"/>
<e:Button id="closeBtn" label="" x="607" y="325">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/>
......@@ -14,37 +10,55 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="buyBtn2" label="" x="444" y="356">
<e:Group y="504" horizontalCenter="0">
<e:Image source="shop_item1_bg_png" y="0" horizontalCenter="0"/>
<e:Label id="price1Txt" text="20" y="70" x="178" size="27" textColor="0xc33700" fontFamily="FZY3JW"/>
<e:Button id="buyBtn2" label="" x="334" y="27">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="按钮 副本_png" source.down="按钮 副本_png" source.disabled="按钮 副本_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="buyBtn1" label="" x="444" y="499.33">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="按钮 副本_png" source.down="按钮 副本_png" source.disabled="按钮 副本_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="buyBtn3" label="" x="444" y="636.66">
</e:Button>
</e:Group>
<e:Group y="645" horizontalCenter="0">
<e:Image y="0" source="shop_item2_bg_png" horizontalCenter="0"/>
<e:Label id="price2Txt" text="20" y="70" textColor="0xC33700" x="178" size="27" fontFamily="FZY3JW"/>
<e:Button id="buyBtn1" label="" x="334" y="27">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="按钮 副本_png" source.down="按钮 副本_png" source.disabled="按钮 副本_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="buyBtn4" label="" x="447.52" y="779.76" visible="false">
<e:skinName>
</e:Button>
</e:Group>
<e:Group x="110" y="785">
<e:Image y="0" source="shop_item3_bg_png" x="0"/>
<e:Label id="price3Txt" text="20" y="70" textColor="0xC33700" x="178" size="27" fontFamily="FZY3JW"/>
<e:Button id="buyBtn3" label="" x="334" y="27">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="shopbtn1_png" source.down="shopbtn1_png" source.disabled="shopbtn1_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
<e:Image width="100%" height="100%" source="按钮 副本_png" source.down="按钮 副本_png" source.disabled="按钮 副本_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Label id="moneyTxt" text="0000" x="421.24" y="792.06" textColor="0x885037" size="24" fontFamily="FZY3JW"/>
</e:skinName>
</e:Button>
</e:Group>
<e:Group y="925" horizontalCenter="0" visible="false">
<e:Image y="0" source="shop_quan_bg_png" horizontalCenter="0"/>
<e:Label id="price4Txt" text="20" y="70" textColor="0xC33700" x="178" size="27" fontFamily="FZY3JW"/>
<e:Button id="buyBtn4" label="" x="334" y="27">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="shopbtn1_png" source.down="shopbtn1_png" source.disabled="shopbtn1_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Group>
<e:Label text="已拥有元宝:" x="133" y="439" size="24" fontFamily="FZY3JW" textColor="0x885037"/>
<e:Label id="moneyTxt" text="0000" y="439" textColor="0x885037" size="24" fontFamily="FZY4JW" left="282"/>
<e:Image id="recharge" source="去充值_png" x="506" y="439"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="SignPrizeSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16d5c2563cb"/>
<e:Image y="206.15" source="shopTip_bg_png" horizontalCenter="0"/>
<e:Button id="closeBtn" label="" x="611" y="214.15">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Image id="btn" y="570.15" scaleX="0.9" scaleY="0.9" horizontalCenter="0" source="shopTip_btn_png"/>
</e:Skin>
......@@ -530,6 +530,7 @@ export default class MapScene extends Scene {
NetManager.ins.showLog(getlogItem(1));
NetManager.ins.showLog(getlogItem(2));
NetManager.ins.showLog(getlogItem(5));
NetManager.ins.showLog(getlogItem(67));
}
updateBox() {
......@@ -857,17 +858,22 @@ export default class MapScene extends Scene {
}, window['signActivityId'])
}
onTap_goldBtn(){
NetManager.ins.clickLog(getlogItem(67));
PanelCtrl.instance.show('recharge');
}
protected initEvents() {
// this['goldBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_goldBtn, this)
this['goldBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_goldBtn, this);
this['guide'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_guide, this);
this['act2Btn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_act2btn, this);
this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_inviteBtn, this);
this['friendBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_friendBtn, this)
this['adBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_adBtn, this)
this['signBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_signBtn, this)
this['bloodBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_bloodBtn, this)
this['settingBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.toggleSettings, this)
this['shopBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_shopBtn, this)
this['friendBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_friendBtn, this);
this['adBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_adBtn, this);
this['signBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_signBtn, this);
this['bloodBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_bloodBtn, this);
this['settingBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.toggleSettings, this);
this['shopBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_shopBtn, this);
this['questionBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_questionBtn, this);
this['box'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_boxLayer, this);
this['boxani'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_box, this);
......
......@@ -50,7 +50,7 @@ export default class Buy1Panel extends Panel {
SceneCtrl.instance.updateScene();
}, window['collectRuleId']);
}else {
showToast('元宝不足哦~\n快去玩游戏赢元宝吧');
PanelCtrl.instance.show('shopTip');
}
}, PropType.HAMMER);//兑换道具
}
......
......@@ -44,7 +44,7 @@ export default class Buy2Panel extends Panel {
SceneCtrl.instance.updateScene();
}, window['collectRuleId']);
}else{
showToast('元宝不足哦~\n快去玩游戏赢元宝吧');
PanelCtrl.instance.show('shopTip');
}
}, PropType.BOOM);//兑换道具
}
......
......@@ -45,7 +45,7 @@ export default class Buy3Panel extends Panel {
SceneCtrl.instance.updateScene();
}, window['collectRuleId']);
}else{
showToast('元宝不足哦~\n快去玩游戏赢元宝吧');
PanelCtrl.instance.show('shopTip');
}
}, PropType.CHANCE_NUM);//兑换道具
}
......
......@@ -40,7 +40,7 @@ export default class ExchangePanel extends Panel {
SceneCtrl.instance.updateScene();
}, window['collectRuleId']);
}else{
showToast('元宝不足哦~\n快去玩游戏赢元宝吧');
PanelCtrl.instance.show('shopTip');
}
}, PropType.CASH_NUM);//兑换道具
}
......
import Panel from "../../libs/new_wx/components/Panel";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import { NetManager } from "../../libs/tw/manager/NetManager";
import { getlogItem } from "../Main";
import Utils from "../Utils";
const MIN: number = 1;
const MAX: number = 100;
const ONE_ADD: number = 1;
const btnNum: number[] = [10, 50, 100];
export default class RechargePanel extends Panel {
public closeBtn: eui.Button;
public addBtn: eui.Image;
public subBtn: eui.Image;
public numLabel: eui.Label;
public btn: eui.Group;
public btnLabel: eui.Label;
public zuanLabel: eui.Label;
public btn_10: eui.Image;
public btn_50: eui.Image;
public btn_100: eui.Image;
private nowNumber: number = MIN; // 当前显示的数值
// private totalNum:number = 0; // 总共的数值
private holdTimer = null;
private setNumTimer = null;
start(data) {
super.start();
this.getYunZuan();
this.setNum();
NetManager.ins.showLog(getlogItem(70));
NetManager.ins.showLog(getlogItem(71));
NetManager.ins.showLog(getlogItem(72));
NetManager.ins.showLog(getlogItem(73));
}
private btnDelay(target) {
target.touchEnabled = false;
setTimeout(() => {
target.touchEnabled = true;
}, 500);
}
private onTouchNum(e: egret.TouchEvent) {
switch(e.target) {
case this.btn_10:
NetManager.ins.clickLog(getlogItem(70));
this.nowNumber = 10;
this.setNum();
break;
case this.btn_50:
NetManager.ins.clickLog(getlogItem(71));
this.nowNumber = 50;
this.setNum();
break;
case this.btn_100:
NetManager.ins.clickLog(getlogItem(72));
this.nowNumber = 100;
this.setNum();
break;
}
}
private onTouchAS_Begin(e: egret.TouchEvent) {
let scale = (e.target == this.addBtn ? 1 : -1);
this.nowNumber += (ONE_ADD * scale);
this.setHold(ONE_ADD * scale);
this.setNum();
}
private setHold(num) {
let that = this;
(this.holdTimer != null) && clearInterval(this.holdTimer);
(this.setNumTimer != null) && clearInterval(this.setNumTimer);
that.holdTimer = setTimeout(holdCall, 1000);
function holdCall() {
clearTimeout(that.holdTimer);
that.holdTimer = null;
that.setNumTimer = setInterval(addCall, 30);
}
function addCall() {
that.nowNumber += num;
that.setNum();
}
}
private onTouchAS_ECR(e: egret.TouchEvent) {
(this.holdTimer != null) && clearInterval(this.holdTimer);
(this.setNumTimer != null) && clearInterval(this.setNumTimer);
}
private setNumBtn() {
/// TODO 低效方式来处理按钮状态,每次按数字按钮都会执行以下逻辑,待优化
btnNum.forEach((v) => {
this[`btn_${v}`].source = `recharge_${v}_ds_png`;
this[`btn_${v}`].touchEnabled = true;
});
(Utils.isInArray(this.nowNumber, btnNum))
? function() {
this[`btn_${this.nowNumber}`].source = `recharge_${this.nowNumber}_en_png`;
this[`btn_${this.nowNumber}`].touchEnabled = false;
}.bind(this)() : 0; /// TODO 此处0仅为完成语法表达式
}
private setNum() {
/// TODO 低效方式,每次改变this.nowNumber值都会执行以下逻辑,待优化
this.addBtn.touchEnabled = true;
this.addBtn.source = 'recharge_add_en_png';
this.subBtn.touchEnabled = true;
this.subBtn.source = 'recharge_sub_en_png';
if(this.nowNumber >= MAX) {
this.nowNumber = MAX;
this.addBtn.touchEnabled = false;
this.addBtn.source = 'recharge_add_ds_png';
} else if(this.nowNumber <= MIN) {
this.nowNumber = MIN;
this.subBtn.touchEnabled = false;
this.subBtn.source = 'recharge_sub_ds_png';
}
this.setNumBtn();
this.numLabel.text = '' + this.nowNumber;
this.btnLabel.text = `-${this.nowNumber}云钻`;
}
private onTouchBtn(e: egret.TouchEvent) {
/// TODO 发接口兑换
NetManager.ins.clickLog(getlogItem(73));
PanelCtrl.instance.show('Shop');
}
onTouchTap_closeBtn() {
super.onTouchTap_closeBtn();
PanelCtrl.instance.show('Shop');
}
private getYunZuan() {
/// TODO 通过接口获取云钻数量并显示
this.zuanLabel.text = '我的云钻:0';
}
initEvents() {
super.initEvents();
this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchBtn, this);
btnNum.forEach((v: number) => {
this[`btn_${v}`].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchNum, this);
});
[
[egret.TouchEvent.TOUCH_BEGIN, this.onTouchAS_Begin],
[egret.TouchEvent.TOUCH_END, this.onTouchAS_ECR],
[egret.TouchEvent.TOUCH_CANCEL, this.onTouchAS_ECR],
[egret.TouchEvent.TOUCH_RELEASE_OUTSIDE, this.onTouchAS_ECR]
].forEach((v: any[]) => {
this.addBtn.addEventListener(v[0], v[1], this);
this.subBtn.addEventListener(v[0], v[1], this);
});
}
removeEvents() {
super.removeEvents();
this.btn.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchBtn, this);
btnNum.forEach((v: number) => {
this[`btn_${v}`].removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchNum, this);
});
[
[egret.TouchEvent.TOUCH_BEGIN, this.onTouchAS_Begin],
[egret.TouchEvent.TOUCH_END, this.onTouchAS_ECR],
[egret.TouchEvent.TOUCH_CANCEL, this.onTouchAS_ECR],
[egret.TouchEvent.TOUCH_RELEASE_OUTSIDE, this.onTouchAS_ECR]
].forEach((v: any[]) => {
this.addBtn.removeEventListener(v[0], v[1], this);
this.subBtn.removeEventListener(v[0], v[1], this);
});
}
get skinKey() {
return 'Recharge'
}
}
\ No newline at end of file
......@@ -5,9 +5,7 @@ import { getlogItem } from "../Main";
import getHomeData from "../getHomeData";
export default class ShopPanel extends Panel {
buyBtn1: eui.Button;
buyBtn3: eui.Button;
buyBtn2: eui.Button;
start(data) {
super.start();
this['buyBtn1'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onBuy1, this);
......@@ -16,27 +14,43 @@ export default class ShopPanel extends Panel {
this['buyBtn4'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onBuy4, this);
this.showLog();
this['price1Txt'].text = window['price2']
this['price2Txt'].text = window['price3']
this['price3Txt'].text = window['price4']
this['price4Txt'].text = window['price5']
this['recharge'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.goRecharge, this);
this['price1Txt'].text = window['price2'];
this['price2Txt'].text = window['price3'];
this['price3Txt'].text = window['price4'];
this['price4Txt'].text = window['price5'];
this['moneyTxt'].text = getHomeData().wealth;
}
private goRecharge() {
NetManager.ins.clickLog(getlogItem(68));
PanelCtrl.instance.show('recharge');
}
destroy() {
super.destroy();
this['buyBtn1'].removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onBuy1, this);
this['buyBtn2'].removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onBuy2, this);
this['buyBtn3'].removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onBuy3, this);
this['buyBtn4'].removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onBuy4, this);
this['recharge'].removeEventListener(egret.TouchEvent.TOUCH_TAP, this.goRecharge, this);
}
showLog() {
NetManager.ins.showLog(getlogItem(6));
NetManager.ins.showLog(getlogItem(9));
NetManager.ins.showLog(getlogItem(12));
NetManager.ins.showLog(getlogItem(40));
NetManager.ins.showLog(getlogItem(68));
}
onBuy4() {
PanelCtrl.instance.show('ExchangePanel');
NetManager.ins.clickLog(getlogItem(40));
}
onBuy1() {
PanelCtrl.instance.show('Buy1');
NetManager.ins.clickLog(getlogItem(9));
......@@ -79,5 +93,7 @@ export default class ShopPanel extends Panel {
// }, 2, PropType.CHANCE_NUM);//兑换道具
}
get skinKey() { return 'Shop' }
get skinKey() {
return 'Shop'
}
}
\ No newline at end of file
import Panel from "../../libs/new_wx/components/Panel";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import { NetManager } from "../../libs/tw/manager/NetManager";
import { getlogItem } from "../Main";
export default class ShopTipPanel extends Panel {
public closeBtn: eui.Button;
public btn: eui.Image;
start(data) {
super.start();
NetManager.ins.showLog(getlogItem(69));
}
initEvents() {
super.initEvents();
this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchBtn, this);
}
onTouchBtn() {
NetManager.ins.clickLog(getlogItem(69));
PanelCtrl.instance.show('recharge');
// this.onTouchTap_closeBtn();
}
removeEvents() {
super.removeEvents();
this.btn.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchBtn, this);
}
get skinKey() {
return 'ShopTip'
}
}
\ No newline at end of file
......@@ -3,7 +3,6 @@ import getSkinPath from "../../../libs/new_wx/utils/getSkinPath";
import { NetManager } from "../../../libs/tw/manager/NetManager";
import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
import { GDispatcher } from "../../../libs/tc/util/GDispatcher";
import { getlogItem } from "../../Main";
import { Buried } from "../../../libs/tw/util/Buried";
export default class TaskCenter extends Panel {
......@@ -45,7 +44,7 @@ export default class TaskCenter extends Panel {
super.onTouchTap_closeBtn();
});
}
get skinKey() {
return 'TaskCenter'
}
......
{
"success":0
"success":false
}
\ No newline at end of file
......@@ -12,7 +12,7 @@
"remark": "下单任务",
"taskTitle": "狮狮连萌下单任务",
"taskViceTitle": "狮狮连萌下单任务",
"icon": "//uimgpre.cnsuning.com/uimg/scdc/exchange/152420922403871250.png",
"icon": "//yun.dui88.com/images/201910/s0yhv1nlil.jpeg",
"limit": "1",
"done": "0",
"appIncompleteText": "去看看",
......@@ -42,7 +42,7 @@
"remark": "逛店铺呀",
"taskTitle": "狮狮连萌逛店铺",
"taskViceTitle": "200金币",
"icon": "//uimgxgpre.cnsuning.com/uimg//scdc/exchange/157086878298813552.png",
"icon": "//yun.dui88.com/images/201910/s0yhv1nlil.jpeg",
"limit": "3",
"done": "3",
"appIncompleteText": "去看看",
......@@ -61,39 +61,9 @@
"terminalType": "9",
"taskName": "狮狮连萌逛店铺",
"taskId": "RW448429803289649152",
"count": "3",
"count": "0",
"tips": "你好02"
},
{
"subActivityId": "SUB446971290222411776",
"subActivityName": "狮狮连萌浏览商品",
"status": "0",
"taskStatus": "99",
"remark": "浏览商品聚合页",
"taskTitle": "狮狮连萌浏览商品",
"taskViceTitle": "200金币",
"icon": "//uimgxgpre.cnsuning.com/uimg/scdc/exchange/157086878298813552.png",
"limit": "1",
"done": "0",
"appIncompleteText": "去看看",
"appCompleteText": "已完成",
"appIncompletelink": "http://cuxiaoprexg.m.cnsuning.com/scms/cstask.html?activityId=SL446689024459878400&subactivityId=SUB446971290222411776&businessid=cstask",
"appCompletelink": "//m.suning.com",
"pcIncompleteText": null,
"pcCompleteText": "已完成",
"pcIncompletelink": null,
"pcCompletelink": "",
"homeLink": "https://gameactprexg.cnsuning.com/sngame-web/api/duiba/private/v1/getLoginUrl.do?appCode=duiba&activityCode=3651405",
"receivetype": "0",
"browseSecond": "10",
"incompleteLink": "//uimgxgpre.cnsuning.com/uimg//scdc/exchange/157438705987079430.png",
"completeLink": "//uimgxgpre.cnsuning.com/uimg//scdc/exchange/157438705989552821.png",
"terminalType": "9",
"taskName": null,
"taskId": null,
"count": null,
"tips": "你好04"
},
{
"subActivityId": "SUB446689681678090240",
"subActivityName": "狮狮连萌逛会场",
......@@ -102,7 +72,7 @@
"remark": "狮狮连萌浏览啦",
"taskTitle": "狮狮连萌逛会场任务",
"taskViceTitle": null,
"icon": null,
"icon": "//yun.dui88.com/images/201910/s0yhv1nlil.jpeg",
"limit": "8",
"done": "8",
"appIncompleteText": "去看看",
......@@ -121,7 +91,7 @@
"terminalType": "9",
"taskName": "狮狮连萌逛会场任务",
"taskId": "RW446695731227987968",
"count": "2",
"count": "0",
"tips": "你好03"
}
]
......
......@@ -4,7 +4,7 @@
"desc": "OK",
"timestamp": 1566885811031,
"data": {
"wealth": 7960,
"wealth": 0,
"totalStars": 145,
"levels": [
{
......
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