Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
babycare_xiaoxiao
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王剑峰
babycare_xiaoxiao
Commits
6e4e6a56
Commit
6e4e6a56
authored
Oct 09, 2020
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
789514fd
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
104 additions
and
56 deletions
+104
-56
workspace.xml
.idea/workspace.xml
+38
-30
popmartXXL2c.getTaskList.json
mock/miniTb/popmartXXL2c.getTaskList.json
+8
-8
output.js
output.js
+19
-2
output.js.map
output.js.map
+1
-1
mapGuide.png
resource/map/mapGuide.png
+0
-0
gameGuide1.png
resource/playScene/gameGuide1.png
+0
-0
Main.ts
src/Main.ts
+1
-2
ResJson.ts
src/ResJson.ts
+1
-1
TaoBaoNet.ts
src/TaoBaoNet.ts
+3
-0
StartPanelPrize.ts
src/panels/StartPanelPrize.ts
+16
-7
TaskPanel.ts
src/panels/TaskPanel.ts
+17
-5
No files found.
.idea/workspace.xml
View file @
6e4e6a56
This diff is collapsed.
Click to expand it.
mock/miniTb/popmartXXL2c.getTaskList.json
View file @
6e4e6a56
...
...
@@ -17,8 +17,8 @@
"beMemberUrl"
:
"https://www.baidu.com"
,
"rewards"
:
10
,
"todayCompleteTimes"
:
2
,
"totalTimes"
:
5
,
"waitReceiveTimes"
:
1
0
"totalTimes"
:
2
,
"waitReceiveTimes"
:
0
},
{
"taskType"
:
"orderGoods"
,
...
...
@@ -32,17 +32,17 @@
"taskType"
:
"follow"
,
"beMemberUrl"
:
"https://www.baidu.com"
,
"rewards"
:
10
,
"todayCompleteTimes"
:
2
,
"totalTimes"
:
5
,
"waitReceiveTimes"
:
1
0
"todayCompleteTimes"
:
1
,
"totalTimes"
:
1
,
"waitReceiveTimes"
:
0
},
{
"taskType"
:
"member"
,
"beMemberUrl"
:
"https://www.baidu.com"
,
"rewards"
:
10
,
"todayCompleteTimes"
:
2
,
"totalTimes"
:
5
,
"waitReceiveTimes"
:
1
0
"todayCompleteTimes"
:
1
,
"totalTimes"
:
1
,
"waitReceiveTimes"
:
0
}
]
}
...
...
output.js
View file @
6e4e6a56
...
...
@@ -12702,7 +12702,7 @@ exports.ResJson = {
}
}
],
"path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1602
039378
/resource/"
"path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1602
212094
/resource/"
};
...
...
@@ -13325,6 +13325,7 @@ var TbNetName;
TbNetName["trackingReport"] = "squirrelsAdoptRest2c.trackingReport";
TbNetName["receiveEnamePrize"] = "popmartXXL2c.receiveEnamePrize";
TbNetName["drawLotteryPrize"] = "popmartXXL2c.drawLotteryPrize";
TbNetName["doHelp"] = "popmartXXL2c.doHelp";
TbNetName["getActivityBaseInfoById"] = "popmartXXL2c.getActivityBaseInfoById";
TbNetName["consumerTools"] = "popmartXXL2c.consumerTools";
TbNetName["gameOver"] = "popmartXXL2c.gameOver";
...
...
@@ -18168,6 +18169,12 @@ var StartPanelPrize = (function (_super) {
isGiftPrizeLevel: res.data.isGiftPrizeLevel
});
_this.hidePanel();
if (Tools_1.Tools.globalData.inviteId) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.doHelp, { inviteId: Tools_1.Tools.globalData.inviteId }, function (success, res) {
if (success)
Tools_1.Tools.globalData.inviteId = null;
}, true);
}
});
};
StartPanelPrize.prototype.initEvents = function () {
...
...
@@ -18729,6 +18736,15 @@ var TaskPanel = (function (_super) {
if (!success)
return;
console.log(res);
for (var i = res.data.taskList.length - 1; i >= 0; i--) {
var v = res.data.taskList[i];
if ((v.taskType == TaskType.member || v.taskType == TaskType.follow)
&& v.todayCompleteTimes >= v.totalTimes
&& v.waitReceiveTimes <= 0) {
res.data.taskList.splice(i, 1);
}
}
console.log(res.data.taskList);
_this.scroll.updateData(res.data.taskList, true);
});
};
...
...
@@ -18802,6 +18818,7 @@ var TaskItem = (function (_super) {
if (!success)
return;
ctrls_1.showToast("\u4EFB\u52A1\u5B8C\u6210\uFF0C\u4F53\u529B\u503C+" + res.data.power + "\uFF01");
Main_1.GDispatcher.dispatchEvent(G_EVENT_1.G_EVENT.UPDATE_TASK);
});
};
TaskItem.prototype.clickTask = function () {
...
...
@@ -18821,7 +18838,7 @@ var TaskItem = (function (_super) {
});
break;
case TaskType.invites:
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.showSharePanel);
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.showSharePanel
, { openId: Tools_1.Tools.globalData.openId }
);
break;
case TaskType.orderGoods:
console.log('去下单页');
output.js.map
View file @
6e4e6a56
This diff is collapsed.
Click to expand it.
resource/map/mapGuide.png
0 → 100644
View file @
6e4e6a56
123 KB
resource/playScene/gameGuide1.png
0 → 100644
View file @
6e4e6a56
234 KB
src/Main.ts
View file @
6e4e6a56
...
...
@@ -85,8 +85,7 @@ export class Main {
// if (document.getElementById("__loading__")) document.getElementById("__loading__").style.display = "none";
//打开开始场景
changeScene
(
LoadingScene
);
// changeScene(PlayScene, {chapter: 120});
// changeScene(PlayScene, {chapter: 120})
}
//在小程序显示时调用onShow
...
...
src/ResJson.ts
View file @
6e4e6a56
...
...
@@ -10508,5 +10508,5 @@ export const ResJson = {
}
}
],
"path"
:
"https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1602
039378
/resource/"
"path"
:
"https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1602
212094
/resource/"
}
\ No newline at end of file
src/TaoBaoNet.ts
View file @
6e4e6a56
...
...
@@ -15,6 +15,9 @@ export enum TbNetName {
drawLotteryPrize
=
'popmartXXL2c.drawLotteryPrize'
,
// inviteId
doHelp
=
'popmartXXL2c.doHelp'
,
/**
* 活动基本信息
* @param activityId
...
...
src/panels/StartPanelPrize.ts
View file @
6e4e6a56
...
...
@@ -28,8 +28,8 @@ export class StartPanelPrize extends Panel {
this
.
isShowing
=
true
;
this
.
anchor
.
set
(
375
,
812
);
Tween
.
get
(
this
)
.
set
({
scaleX
:
0
,
scaleY
:
0
})
.
to
({
scaleX
:
1
,
scaleY
:
1
},
400
,
Ease
.
backOut
)
.
set
({
scaleX
:
0
,
scaleY
:
0
})
.
to
({
scaleX
:
1
,
scaleY
:
1
},
400
,
Ease
.
backOut
)
.
call
(()
=>
{
this
.
isShowing
=
false
;
});
...
...
@@ -44,7 +44,7 @@ export class StartPanelPrize extends Panel {
initUi
()
{
const
{
level
}
=
this
.
data
;
const
{
level
}
=
this
.
data
;
this
.
checkTex
.
textWidth
=
750
;
this
.
checkTex
.
textAlign
=
TEXT_ALIGN
.
CENTER
;
...
...
@@ -75,7 +75,7 @@ export class StartPanelPrize extends Panel {
}
private
startGame
()
{
const
{
level
,
isPlayed
}
=
this
.
data
;
const
{
level
,
isPlayed
}
=
this
.
data
;
this
.
enableMouseEvt
(
false
);
if
(
!
isPlayed
&&
Tools
.
propInfo
.
power
<=
0
)
{
// 体力不足
this
.
enableMouseEvt
(
true
);
...
...
@@ -83,7 +83,7 @@ export class StartPanelPrize extends Panel {
this
.
hidePanel
();
return
;
}
sendTbNet
(
TbNetName
.
dojoin
,
{
level
:
level
},
sendTbNet
(
TbNetName
.
dojoin
,
{
level
:
level
},
(
success
,
res
)
=>
{
this
.
enableMouseEvt
(
true
);
if
(
!
success
)
return
;
...
...
@@ -94,6 +94,15 @@ export class StartPanelPrize extends Panel {
isGiftPrizeLevel
:
res
.
data
.
isGiftPrizeLevel
});
this
.
hidePanel
();
// 如果有邀请人就去助力
if
(
Tools
.
globalData
.
inviteId
)
{
sendTbNet
(
TbNetName
.
doHelp
,
{
inviteId
:
Tools
.
globalData
.
inviteId
},
(
success
,
res
)
=>
{
if
(
success
)
Tools
.
globalData
.
inviteId
=
null
;
},
true
);
}
}
);
}
...
...
@@ -161,7 +170,7 @@ export class StartTargetItem extends Container {
// 变大的动效
public
playEffect
()
{
Tween
.
get
(
this
)
.
set
({
scaleX
:
0
,
scaleY
:
0
})
.
to
({
scaleX
:
1
,
scaleY
:
1
},
500
,
Ease
.
backOut
)
.
set
({
scaleX
:
0
,
scaleY
:
0
})
.
to
({
scaleX
:
1
,
scaleY
:
1
},
500
,
Ease
.
backOut
)
}
}
src/panels/TaskPanel.ts
View file @
6e4e6a56
...
...
@@ -96,7 +96,7 @@ export class TaskPanel extends Panel {
this
.
isShowing
=
true
;
this
.
y
=
layers
.
stageHeight
+
this
.
height
;
Tween
.
get
(
this
)
.
to
({
y
:
0
},
500
,
Ease
.
quartOut
)
.
to
({
y
:
0
},
500
,
Ease
.
quartOut
)
.
call
(()
=>
{
this
.
isShowing
=
false
;
});
...
...
@@ -125,6 +125,17 @@ export class TaskPanel extends Panel {
if
(
!
success
)
return
;
console
.
log
(
res
);
for
(
let
i
=
res
.
data
.
taskList
.
length
-
1
;
i
>=
0
;
i
--
)
{
const
v
=
res
.
data
.
taskList
[
i
];
if
((
v
.
taskType
==
TaskType
.
member
||
v
.
taskType
==
TaskType
.
follow
)
&&
v
.
todayCompleteTimes
>=
v
.
totalTimes
&&
v
.
waitReceiveTimes
<=
0
)
{
res
.
data
.
taskList
.
splice
(
i
,
1
);
}
}
console
.
log
(
res
.
data
.
taskList
);
// this.scroll.view.children.length = 0;
this
.
scroll
.
updateData
(
res
.
data
.
taskList
,
true
);
}
...
...
@@ -234,11 +245,12 @@ class TaskItem extends Item {
private
clickGet
()
{
this
.
getBtn
.
mouseEnable
=
false
;
sendTbNet
(
TbNetName
.
receiveTaskRewards
,
{
taskType
:
this
.
data
.
taskType
},
sendTbNet
(
TbNetName
.
receiveTaskRewards
,
{
taskType
:
this
.
data
.
taskType
},
(
success
,
res
)
=>
{
this
.
getBtn
.
mouseEnable
=
true
;
if
(
!
success
)
return
;
showToast
(
`任务完成,体力值+
${
res
.
data
.
power
}
!`
);
GDispatcher
.
dispatchEvent
(
G_EVENT
.
UPDATE_TASK
);
}
);
}
...
...
@@ -246,7 +258,7 @@ class TaskItem extends Item {
private
clickTask
()
{
switch
(
this
.
data
.
taskType
)
{
case
TaskType
.
member
:
sendTbNet
(
TbNetName
.
navigateToOutside
,
{
url
:
this
.
data
.
beMemberUrl
});
sendTbNet
(
TbNetName
.
navigateToOutside
,
{
url
:
this
.
data
.
beMemberUrl
});
break
;
case
TaskType
.
browserGoods
:
/// TODO 去浏览页
...
...
@@ -256,14 +268,14 @@ class TaskItem extends Item {
sendTbNet
(
TbNetName
.
favorShop
,
{},
(
fs
,
fr
)
=>
{
if
(
!
fs
)
return
;
sendTbNet
(
TbNetName
.
completeTask
,
{
taskType
:
this
.
data
.
taskType
},
sendTbNet
(
TbNetName
.
completeTask
,
{
taskType
:
this
.
data
.
taskType
},
(
cs
,
cr
)
=>
GDispatcher
.
dispatchEvent
(
G_EVENT
.
UPDATE_TASK
)
);
}
);
break
;
case
TaskType
.
invites
:
sendTbNet
(
TbNetName
.
showSharePanel
);
sendTbNet
(
TbNetName
.
showSharePanel
,
{
openId
:
Tools
.
globalData
.
openId
}
);
break
;
case
TaskType
.
orderGoods
:
/// TODO 去下单页
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment