Commit 3bd19ea2 authored by wjf's avatar wjf

Merge branch 'master' of gitlab2.dui88.com:MrKwon/babycare_xiaoxiao

parents ba02d389 2d894dd6
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="9cef0552-af3c-4a1c-be1f-dc41ebe5b6db" name="Default Changelist" comment="Success Panel Effect!">
<list default="true" id="9cef0552-af3c-4a1c-be1f-dc41ebe5b6db" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/mock/miniTb/babycare.gameOver.json" beforeDir="false" afterPath="$PROJECT_DIR$/mock/miniTb/babycare.gameOver.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/res.json" beforeDir="false" afterPath="$PROJECT_DIR$/resource/res.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ResJson.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/ResJson.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/scene/map/MapScene.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/map/MapScene.ts" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -15,8 +13,8 @@
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="TypeScript File" />
<option value="JsonFile" />
<option value="TypeScript File" />
</list>
</option>
</component>
......@@ -48,22 +46,22 @@
<property name="ts.external.directory.path" value="$PROJECT_DIR$/node_modules/typescript/lib" />
</component>
<component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resource/common" />
<recent name="$PROJECT_DIR$/resource/map" />
<recent name="$PROJECT_DIR$/resource/SuccessPanel" />
<recent name="$PROJECT_DIR$/resource/starLight" />
<recent name="$PROJECT_DIR$/resource/SuccessPrizePanel" />
<recent name="$PROJECT_DIR$/resource/mapWhaleEffect" />
<recent name="$PROJECT_DIR$/src/scene/map" />
</key>
<key name="CopyFile.RECENT_KEYS">
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resource/PrizePanel" />
<recent name="$PROJECT_DIR$/resource/common" />
<recent name="$PROJECT_DIR$/resource/map" />
<recent name="$PROJECT_DIR$/resource/SuccessPanel" />
<recent name="$PROJECT_DIR$/resource/starLight" />
<recent name="$PROJECT_DIR$/resource/SuccessPrizePanel" />
<recent name="$PROJECT_DIR$/resource/mapWhaleEffect" />
</key>
</component>
<component name="RunManager" selected="npm.dev">
<component name="RunManager" selected="npm.flushRes">
<configuration name="dev" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
......@@ -87,8 +85,8 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="npm.dev" />
<item itemvalue="npm.flushRes" />
<item itemvalue="npm.dev" />
</list>
</recent_temporary>
</component>
......@@ -114,7 +112,7 @@
<workItem from="1595209499266" duration="21574000" />
<workItem from="1595296313180" duration="16175000" />
<workItem from="1595382049907" duration="765000" />
<workItem from="1595382857407" duration="1467000" />
<workItem from="1595382857407" duration="4287000" />
</task>
<task id="LOCAL-00001" summary="111">
<created>1594122339119</created>
......@@ -305,7 +303,21 @@
<option name="project" value="LOCAL" />
<updated>1595315161168</updated>
</task>
<option name="localTasksCounter" value="28" />
<task id="LOCAL-00028" summary="Success Panel Effect!">
<created>1595384472225</created>
<option name="number" value="00028" />
<option name="presentableId" value="LOCAL-00028" />
<option name="project" value="LOCAL" />
<updated>1595384472225</updated>
</task>
<task id="LOCAL-00029" summary="Success Panel Effect!">
<created>1595387247496</created>
<option name="number" value="00029" />
<option name="presentableId" value="LOCAL-00029" />
<option name="project" value="LOCAL" />
<updated>1595387247496</updated>
</task>
<option name="localTasksCounter" value="30" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
......@@ -331,30 +343,30 @@
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state x="251" y="471" key="ANALYSIS_DLG_com.intellij.analysis.BaseAnalysisAction$1/31.23.1889.1177@31.23.1889.1177" timestamp="1594113080922" />
<state x="558" y="183" width="884" height="891" key="CommitChangelistDialog2" timestamp="1595315196034">
<state x="558" y="183" width="884" height="891" key="CommitChangelistDialog2" timestamp="1595387247287">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state x="558" y="183" width="884" height="891" key="CommitChangelistDialog2/31.23.1889.1177@31.23.1889.1177" timestamp="1595315196034" />
<state width="873" height="321" key="GridCell.Tab.0.bottom" timestamp="1595382861578">
<state x="558" y="183" width="884" height="891" key="CommitChangelistDialog2/31.23.1889.1177@31.23.1889.1177" timestamp="1595387247287" />
<state width="873" height="321" key="GridCell.Tab.0.bottom" timestamp="1595386044593">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state width="866" height="321" key="GridCell.Tab.0.bottom/31.23.1649.1027@31.23.1649.1027" timestamp="1595348373239" />
<state width="873" height="321" key="GridCell.Tab.0.bottom/31.23.1889.1177@31.23.1889.1177" timestamp="1595382861578" />
<state width="873" height="321" key="GridCell.Tab.0.center" timestamp="1595382861577">
<state width="873" height="321" key="GridCell.Tab.0.bottom/31.23.1889.1177@31.23.1889.1177" timestamp="1595386044593" />
<state width="873" height="321" key="GridCell.Tab.0.center" timestamp="1595386044592">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state width="866" height="321" key="GridCell.Tab.0.center/31.23.1649.1027@31.23.1649.1027" timestamp="1595348373238" />
<state width="873" height="321" key="GridCell.Tab.0.center/31.23.1889.1177@31.23.1889.1177" timestamp="1595382861577" />
<state width="873" height="321" key="GridCell.Tab.0.left" timestamp="1595382861576">
<state width="873" height="321" key="GridCell.Tab.0.center/31.23.1889.1177@31.23.1889.1177" timestamp="1595386044592" />
<state width="873" height="321" key="GridCell.Tab.0.left" timestamp="1595386044591">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state width="866" height="321" key="GridCell.Tab.0.left/31.23.1649.1027@31.23.1649.1027" timestamp="1595348373237" />
<state width="873" height="321" key="GridCell.Tab.0.left/31.23.1889.1177@31.23.1889.1177" timestamp="1595382861576" />
<state width="873" height="321" key="GridCell.Tab.0.right" timestamp="1595382861578">
<state width="873" height="321" key="GridCell.Tab.0.left/31.23.1889.1177@31.23.1889.1177" timestamp="1595386044591" />
<state width="873" height="321" key="GridCell.Tab.0.right" timestamp="1595386044592">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state width="866" height="321" key="GridCell.Tab.0.right/31.23.1649.1027@31.23.1649.1027" timestamp="1595348373239" />
<state width="873" height="321" key="GridCell.Tab.0.right/31.23.1889.1177@31.23.1889.1177" timestamp="1595382861578" />
<state width="873" height="321" key="GridCell.Tab.0.right/31.23.1889.1177@31.23.1889.1177" timestamp="1595386044592" />
<state x="82" y="353" key="IDE.errors.dialog" timestamp="1594777965326">
<screen x="31" y="23" width="1889" height="1177" />
</state>
......@@ -367,10 +379,10 @@
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state x="300" y="248" key="SettingsEditor/31.23.1889.1177@31.23.1889.1177" timestamp="1594798992724" />
<state x="92" y="351" key="Vcs.Push.Dialog.v2" timestamp="1595315162424">
<state x="92" y="351" key="Vcs.Push.Dialog.v2" timestamp="1595387248705">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state x="92" y="351" key="Vcs.Push.Dialog.v2/31.23.1889.1177@31.23.1889.1177" timestamp="1595315162424" />
<state x="92" y="351" key="Vcs.Push.Dialog.v2/31.23.1889.1177@31.23.1889.1177" timestamp="1595387248705" />
<state x="87" y="216" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser" timestamp="1594705166397">
<screen x="31" y="23" width="1889" height="1177" />
</state>
......@@ -395,9 +407,9 @@
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state x="157" y="286" key="run.anything.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1594712635697" />
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup" timestamp="1595384304191">
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup" timestamp="1595387031010">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1595384304191" />
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1595387031010" />
</component>
</project>
\ No newline at end of file
......@@ -128,6 +128,21 @@
"sendAwardType": "prize"
}
],
"isFristLogin": false
"isFristLogin": false,
"topAward": {
"image":"https://img.alicdn.com/imgextra/i1/2275046294/O1CN01TrcMYF1wMhRuCphHI_!!2275046294-2-miniprogram.png",
"level":90,
"drawStatus":1,
"openId":"AAHuCvE-ALiIWXYsJuTb5S4W",
"createDay":"2020/07/14",
"avatar":"sdfwerwerwer",
"type":3,
"prizeId":"5f08084e0cb7338a0a377c8d",
"activityId":"5f08084ec3ad3494b9201c0e",
"ename":"",
"userNick":"wmmmmm",
"name":"90关奖品4",
"_id":"AAHuCvE-ALiIWXYsJuTb5S4W1594715684002"
}
}
}
......@@ -32,6 +32,10 @@
"keys": "步数耗尽Bg.png,步数耗尽复活.png,步数耗尽结束按钮.png",
"name": "NoStepPanel"
},
{
"keys": "prizePanel.png,prizePanelBtn.png",
"name": "PrizePanel"
},
{
"keys": "活动规则背景.png",
"name": "RulePanel"
......
......@@ -32,6 +32,10 @@ export const ResJson = {
"keys": "步数耗尽Bg.png,步数耗尽复活.png,步数耗尽结束按钮.png",
"name": "NoStepPanel"
},
{
"keys": "prizePanel.png,prizePanelBtn.png",
"name": "PrizePanel"
},
{
"keys": "活动规则背景.png",
"name": "RulePanel"
......
......@@ -720,6 +720,71 @@ export const SkinJson = {
}
]
},
{
"name": "PrizePanel",
"x": 0,
"y": 0,
"type": "container",
"children": [
{
"name": "背景",
"x": 55,
"y": 376,
"alpha": 1,
"type": "sprite",
"props": {
"source": "prizePanel.png"
}
},
{
"name": "关闭按钮",
"x": 631,
"y": 500,
"alpha": 1,
"type": "button",
"props": {
"tUp": "关闭按钮.png"
},
"id": "closeBtn"
},
{
"name": "文案",
"x": 203,
"y": 650,
"alpha": 1,
"type": "text",
"props": {
"text": "恭喜获得XX奖品",
"size": 34,
"fillColor": "#df5942",
"textAlpha": 1
},
"id": "prizeTxt"
},
{
"name": "prizeImg",
"x": 250,
"y": 732,
"alpha": 1,
"type": "sprite",
"props": {
"source": ""
},
"id": "prizeImg"
},
{
"name": "立即领取",
"x": 163,
"y": 1002,
"alpha": 1,
"type": "button",
"props": {
"tUp": "prizePanelBtn.png"
},
"id": "prizeBtn"
}
]
},
{
"name": "TaskPanel",
"x": 0,
......
......@@ -15,6 +15,9 @@ export enum TbNetName {
*/
getIndex = "babycare.getIndex",
// 领取权益奖励
receiveEnamePrize = "babycare.receiveEnamePrize",
/**
* 活动基本信息
......
import { Panel } from "../../module/views/Panel";
import TextField = FYGE.TextField;
import Button = FYGE.Button;
import Sprite = FYGE.Sprite;
import TEXT_ALIGN = FYGE.TEXT_ALIGN;
import Texture = FYGE.Texture;
import MouseEvent = FYGE.MouseEvent;
import { sendTbNet, TbNetName } from "../TaoBaoNet";
import { showToast } from "../../module/ctrls";
import { Tool } from "../something/Tool";
import { Tools } from "../Tools";
export class PrizePanel extends Panel {
get groupNames() {
return ["PrizePanel"]
}
get skinName() {
return "PrizePanel"
}
closeBtn: Button;
prizeTxt: TextField;
prizeImg: Sprite;
prizeBtn: Button;
initUi() {
this.prizeTxt.textAlign = TEXT_ALIGN.CENTER;
this.prizeTxt.textWidth = 750;
this.prizeTxt.x = 0;
this.prizeTxt.text = `恭喜获得${this.data.name}`;
this.prizeImg.anchorTexture.x = 0.5;
this.prizeImg.x = 375;
this.prizeImg.texture = Texture.fromUrl(this.data.image);
}
start(data) {
super.start();
}
private clickPrizeBtn(){
this.btnDelay(this.prizeBtn);
switch (this.data.type) {
case 1: // 权益
sendTbNet(TbNetName.receiveEnamePrize, {id: this.data.id},
(success, res) => {
if (!success || !res) {
showToast('奖品发放失败\n请前往我的奖品处进行处理');
this.hidePanel();
return;
}
if (res.data) {
showToast('奖品发放成功\n请前往我的奖品处查看');
} else {
showToast('奖品发放失败\n请前往我的奖品处进行处理');
}
this.hidePanel();
}, true
);
break;
case 3: // 实物
sendTbNet(TbNetName.getUserAddress, {prizeId: this.data.id},
(success, res) => {
if (!success) {
// showToast('奖品发放失败\n请前往我的奖品处进行处理');
return;
}
showToast('奖品发放成功\n请前往我的奖品处查看');
this.hidePanel();
}, true
);
break;
case 2: // 积分
case 5: // 谢谢参与
this.hidePanel();
break;
}
}
initEvents() {
super.initEvents();
this.prizeBtn.addEventListener(MouseEvent.CLICK, this.clickPrizeBtn, this);
}
removeEvents() {
super.removeEvents();
this.prizeBtn.removeEventListener(MouseEvent.CLICK, this.clickPrizeBtn, this);
}
}
......@@ -15,6 +15,8 @@ import Tween = FYGE.Tween;
import Ease = FYGE.Ease;
import { showPanel } from "../../../module/ctrls";
import { FreePowerPanel } from "../../panels/FreePowerPanel";
import { PrizePanel } from "../../panels/PrizePanel";
import { GTool } from "../../../module/tools/GTool";
export class MapScene extends Scene {
private mapContainer: Container = null;
......@@ -52,12 +54,16 @@ export class MapScene extends Scene {
this.initMap();
this.updateMapCheck();
// showPanel(SuccessNoPrizePanel)
if (Tools.gameData.loginAddPower && !Tools.gameData.isFristLogin) {
showPanel(FreePowerPanel);
Tools.gameData.loginAddPower = false;
}
let openPrize = GTool.readCache('openPrize');
if (Tools.gameData.topAward && openPrize !== 'true') {
GTool.writeCache('openPrize', 'true');
showPanel(PrizePanel, Tools.gameData.topAward);
}
}
private updateMapCheck() {
......
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