Commit d2e0f458 authored by 邱旭's avatar 邱旭

m

parent f11e315a
...@@ -2,11 +2,20 @@ ...@@ -2,11 +2,20 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="0d3cb18d-e144-41a0-bc8b-4877c2e1fef1" name="默认的" comment=""> <list default="true" id="0d3cb18d-e144-41a0-bc8b-4877c2e1fef1" name="默认的" comment="">
<change afterPath="$PROJECT_DIR$/resource/helpPanel/helpBg.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/helpPanel/helpBtn.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/panels/HelpPanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/mock/miniTb/feile.getActivityBaseInfoById.json" beforeDir="false" afterPath="$PROJECT_DIR$/mock/miniTb/feile.getActivityBaseInfoById.json" afterDir="false" /> <change beforePath="$PROJECT_DIR$/mock/miniTb/aa.json" beforeDir="false" afterPath="$PROJECT_DIR$/mock/miniTb/aa.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/mock/miniTb/mine.getAppData.json" beforeDir="false" afterPath="$PROJECT_DIR$/mock/miniTb/mine.getAppData.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/output.js" beforeDir="false" afterPath="$PROJECT_DIR$/output.js" afterDir="false" /> <change beforePath="$PROJECT_DIR$/output.js" beforeDir="false" afterPath="$PROJECT_DIR$/output.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/output.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/output.js.map" afterDir="false" /> <change beforePath="$PROJECT_DIR$/output.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/output.js.map" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/RulePanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/RulePanel.ts" 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/TaoBaoNet.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/TaoBaoNet.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Tools.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/Tools.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/scene/LoadingScene.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/LoadingScene.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> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
...@@ -47,7 +56,7 @@ ...@@ -47,7 +56,7 @@
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" /> <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" /> <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/resource" /> <property name="last_opened_file_path" value="$PROJECT_DIR$/src/panels" />
<property name="nodejs_package_manager_path" value="npm" /> <property name="nodejs_package_manager_path" value="npm" />
<property name="settings.editor.selected.configurable" value="vcs.Git" /> <property name="settings.editor.selected.configurable" value="vcs.Git" />
<property name="ts.external.directory.path" value="$PROJECT_DIR$/node_modules/typescript/lib" /> <property name="ts.external.directory.path" value="$PROJECT_DIR$/node_modules/typescript/lib" />
...@@ -55,17 +64,17 @@ ...@@ -55,17 +64,17 @@
</component> </component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/src/panels" />
<recent name="$PROJECT_DIR$/resource" /> <recent name="$PROJECT_DIR$/resource" />
<recent name="$PROJECT_DIR$/lotties" /> <recent name="$PROJECT_DIR$/lotties" />
<recent name="$PROJECT_DIR$/tb" /> <recent name="$PROJECT_DIR$/tb" />
<recent name="$PROJECT_DIR$/src/panels" />
</key> </key>
<key name="MoveFile.RECENT_KEYS"> <key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resource/common" /> <recent name="$PROJECT_DIR$/resource/common" />
<recent name="$PROJECT_DIR$/lotties" /> <recent name="$PROJECT_DIR$/lotties" />
</key> </key>
</component> </component>
<component name="RunManager" selected="npm.buildTS"> <component name="RunManager" selected="npm.dev">
<configuration name="build" type="js.build_tools.npm" temporary="true" nameIsGenerated="true"> <configuration name="build" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" /> <package-json value="$PROJECT_DIR$/package.json" />
<command value="run" /> <command value="run" />
...@@ -114,10 +123,10 @@ ...@@ -114,10 +123,10 @@
</list> </list>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="npm.buildTS" />
<item itemvalue="npm.build" />
<item itemvalue="npm.dev" /> <item itemvalue="npm.dev" />
<item itemvalue="npm.flushRes" /> <item itemvalue="npm.flushRes" />
<item itemvalue="npm.buildTS" />
<item itemvalue="npm.build" />
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>
...@@ -134,7 +143,7 @@ ...@@ -134,7 +143,7 @@
<workItem from="1612662929222" duration="40609000" /> <workItem from="1612662929222" duration="40609000" />
<workItem from="1613698993022" duration="22309000" /> <workItem from="1613698993022" duration="22309000" />
<workItem from="1613785579125" duration="17751000" /> <workItem from="1613785579125" duration="17751000" />
<workItem from="1613958457445" duration="7651000" /> <workItem from="1613958457445" duration="11432000" />
</task> </task>
<task id="LOCAL-00001" summary="斐乐消消乐"> <task id="LOCAL-00001" summary="斐乐消消乐">
<created>1612581213298</created> <created>1612581213298</created>
...@@ -437,7 +446,14 @@ ...@@ -437,7 +446,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1614049858546</updated> <updated>1614049858546</updated>
</task> </task>
<option name="localTasksCounter" value="44" /> <task id="LOCAL-00044" summary="m">
<created>1614051416478</created>
<option name="number" value="00044" />
<option name="presentableId" value="LOCAL-00044" />
<option name="project" value="LOCAL" />
<updated>1614051416478</updated>
</task>
<option name="localTasksCounter" value="45" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
......
{ {
"code": "000000", "code": "000000",
"data": { "data": {
"currentLevel": 9, "records": [
"isFristLogin": false, {
"visitors": [ "score": 35280,
{ "level": 1,
"activityId": "5f11948b3075d9927ec1f4ce", "isVisitSuccess": true,
"score": 25230, "stars": 3
"level": 8, }
"createTime": 1595384151916, ],
"openId": "AAE7CvE-ALiIWXYsJuQ4PxLI", "openId": "AAHr9QYsANUEO_cbBdzJUj7O",
"isVisitSuccess": true, "rule": "扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩后端是多扩扩",
"updateTime": 1595384151916, "topLevelVisitSuccess": false,
"_id": "5f17a157114fbb904c2960a9", "updateTime": 1614047423516,
"stars": 3, "title": "斐乐测试测试活动",
"isPrizeLevel": false, "tools": {
"sendAwardType": true "booms": 1,
}, "hammers": 1,
{ "steps": 1
"activityId": "5f11948b3075d9927ec1f4ce", },
"score": 48400, "levelPrize": {
"level": 7, "level50": "https://img.alicdn.com/imgextra/i2/676606897/O1CN017elfUH20osKEsgRdY_!!676606897-0-miniprogram.jpg",
"createTime": 1595384121437, "level99": "https://img.alicdn.com/imgextra/i1/676606897/O1CN01kJeK0w20osKKCIz8a_!!676606897-0-miniprogram.jpg"
"openId": "AAE7CvE-ALiIWXYsJuQ4PxLI",
"isVisitSuccess": true,
"updateTime": 1595384121437,
"_id": "5f17a1393075d9927ecaa167",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f11948b3075d9927ec1f4ce",
"score": 29190,
"level": 6,
"createTime": 1595383992964,
"openId": "AAE7CvE-ALiIWXYsJuQ4PxLI",
"isVisitSuccess": true,
"updateTime": 1595383992964,
"_id": "5f17a0b8964f9796f92905af",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f11948b3075d9927ec1f4ce",
"score": 35340,
"level": 5,
"createTime": 1595383923721,
"openId": "AAE7CvE-ALiIWXYsJuQ4PxLI",
"isVisitSuccess": true,
"updateTime": 1595383923721,
"_id": "5f17a07385a749991449cc5e",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f11948b3075d9927ec1f4ce",
"score": 15190,
"level": 4,
"createTime": 1595314767660,
"openId": "AAE7CvE-ALiIWXYsJuQ4PxLI",
"isVisitSuccess": true,
"updateTime": 1595314767660,
"_id": "5f16924f086e65659ba635f0",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f11948b3075d9927ec1f4ce",
"score": 13980,
"level": 3,
"createTime": 1595310071216,
"openId": "AAE7CvE-ALiIWXYsJuQ4PxLI",
"isVisitSuccess": true,
"updateTime": 1595310071216,
"_id": "5f167ff7086e65659ba61824",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f11948b3075d9927ec1f4ce",
"score": 960,
"level": 2,
"createTime": 1595309984235,
"openId": "AAE7CvE-ALiIWXYsJuQ4PxLI",
"isVisitSuccess": true,
"updateTime": 1595309984235,
"_id": "5f167fa0c3ad3494b93d47e3",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f11948b3075d9927ec1f4ce",
"score": 64690,
"level": 1,
"createTime": 1595309828984,
"openId": "AAE7CvE-ALiIWXYsJuQ4PxLI",
"isVisitSuccess": true,
"updateTime": 1595309828984,
"_id": "5f167f059897b48d280c5880",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
}
],
"prizes": [],
"loginAddPower": 0,
"power": 987,
"tools": {
"HAMMERS": 2,
"STEPS": 2,
"BOOMS": 1
},
"topAward": {}
}, },
"success": true, "currentLevel": 2,
"message": "成功" "createTime": 1614047375527,
} "isDrawTopLevelPrize": false,
\ No newline at end of file "deleteStatus": 1,
"awardReceiveExpiredTime": 1615257022000,
"startTime": 1614047422000,
"power": 1,
"_id": "6034688fe5c0d7b04c985429",
"endTime": 1614652222000,
"openPrizeStatus": 1,
"tasks": {
"invites": {
"taskRateType": 3,
"title": "",
"value": 2
},
"collectGoods": {
"times": 1,
"itemIds": "638079013587,637721088148,616903228711",
"taskRateType": 2,
"title": "",
"type": "",
"value": 1
},
"follow": {
"times": 1,
"taskRateType": 1,
"value": 1
},
"jumpLink": {
"times": 1,
"taskRateType": 2,
"links": [
"www.taobao.com",
"http://baidu.com",
"http://baidu.com1",
"http://baidu.com2",
"http://baidu.com3",
"http://baidu.com4",
"http://baidu.com5",
"http://baidu.com6",
"http://baidu.com7",
"http://baidu.com8"
],
"title": "",
"value": 1
}
}
},
"success": true,
"message": "成功"
}
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
"nickName": "我啊是大请问", "nickName": "我啊是大请问",
"activityId": "string", "activityId": "string",
"openId": "string", "openId": "string",
"isFirstLogin": false, "isFirstLogin": true,
"loginAddPower": 3, "loginAddPower": 3,
"isNewUser": false, "isNewUser": true,
"inviteId": "string", "inviteId": "string",
"isFollow": true "isFollow": true
} }
......
...@@ -11728,11 +11728,12 @@ var RulePanel = (function (_super) { ...@@ -11728,11 +11728,12 @@ var RulePanel = (function (_super) {
RulePanel.prototype.start = function (data) { RulePanel.prototype.start = function (data) {
var _this = this; var _this = this;
_super.prototype.start.call(this); _super.prototype.start.call(this);
this.addChild(Tools_1.Tools.getText("活动规则", 38, '#892a1a', FYGE.TEXT_ALIGN.CENTER, 570, 96, 510));
var rule = Tools_1.Tools.gameData.rule; var rule = Tools_1.Tools.gameData.rule;
this.ruleTex = this.addChild(Tools_1.Tools.getText(rule, 26, '#892a1a', FYGE.TEXT_ALIGN.LEFT, 570)); this.ruleTex = this.addChild(Tools_1.Tools.getText(rule, 26, '#892a1a', FYGE.TEXT_ALIGN.LEFT, 570));
this.ruleTex.lineType = TEXT_lINETYPE.MULTI; this.ruleTex.lineType = TEXT_lINETYPE.MULTI;
this.scroll = this.addChild(new ScrollPage(570, 600, this.ruleTex.textHeight + 30)); this.scroll = this.addChild(new ScrollPage(570, 500, this.ruleTex.textHeight + 30));
this.scroll.position.set(96, 549); this.scroll.position.set(96, 580);
this.scroll.view.addChild(this.ruleTex); this.scroll.view.addChild(this.ruleTex);
this.addChild(new Button(RES_1.RES.getRes('ruleBtn.png'))) this.addChild(new Button(RES_1.RES.getRes('ruleBtn.png')))
.addEventListener(MouseEvent.CLICK, function () { return _this.hidePanel(); }) .addEventListener(MouseEvent.CLICK, function () { return _this.hidePanel(); })
This diff is collapsed.
...@@ -8,6 +8,10 @@ ...@@ -8,6 +8,10 @@
"keys": "freePowerBg.png,freePowerBtn.png", "keys": "freePowerBg.png,freePowerBtn.png",
"name": "FreePowerPanel" "name": "FreePowerPanel"
}, },
{
"keys": "helpBg.png,helpBtn.png",
"name": "HelpPanel"
},
{ {
"keys": "体力不足.png,体力不足按钮.png", "keys": "体力不足.png,体力不足按钮.png",
"name": "NoEnergyPanel" "name": "NoEnergyPanel"
......
This diff is collapsed.
...@@ -16,6 +16,8 @@ export enum TbNetName { ...@@ -16,6 +16,8 @@ export enum TbNetName {
getRemainTimes = "feile.getRemainTimes", getRemainTimes = "feile.getRemainTimes",
doHelp = "feile.doHelp",
/** /**
* 活动基本信息 * 活动基本信息
* @param activityId * @param activityId
......
...@@ -37,6 +37,7 @@ export class Tools { ...@@ -37,6 +37,7 @@ export class Tools {
activityId: string, activityId: string,
openId: string, openId: string,
inviteId: string, inviteId: string,
oldInviteId: string,
isFollow: boolean, isFollow: boolean,
isFirstLogin: boolean, // 当日是否第一次登录 isFirstLogin: boolean, // 当日是否第一次登录
loginAddPower: number, // 赠送体力值 loginAddPower: number, // 赠送体力值
......
import { Panel } from "../../module/views/Panel";
import { RES } from "../../module/RES";
import { Tools } from "../Tools";
import { sendTbNet, TbNetName } from "../TaoBaoNet";
import { showToast } from "../../module/ctrls";
import Button = FYGE.Button;
import MouseEvent = FYGE.MouseEvent;
export class HelpPanel extends Panel {
get groupNames() {
return ["HelpPanel"]
}
initUi() {
}
start(data) {
super.start();
this.addChild(Tools.getSprite('helpBg.png')).position.set(50, 549);
this.addChild(new Button(RES.getRes('helpBtn.png')))
.addEventListener(MouseEvent.CLICK, this.doHelp, this)
.position.set(190, 910);
this.addChild(new Button(RES.getRes('关闭按钮.png')))
.addEventListener(MouseEvent.CLICK, () => this.hidePanel())
.position.set(643, 536);
}
hidePanel() {
super.hidePanel();
Tools.globalData.inviteId = '';
}
doHelp() {
if(Tools.globalData.inviteId == Tools.globalData.openId){
this.hidePanel();
return;
}
sendTbNet(TbNetName.doHelp, { inviteId: Tools.globalData.inviteId },
(success, res) => {
if (!success) { // 失败唤起入会插件 /// TODO 是自己?
if (res.data && !res.data.isvip) {
showToast('请入会后参与');
setTimeout(() => {
sendTbNet(TbNetName.openMember);
}, 1500);
}
return;
}
this.hidePanel();
});
}
initEvents() {
super.initEvents();
}
removeEvents() {
super.removeEvents();
}
}
...@@ -68,6 +68,7 @@ export class LoadingScene extends Scene { ...@@ -68,6 +68,7 @@ export class LoadingScene extends Scene {
//获取app数据 //获取app数据
const { data } = await sendTbNet(TbNetName.getAppData); const { data } = await sendTbNet(TbNetName.getAppData);
Tools.globalData = data; Tools.globalData = data;
Tools.globalData.oldInviteId = Tools.globalData.inviteId;
this.dispatchEvent(FYGE.Event.PROGRESS, 0.3); this.dispatchEvent(FYGE.Event.PROGRESS, 0.3);
//询问读取权限,不阻止进程 //询问读取权限,不阻止进程
......
...@@ -8,12 +8,13 @@ import { layers } from "../../../module/views/layers"; ...@@ -8,12 +8,13 @@ import { layers } from "../../../module/views/layers";
import { Tools } from "../../Tools"; import { Tools } from "../../Tools";
import { showPanel } from "../../../module/ctrls"; import { showPanel } from "../../../module/ctrls";
import { FreePowerPanel } from "../../panels/FreePowerPanel"; import { FreePowerPanel } from "../../panels/FreePowerPanel";
import { GDispatcher } from "../../Main";
import { HelpPanel } from "../../panels/HelpPanel";
import ScrollPage = FYGE.ScrollPage; import ScrollPage = FYGE.ScrollPage;
import Container = FYGE.Container; import Container = FYGE.Container;
import Graphics = FYGE.Graphics; import Graphics = FYGE.Graphics;
import Tween = FYGE.Tween; import Tween = FYGE.Tween;
import Ease = FYGE.Ease; import Ease = FYGE.Ease;
import { GDispatcher } from "../../Main";
export class MapScene extends Scene { export class MapScene extends Scene {
private mapContainer: Container = null; private mapContainer: Container = null;
...@@ -46,10 +47,15 @@ export class MapScene extends Scene { ...@@ -46,10 +47,15 @@ export class MapScene extends Scene {
this.initMap(); this.initMap();
this.updateMapCheck(); this.updateMapCheck();
if (Tools.globalData.isFirstLogin && !Tools.globalData.isNewUser) { if(Tools.globalData.isFirstLogin){
showPanel(FreePowerPanel); showPanel(FreePowerPanel);
Tools.globalData.isFirstLogin = false; Tools.globalData.isFirstLogin = false;
} }
if (Tools.globalData.inviteId) { // 有邀请码,唤起弹窗
showPanel(HelpPanel);
}
} }
private updateMapCheck() { private updateMapCheck() {
...@@ -216,6 +222,7 @@ export class MapScene extends Scene { ...@@ -216,6 +222,7 @@ export class MapScene extends Scene {
// "score": 58940, // "score": 58940,
// "stars": 3 // "stars": 3
// }); // });
} }
public initEvents() { public initEvents() {
......
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