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
0009e911
Commit
0009e911
authored
Oct 09, 2020
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
6e4e6a56
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
224 additions
and
202 deletions
+224
-202
data.json
l/data.json
+0
-1
popmartXXL2c.consumerTools.json
mock/miniTb/popmartXXL2c.consumerTools.json
+4
-10
popmartXXL2c.doFollowTask.json
mock/miniTb/popmartXXL2c.doFollowTask.json
+6
-0
popmartXXL2c.getActivityBaseInfoById.json
mock/miniTb/popmartXXL2c.getActivityBaseInfoById.json
+18
-30
popmartXXL2c.getTaskList.json
mock/miniTb/popmartXXL2c.getTaskList.json
+51
-47
output.js
output.js
+51
-42
output.js.map
output.js.map
+1
-1
browseGoods_btn_dis.png
resource/TaskPanel/browseGoods_btn_dis.png
+0
-0
browseGoods_btn_en.png
resource/TaskPanel/browseGoods_btn_en.png
+0
-0
browseGoods_icon.png
resource/TaskPanel/browseGoods_icon.png
+0
-0
res.json
resource/res.json
+1
-1
ResJson.ts
src/ResJson.ts
+5
-5
TaoBaoNet.ts
src/TaoBaoNet.ts
+11
-7
Tools.ts
src/Tools.ts
+33
-20
StartPanelPrize.ts
src/panels/StartPanelPrize.ts
+0
-9
TaskPanel.ts
src/panels/TaskPanel.ts
+25
-22
PlayScene.ts
src/scene/PlayScene.ts
+2
-2
MapScene.ts
src/scene/map/MapScene.ts
+15
-4
MapUI.ts
src/scene/map/MapUI.ts
+1
-1
No files found.
l/data.json
deleted
100644 → 0
View file @
6e4e6a56
This diff is collapsed.
Click to expand it.
mock/miniTb/popmartXXL2c.consumerTools.json
View file @
0009e911
{
"success"
:
true
,
"code"
:
"000000"
,
"message"
:
"success"
,
"data"
:
{
"tools"
:
{
"steps"
:
1
,
"booms"
:
1
,
"hammers"
:
1
}
}
}
"data"
:
true
,
"success"
:
true
,
"message"
:
"成功"
}
\ No newline at end of file
mock/miniTb/popmartXXL2c.doFollowTask.json
0 → 100644
View file @
0009e911
{
"success"
:
true
,
"code"
:
"000000"
,
"message"
:
"成功"
,
"data"
:
{}
}
mock/miniTb/popmartXXL2c.getActivityBaseInfoById.json
View file @
0009e911
{
"code"
:
"000000"
,
"data"
:
{
"openId"
:
"AAFM1op4AMWgvWfIyaTlN0QC"
,
"currentLevel"
:
1
,
"isFirstLogin"
:
false
,
"records"
:
[{
"score"
:
0
,
"level"
:
1
,
"isVisitSuccess"
:
false
,
"stars"
:
0
}],
"loginAddPower"
:
false
,
"rule"
:
"泡泡玛特测试游戏2,内部测试"
,
"updateTime"
:
1601379026121
,
"startTime"
:
1601379209000
,
"power"
:
5
,
"endTime"
:
1661984009000
,
"title"
:
"测试2"
,
"tools"
:
{
"booms"
:
1
,
"hammers"
:
1
,
"steps"
:
1
},
"levelPrize"
:
{
"level50"
:
"https://img.alicdn.com/imgextra/i3/2885348004/O1CN014VE1Sa28zsjd1q8HN_!!2885348004-0-miniprogram.jpg"
,
"level120"
:
"https://img.alicdn.com/imgextra/i2/2885348004/O1CN01pfU3oP28zsjiRN9vs_!!2885348004-0-miniprogram.jpg"
,
"level100"
:
"https://img.alicdn.com/imgextra/i4/2885348004/O1CN01kZN23Z28zsjkH7Ej6_!!2885348004-0-miniprogram.jpg"
},
"createTime"
:
1601379026121
,
"deleteStatus"
:
1
,
"awardReceiveExpiredTime"
:
1602243209000
,
"startTime"
:
1601379209000
,
"_id"
:
"5f731ad1086e65a41b09fe22"
,
"endTime"
:
1661984009000
,
"openPrizeStatus"
:
1
,
"tasks"
:
{
"browseGoods"
:
{
"times"
:
3
,
"itemIds"
:
"619104333650,613930168360,626877183520"
,
"link"
:
""
,
"taskRateType"
:
1
,
"title"
:
""
,
"type"
:
""
,
"value"
:
""
},
"orderGoods"
:
{
"times"
:
3
,
"itemIds"
:
"623157072617,623772356959,619368430053"
,
"link"
:
""
,
"taskRateType"
:
1
,
"title"
:
""
,
"type"
:
""
,
"value"
:
""
}
}
},
"success"
:
true
,
"message"
:
"成功"
}
}
\ No newline at end of file
mock/miniTb/popmartXXL2c.getTaskList.json
View file @
0009e911
{
"code"
:
"000000"
,
"data"
:
[{
"taskType"
:
"member"
,
"waitReceive"
:
0
,
"taskRateType"
:
1
,
"title"
:
"加入店铺会员"
,
"url"
:
"https://market.m.taobao.com/app/sj/member-center-rax/pages/pages_index_index?wh_weex=true&sellerId=2885348004&extraInfo=%7B%22source%22%3A%22isvapp%22%2C%22entrance%22%3A%22duiba%22%7D&callbackUrl=%E5%AE%A2%E6%88%B7%E7%AB%AF%E7%94%9F%E6%88%90%E7%9A%84%E9%A2%84%E8%A7%88%E5%9C%B0%E5%9D%80%28C%E7%AB%AF%E5%AE%A2%E6%88%B7%E7%AB%AF%E5%BC%80%E5%8F%91%E6%8F%90%E4%BE%9B%29%26query%3DactivityId%253D5f731ad1086e65a41b09fe22%2526inviteId%253D"
,
"rewards"
:
1
,
"status"
:
1
},
{
"taskType"
:
"follow"
,
"waitReceive"
:
0
,
"taskRateType"
:
1
,
"completeTimes"
:
9
,
"title"
:
"关注店铺"
,
"rewards"
:
1
,
"status"
:
3
},
{
"taskType"
:
"orderGoods"
,
"times"
:
5
,
"todayCompleteTimes"
:
0
,
"itemIds"
:
"623157072617,623772356959,619368430053"
,
"waitReceive"
:
0
,
"taskRateType"
:
2
,
"completeTimes"
:
0
,
"title"
:
"进行一笔订单消费"
,
"rewards"
:
5
,
"status"
:
1
},
{
"taskType"
:
"browseGoods"
,
"times"
:
2
,
"todayCompleteTimes"
:
0
,
"itemIds"
:
"619104333650,613930168360,626877183520"
,
"taskRateType"
:
2
,
"completeTimes"
:
0
,
"title"
:
"每日浏览商品"
,
"rewards"
:
1
,
"status"
:
1
},
{
"taskType"
:
"invites"
,
"times"
:
5
,
"todayCompleteTimes"
:
1
,
"waitReceive"
:
0
,
"taskRateType"
:
2
,
"completeTimes"
:
1
,
"title"
:
"邀请好友参与活动"
,
"rewards"
:
2
,
"status"
:
1
}],
"success"
:
true
,
"code"
:
"consectetur ex dolore id commodo"
,
"message"
:
"aliqua sint commodo"
,
"data"
:
{
"taskList"
:
[
{
"taskType"
:
"browserGoods"
,
"beMemberUrl"
:
"https://www.baidu.com"
,
"rewards"
:
10
,
"todayCompleteTimes"
:
2
,
"totalTimes"
:
5
,
"waitReceiveTimes"
:
10
},
{
"taskType"
:
"invites"
,
"beMemberUrl"
:
"https://www.baidu.com"
,
"rewards"
:
10
,
"todayCompleteTimes"
:
2
,
"totalTimes"
:
2
,
"waitReceiveTimes"
:
0
},
{
"taskType"
:
"orderGoods"
,
"beMemberUrl"
:
"https://www.baidu.com"
,
"rewards"
:
10
,
"todayCompleteTimes"
:
2
,
"totalTimes"
:
5
,
"waitReceiveTimes"
:
10
},
{
"taskType"
:
"follow"
,
"beMemberUrl"
:
"https://www.baidu.com"
,
"rewards"
:
10
,
"todayCompleteTimes"
:
1
,
"totalTimes"
:
1
,
"waitReceiveTimes"
:
0
},
{
"taskType"
:
"member"
,
"beMemberUrl"
:
"https://www.baidu.com"
,
"rewards"
:
10
,
"todayCompleteTimes"
:
1
,
"totalTimes"
:
1
,
"waitReceiveTimes"
:
0
}
]
}
}
"message"
:
"成功"
}
\ No newline at end of file
output.js
View file @
0009e911
This diff is collapsed.
Click to expand it.
output.js.map
View file @
0009e911
This diff is collapsed.
Click to expand it.
resource/TaskPanel/browse
r
Goods_btn_dis.png
→
resource/TaskPanel/browseGoods_btn_dis.png
View file @
0009e911
File moved
resource/TaskPanel/browse
r
Goods_btn_en.png
→
resource/TaskPanel/browseGoods_btn_en.png
View file @
0009e911
File moved
resource/TaskPanel/browse
r
Goods_icon.png
→
resource/TaskPanel/browseGoods_icon.png
View file @
0009e911
File moved
resource/res.json
View file @
0009e911
...
...
@@ -37,7 +37,7 @@
"name"
:
"SuccessPanel"
},
{
"keys"
:
"browse
rGoods_btn_dis.png,browserGoods_btn_en.png,browser
Goods_icon.png,follow_btn_dis.png,follow_btn_en.png,follow_icon.png,invites_btn_dis.png,invites_btn_en.png,invites_icon.png,member_btn_dis.png,member_btn_en.png,member_icon.png,orderGoods_btn_dis.png,orderGoods_btn_en.png,orderGoods_icon.png,task_get_btn.png,task_item_bg.png,任务背景.png,去完成.png,去完成灰.png"
,
"keys"
:
"browse
Goods_btn_dis.png,browseGoods_btn_en.png,browse
Goods_icon.png,follow_btn_dis.png,follow_btn_en.png,follow_icon.png,invites_btn_dis.png,invites_btn_en.png,invites_icon.png,member_btn_dis.png,member_btn_en.png,member_icon.png,orderGoods_btn_dis.png,orderGoods_btn_en.png,orderGoods_icon.png,task_get_btn.png,task_item_bg.png,任务背景.png,去完成.png,去完成灰.png"
,
"name"
:
"TaskPanel"
},
{
...
...
src/ResJson.ts
View file @
0009e911
...
...
@@ -1243,10 +1243,10 @@ export const ResJson = {
}
},
{
"keys"
:
"browse
rGoods_btn_dis.png,browserGoods_btn_en.png,browser
Goods_icon.png,follow_btn_dis.png,follow_btn_en.png,follow_icon.png,invites_btn_dis.png,invites_btn_en.png,invites_icon.png,member_btn_dis.png,member_btn_en.png,member_icon.png,orderGoods_btn_dis.png,orderGoods_btn_en.png,orderGoods_icon.png,task_get_btn.png,task_item_bg.png,任务背景.png,去完成.png,去完成灰.png"
,
"keys"
:
"browse
Goods_btn_dis.png,browseGoods_btn_en.png,browse
Goods_icon.png,follow_btn_dis.png,follow_btn_en.png,follow_icon.png,invites_btn_dis.png,invites_btn_en.png,invites_icon.png,member_btn_dis.png,member_btn_en.png,member_icon.png,orderGoods_btn_dis.png,orderGoods_btn_en.png,orderGoods_icon.png,task_get_btn.png,task_item_bg.png,任务背景.png,去完成.png,去完成灰.png"
,
"name"
:
"TaskPanel"
,
"atlas"
:
{
"browse
r
Goods_btn_dis.png"
:
{
"browseGoods_btn_dis.png"
:
{
"x"
:
2
,
"y"
:
248
,
"w"
:
183
,
...
...
@@ -1257,7 +1257,7 @@ export const ResJson = {
"sh"
:
80
,
"ro"
:
false
},
"browse
r
Goods_btn_en.png"
:
{
"browseGoods_btn_en.png"
:
{
"x"
:
557
,
"y"
:
166
,
"w"
:
183
,
...
...
@@ -1268,7 +1268,7 @@ export const ResJson = {
"sh"
:
80
,
"ro"
:
false
},
"browse
r
Goods_icon.png"
:
{
"browseGoods_icon.png"
:
{
"x"
:
595
,
"y"
:
248
,
"w"
:
100
,
...
...
@@ -10508,5 +10508,5 @@ export const ResJson = {
}
}
],
"path"
:
"https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/16022
1209
4/resource/"
"path"
:
"https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/16022
2310
4/resource/"
}
\ No newline at end of file
src/TaoBaoNet.ts
View file @
0009e911
...
...
@@ -14,6 +14,7 @@ export enum TbNetName {
receiveEnamePrize
=
"popmartXXL2c.receiveEnamePrize"
,
drawLotteryPrize
=
'popmartXXL2c.drawLotteryPrize'
,
getToolsInfo
=
'popmartXXL2c.getToolsInfo'
,
// inviteId
doHelp
=
'popmartXXL2c.doHelp'
,
...
...
@@ -51,6 +52,7 @@ export enum TbNetName {
* activityId taskType
*/
completeTask
=
"popmartXXL2c.completeTask"
,
doFollowTask
=
"popmartXXL2c.doFollowTask"
,
/**
* 任务列表
* activityId
...
...
@@ -197,13 +199,7 @@ export function sendTbNet(
GDispatcher
.
removeEventListener
(
netName
,
fun
);
var
d
=
e
.
data
;
//记录数据
dataRecord
[
netName
]
=
d
;
//统一错误信息提示,d.data为了区分网络超时
if
(
!
hideMsg
&&
!
d
.
success
)
showToast
(
d
.
message
||
"网络超时"
)
//执行回调
callback
&&
callback
(
d
.
success
,
d
);
resolve
(
d
)
console
.
log
(
`\n%c[ request ]\n`
+
`NAME :
${
netName
}
\n`
...
...
@@ -216,6 +212,14 @@ export function sendTbNet(
,
`
${
d
.
success
?
'color:green'
:
'color:red'
}
`
,
d
);
//记录数据
dataRecord
[
netName
]
=
d
;
//统一错误信息提示,d.data为了区分网络超时
if
(
!
hideMsg
&&
!
d
.
success
)
showToast
(
d
.
message
||
"网络超时"
)
//执行回调
callback
&&
callback
(
d
.
success
,
d
);
resolve
(
d
);
}
//添加事件接收接口返回信息
GDispatcher
.
addEventListener
(
netName
,
fun
);
...
...
src/Tools.ts
View file @
0009e911
...
...
@@ -34,7 +34,7 @@ export class Tools {
}
public
static
async
getAppData
()
{
const
{
data
}
=
await
sendTbNet
(
TbNetName
.
getAppData
);
const
{
data
}
=
await
sendTbNet
(
TbNetName
.
getAppData
);
Tools
.
globalData
=
data
;
}
...
...
@@ -44,11 +44,19 @@ export class Tools {
booms
:
number
,
power
:
number
,
}
=
{
hammers
:
0
,
steps
:
0
,
booms
:
0
,
power
:
0
,
}
hammers
:
0
,
steps
:
0
,
booms
:
0
,
power
:
0
,
}
// public getPower() {
// sendTbNet(TbNetName.getPower, {},
// (success, res) => {
// });
// }
public
static
baseInfo
:
{
inviteFriends
:
any
,
...
...
@@ -69,9 +77,8 @@ export class Tools {
level100
:
string
,
level120
:
string
},
loginAddPower
:
boolean
,
isF
ri
stLogin
:
boolean
,
//是否是首次
isF
ir
stLogin
:
boolean
,
//是否是首次
};
// 活动基本信息
public
static
getBaseInfo
()
{
...
...
@@ -97,12 +104,18 @@ export class Tools {
*/
public
static
consumerTools
(
type
:
PropType
):
Promise
<
boolean
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
sendTbNet
(
TbNetName
.
consumerTools
,
{
type
},
(
s
,
res
)
=>
{
sendTbNet
(
TbNetName
.
consumerTools
,
{
type
},
(
s
,
res
)
=>
{
if
(
s
)
{
//修改道具数量
this
.
propInfo
.
booms
=
res
.
data
.
tools
.
booms
;
this
.
propInfo
.
steps
=
res
.
data
.
tools
.
steps
;
this
.
propInfo
.
hammers
=
res
.
data
.
tools
.
hammers
;
this
.
propInfo
[
type
]
-=
1
;
sendTbNet
(
TbNetName
.
getToolsInfo
,
{},
(
st
,
rt
)
=>
{
if
(
!
st
)
return
;
this
.
propInfo
.
booms
=
+
res
.
data
.
tools
.
booms
;
this
.
propInfo
.
steps
=
+
res
.
data
.
tools
.
steps
;
this
.
propInfo
.
hammers
=
+
res
.
data
.
tools
.
hammers
;
}
);
resolve
(
true
)
}
else
{
// reject()
...
...
@@ -133,11 +146,11 @@ export class Tools {
var
tbMy
=
my
if
(
!
tbMy
)
return
;
//@ts-ignore
const
{
cloud
}
=
getApp
();
const
{
cloud
}
=
getApp
();
//测试地址//到时云存储传一个小json,,改路径
var
url
=
"cloud://B4F0300E5148F478B506DEDC26EA4C6C//butterfly0.svga"
;
//获取临时地址
var
urls
=
await
cloud
.
file
.
getTempFileURL
({
fileId
:
[
url
]
})
var
urls
=
await
cloud
.
file
.
getTempFileURL
({
fileId
:
[
url
]
})
url
=
urls
[
0
].
url
.
replace
(
'-internal'
,
''
);
tbMy
.
downloadFile
({
url
:
url
,
...
...
@@ -146,10 +159,10 @@ export class Tools {
tbMy
.
getFileSystemManager
().
readFile
({
filePath
:
i
,
// encoding: "utf8",
success
:
function
(
r
)
{
success
:
function
(
r
)
{
},
fail
:
function
(
res
)
{
fail
:
function
(
res
)
{
}
})
...
...
@@ -293,11 +306,11 @@ export class Tools {
showTime
:
number
=
300
)
{
Tween
.
get
(
target
)
.
set
({
alpha
:
0
,
visible
:
true
})
.
to
({
alpha
:
1
},
showTime
,
Ease
.
quadIn
)
.
set
({
alpha
:
0
,
visible
:
true
})
.
to
({
alpha
:
1
},
showTime
,
Ease
.
quadIn
)
.
wait
(
time
)
.
to
({
alpha
:
0
},
showTime
,
Ease
.
quadOut
)
.
set
({
alpha
:
0
,
visible
:
false
})
.
to
({
alpha
:
0
},
showTime
,
Ease
.
quadOut
)
.
set
({
alpha
:
0
,
visible
:
false
})
.
call
(()
=>
{
call
();
});
...
...
src/panels/StartPanelPrize.ts
View file @
0009e911
...
...
@@ -94,15 +94,6 @@ 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
);
}
}
);
}
...
...
src/panels/TaskPanel.ts
View file @
0009e911
...
...
@@ -6,7 +6,7 @@ import Ease = FYGE.Ease;
import
Button
=
FYGE
.
Button
;
import
{
GDispatcher
}
from
"../Main"
;
import
{
G_EVENT
}
from
"../common/G_EVENT"
;
import
{
showWaiting
,
hideWaiting
,
showToast
}
from
"../../module/ctrls"
;
import
{
showWaiting
,
hideWaiting
,
showToast
,
getCurrentScene
}
from
"../../module/ctrls"
;
import
Container
=
FYGE
.
Container
;
import
{
Item
}
from
"../../module/views/Item"
;
import
{
Tools
}
from
"../Tools"
;
...
...
@@ -16,13 +16,13 @@ import TextField = FYGE.TextField;
import
{
RES
}
from
"../../module/RES"
;
import
MouseEvent
=
FYGE
.
MouseEvent
;
// 任务类型(invites 、member、follow、browse
r
Goods、orderGoods)
// 任务类型(invites 、member、follow、browseGoods、orderGoods)
export
enum
TaskType
{
member
=
"member"
,
follow
=
"follow"
,
invites
=
"invites"
,
orderGoods
=
"orderGoods"
,
browse
rGoods
=
"browser
Goods"
,
browse
Goods
=
"browse
Goods"
,
}
interface
TaskData
{
...
...
@@ -73,8 +73,8 @@ const taskItemData = {
title
:
'完成下单'
,
desc
:
'按成下单即可获得${rewards}体力'
},
[
TaskType
.
browse
r
Goods
]:
{
key
:
TaskType
.
browse
r
Goods
,
[
TaskType
.
browseGoods
]:
{
key
:
TaskType
.
browseGoods
,
title
:
'每日浏览商品(${done}/${total})'
,
desc
:
'浏览指定商品即可获得${rewards}体力'
},
...
...
@@ -125,18 +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
];
for
(
let
i
=
res
.
data
.
length
-
1
;
i
>=
0
;
i
--
)
{
const
v
=
res
.
data
[
i
];
if
((
v
.
taskType
==
TaskType
.
member
||
v
.
taskType
==
TaskType
.
follow
)
&&
v
.
todayCompleteTimes
>=
v
.
totalTimes
&&
v
.
waitReceiveTimes
<=
0
)
{
res
.
data
.
taskList
.
splice
(
i
,
1
);
&&
v
.
status
==
3
)
{
res
.
data
.
splice
(
i
,
1
);
}
}
console
.
log
(
res
.
data
.
taskList
);
console
.
log
(
res
.
data
);
// this.scroll.view.children.length = 0;
this
.
scroll
.
updateData
(
res
.
data
.
taskList
,
true
);
this
.
scroll
.
updateData
(
res
.
data
,
true
);
}
);
...
...
@@ -210,15 +209,17 @@ class TaskItem extends Item {
const
{
rewards
,
taskType
,
total
Times
,
waitReceive
Times
,
complete
Times
,
waitReceive
,
todayCompleteTimes
,
times
,
status
,
}
=
data
;
this
.
icon
.
texture
=
RES
.
getRes
(
`
${
taskType
}
_icon.png`
);
this
.
title
.
text
=
taskItemData
[
taskType
].
title
.
replace
(
'${done}'
,
todayCompleteTimes
)
.
replace
(
'${total}'
,
t
otalT
imes
);
.
replace
(
'${total}'
,
times
);
this
.
desc
.
text
=
taskItemData
[
taskType
].
desc
.
replace
(
'${rewards}'
,
rewards
);
...
...
@@ -228,14 +229,14 @@ class TaskItem extends Item {
RES
.
getRes
(
`
${
taskType
}
_btn_dis.png`
)
);
if
(
+
waitReceiveTimes
>
0
)
{
if
(
+
status
==
2
)
{
this
.
getBtn
.
visible
=
true
;
this
.
taskBtn
.
visible
=
false
;
}
else
if
(
+
todayCompleteTimes
>=
+
totalTimes
)
{
}
else
if
(
+
status
==
3
)
{
this
.
getBtn
.
visible
=
false
;
this
.
taskBtn
.
visible
=
true
;
this
.
taskBtn
.
enabled
=
false
;
}
else
{
}
else
if
(
+
status
==
1
)
{
this
.
getBtn
.
visible
=
false
;
this
.
taskBtn
.
visible
=
true
;
this
.
taskBtn
.
enabled
=
true
;
...
...
@@ -250,6 +251,8 @@ class TaskItem extends Item {
this
.
getBtn
.
mouseEnable
=
true
;
if
(
!
success
)
return
;
showToast
(
`任务完成,体力值+
${
res
.
data
.
power
}
!`
);
Tools
.
propInfo
.
power
+=
res
.
data
.
power
;
getCurrentScene
().
updateScene
();
GDispatcher
.
dispatchEvent
(
G_EVENT
.
UPDATE_TASK
);
}
);
...
...
@@ -258,9 +261,9 @@ class TaskItem extends Item {
private
clickTask
()
{
switch
(
this
.
data
.
taskType
)
{
case
TaskType
.
member
:
sendTbNet
(
TbNetName
.
navigateToOutside
,
{
url
:
this
.
data
.
beMemberU
rl
});
sendTbNet
(
TbNetName
.
navigateToOutside
,
{
url
:
this
.
data
.
u
rl
});
break
;
case
TaskType
.
browse
r
Goods
:
case
TaskType
.
browseGoods
:
/// TODO 去浏览页
console
.
log
(
'去浏览页'
);
break
;
...
...
@@ -268,7 +271,7 @@ class TaskItem extends Item {
sendTbNet
(
TbNetName
.
favorShop
,
{},
(
fs
,
fr
)
=>
{
if
(
!
fs
)
return
;
sendTbNet
(
TbNetName
.
complete
Task
,
{
taskType
:
this
.
data
.
taskType
},
sendTbNet
(
TbNetName
.
doFollow
Task
,
{
taskType
:
this
.
data
.
taskType
},
(
cs
,
cr
)
=>
GDispatcher
.
dispatchEvent
(
G_EVENT
.
UPDATE_TASK
)
);
}
...
...
src/scene/PlayScene.ts
View file @
0009e911
...
...
@@ -323,10 +323,10 @@ export class PlayScene extends Scene {
}
else
{
this
.
enableMouseEvt
(
true
);
//首次送道具,的动画先出,然后再出引导
if
(
this
.
chapter
==
1
&&
Tools
.
baseInfo
.
isF
ri
stLogin
)
{
if
(
this
.
chapter
==
1
&&
Tools
.
baseInfo
.
isF
ir
stLogin
)
{
this
.
addChild
(
new
FirstPropGift
())
.
once
(
FYGE
.
MouseEvent
.
CLICK
,
(
e
:
FYGE
.
MouseEvent
)
=>
{
Tools
.
baseInfo
.
isF
ri
stLogin
=
false
;
Tools
.
baseInfo
.
isF
ir
stLogin
=
false
;
//移除自己
this
.
removeChild
(
e
.
target
)
//游戏引导
...
...
src/scene/map/MapScene.ts
View file @
0009e911
...
...
@@ -13,8 +13,9 @@ import Sprite = FYGE.Sprite;
import
Texture
=
FYGE
.
Texture
;
import
Tween
=
FYGE
.
Tween
;
import
Ease
=
FYGE
.
Ease
;
import
{
showPanel
}
from
"../../../module/ctrls"
;
import
{
showPanel
,
showToast
}
from
"../../../module/ctrls"
;
import
{
FreePowerPanel
}
from
"../../panels/FreePowerPanel"
;
import
{
sendTbNet
,
TbNetName
}
from
"../../TaoBaoNet"
;
export
class
MapScene
extends
Scene
{
private
mapContainer
:
Container
=
null
;
...
...
@@ -48,7 +49,7 @@ export class MapScene extends Scene {
this
.
initMap
();
this
.
updateMapCheck
();
if
(
Tools
.
baseInfo
.
loginAddPower
&&
!
Tools
.
baseInfo
.
isF
ri
stLogin
)
{
if
(
Tools
.
baseInfo
.
loginAddPower
&&
!
Tools
.
baseInfo
.
isF
ir
stLogin
)
{
showPanel
(
FreePowerPanel
);
Tools
.
baseInfo
.
loginAddPower
=
false
;
}
...
...
@@ -59,7 +60,7 @@ export class MapScene extends Scene {
if
(
this
.
data
&&
this
.
data
.
from
==
'loading'
)
{
this
.
uiLayer
=
this
.
addChild
(
new
MapUI
());
this
.
initMapByData
();
if
(
Tools
.
baseInfo
.
isF
ri
stLogin
)
{
if
(
Tools
.
baseInfo
.
isF
ir
stLogin
)
{
this
.
initGuide
();
}
}
else
{
...
...
@@ -74,7 +75,7 @@ export class MapScene extends Scene {
private
initGuide
()
{
//有bug再说
// Tools.gameData.isF
ri
stLogin = false;
// Tools.gameData.isF
ir
stLogin = false;
const
guide
=
this
.
addChild
(
new
Container
());
guide
.
y
=
-
layers
.
stageOffsetY
;
...
...
@@ -238,6 +239,16 @@ export class MapScene extends Scene {
// image: 'https://img.alicdn.com/imgextra/i1/2275046294/O1CN01xTeKMI1wMhRux48Y6_!!2275046294-2-miniprogram.png',
// }
// });
// 如果有邀请人就去助力
if
(
Tools
.
globalData
.
inviteId
)
{
sendTbNet
(
TbNetName
.
doHelp
,
{
inviteId
:
Tools
.
globalData
.
inviteId
},
(
success
,
res
)
=>
{
if
(
success
)
showToast
(
'助力成功'
);
// if (success) Tools.globalData.inviteId = null;
}
);
}
}
public
initEvents
()
{
...
...
src/scene/map/MapUI.ts
View file @
0009e911
...
...
@@ -48,7 +48,7 @@ export default class MapUI extends Container {
console
.
log
(
'我的奖品'
);
sendTbNet
(
TbNetName
.
navigateTo
,
{
url
:
'/pages/myPrize/myP
rize'
},
{
url
:
'/pages/myprize/myp
rize'
},
()
=>
{
},
true
...
...
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