Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NJ_usercenter
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
NJ_usercenter
Commits
34cb16d7
Commit
34cb16d7
authored
Sep 21, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 详情页
parent
3f662a00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
3 deletions
+29
-3
clickEvent.ts
assets/NJ_usercenter/script/clickEvent.ts
+29
-3
No files found.
assets/NJ_usercenter/script/clickEvent.ts
View file @
34cb16d7
...
@@ -65,7 +65,12 @@ export default class NewClass extends cc.Component {
...
@@ -65,7 +65,12 @@ export default class NewClass extends cc.Component {
cc
.
find
(
"
Canvas/learnreport/avatar
"
).
getComponent
(
cc
.
Sprite
).
spriteFrame
=
cc
.
find
(
`Canvas/avatars/
${
this
.
userInfo
.
avatar_url
||
1
}
`
).
getComponent
(
cc
.
Sprite
).
spriteFrame
;
cc
.
find
(
"
Canvas/learnreport/avatar
"
).
getComponent
(
cc
.
Sprite
).
spriteFrame
=
cc
.
find
(
`Canvas/avatars/
${
this
.
userInfo
.
avatar_url
||
1
}
`
).
getComponent
(
cc
.
Sprite
).
spriteFrame
;
await
this
.
loadSyllabusTree
();
await
this
.
loadSyllabusTree
();
await
this
.
drawPage
();
if
(
this
.
reportType
===
'
pdtd
'
)
{
await
this
.
drawPagePdtd
();
}
if
(
this
.
reportType
===
'
ydjyz
'
)
{
await
this
.
drawPageYdjyz
();
}
this
.
hideLoading
();
this
.
hideLoading
();
}
}
...
@@ -82,7 +87,7 @@ export default class NewClass extends cc.Component {
...
@@ -82,7 +87,7 @@ export default class NewClass extends cc.Component {
}
}
}
}
async
drawPage
()
{
async
drawPage
Pdtd
()
{
const
node
=
cc
.
find
(
"
Canvas/learnreport
"
);
const
node
=
cc
.
find
(
"
Canvas/learnreport
"
);
cc
.
find
(
"
typeLabel
"
,
node
).
getComponent
(
cc
.
Label
).
string
=
this
.
reportObj
[
this
.
reportType
];
cc
.
find
(
"
typeLabel
"
,
node
).
getComponent
(
cc
.
Label
).
string
=
this
.
reportObj
[
this
.
reportType
];
...
@@ -101,6 +106,18 @@ export default class NewClass extends cc.Component {
...
@@ -101,6 +106,18 @@ export default class NewClass extends cc.Component {
await
this
.
drawPageItems
(
0
);
await
this
.
drawPageItems
(
0
);
}
}
async
drawPageYdjyz
()
{
const
node
=
cc
.
find
(
"
Canvas/learnreport
"
);
cc
.
find
(
"
typeLabel
"
,
node
).
getComponent
(
cc
.
Label
).
string
=
this
.
reportObj
[
this
.
reportType
];
// 设置每个级别激活状态(是否显示锁头)
for
(
let
i
=
1
;
i
<
5
;
i
++
)
{
cc
.
find
(
`level
${
i
+
1
}
/lock_1`
,
node
).
active
=
false
;
}
// 激活索引为0的Level
await
this
.
drawPageItems
(
0
);
}
clearnContent
()
{
clearnContent
()
{
const
node
=
cc
.
find
(
"
Canvas/learnreport
"
);
const
node
=
cc
.
find
(
"
Canvas/learnreport
"
);
const
contentNode
=
cc
.
find
(
"
cardArea/pages/view/content
"
,
node
);
const
contentNode
=
cc
.
find
(
"
cardArea/pages/view/content
"
,
node
);
...
@@ -119,7 +136,16 @@ export default class NewClass extends cc.Component {
...
@@ -119,7 +136,16 @@ export default class NewClass extends cc.Component {
rows
=
await
this
.
loadData
(
levels
[
this
.
reportType
][
index
].
id
);
rows
=
await
this
.
loadData
(
levels
[
this
.
reportType
][
index
].
id
);
rows
=
rows
.
filter
(
item
=>
item
.
name
.
trim
()
!==
'
more games
'
);
rows
=
rows
.
filter
(
item
=>
item
.
name
.
trim
()
!==
'
more games
'
);
}
}
const
unLocks
=
this
.
getUnlockSyllabuses
();
let
unLocks
=
[];
if
(
this
.
reportType
===
'
pdtd
'
)
{
unLocks
=
this
.
getUnlockSyllabuses
();
}
if
(
this
.
reportType
===
'
ydjyz
'
)
{
// 全都解锁(没有解锁逻辑)
unLocks
=
rows
.
map
(
item
=>
item
.
id
);
}
const
contentNode
=
cc
.
find
(
"
cardArea/pages/view/content
"
,
node
);
const
contentNode
=
cc
.
find
(
"
cardArea/pages/view/content
"
,
node
);
const
item
=
cc
.
find
(
"
Canvas/learnreport/cardArea/pages/view/content/item
"
);
const
item
=
cc
.
find
(
"
Canvas/learnreport/cardArea/pages/view/content/item
"
);
...
...
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