Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MingSnake_241120
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
MingSnake_241120
Commits
e2668588
Commit
e2668588
authored
Dec 25, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
ef38f9b3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
BlessingBagPage.ts
assets/Scripts/Scenes/BlessingBagPage.ts
+18
-0
No files found.
assets/Scripts/Scenes/BlessingBagPage.ts
View file @
e2668588
...
...
@@ -11,6 +11,7 @@ import GetPrize from "db://assets/Scripts/Panels/GetPrize";
import
store
from
"../store/store"
;
import
{
VList
}
from
"../../Test/VList"
;
import
{
_asyncThrottle
}
from
"../Utils/Utils"
;
import
{
unwatchPageVisibility
,
watchPageVisibility
}
from
"../Utils/pageVisibilityNotify"
;
const
{
ccclass
,
property
}
=
_decorator
;
...
...
@@ -149,12 +150,29 @@ export class BlessingBagPage extends Scene {
//赚福袋任务界面
this
.
updateTask
();
watchPageVisibility
(
this
.
pageVisibilityNotify
);
}
protected
onDestroy
()
{
unwatchPageVisibility
(
this
.
pageVisibilityNotify
);
}
pageVisibilityNotify
=
(
visible
:
boolean
)
=>
{
if
(
visible
){
this
.
updateTask
();
}
}
updateTask
=
async
()
=>
{
const
{
success
:
TaskSuccess
,
data
:
TaskData
}
=
await
store
.
getTaskInfo
();
if
(
!
TaskSuccess
)
return
this
.
TaskInfo
=
TaskData
console
.
log
(
TaskData
)
let
item
=
TaskData
.
item
console
.
log
(
item
)
this
.
content
.
removeAllChildren
();
item
.
map
((
item
:
any
,
index
:
any
)
=>
{
const
EarnList
=
instantiate
(
this
.
earn_list
)
...
...
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