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
28e00509
Commit
28e00509
authored
May 23, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:播放帧动画
parent
1c352eae
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1015 additions
and
819 deletions
+1015
-819
NJ_usercenter.fire
assets/NJ_usercenter/scene/NJ_usercenter.fire
+772
-817
clickEvent.ts
assets/NJ_usercenter/script/clickEvent.ts
+51
-2
play1.png
assets/NJ_usercenter/textures/learndetail/play1.png
+0
-0
play1.png.meta
assets/NJ_usercenter/textures/learndetail/play1.png.meta
+36
-0
play2.png
assets/NJ_usercenter/textures/learndetail/play2.png
+0
-0
play2.png.meta
assets/NJ_usercenter/textures/learndetail/play2.png.meta
+36
-0
play3.png
assets/NJ_usercenter/textures/learndetail/play3.png
+0
-0
play3.png.meta
assets/NJ_usercenter/textures/learndetail/play3.png.meta
+36
-0
play_icon.png
assets/NJ_usercenter/textures/learndetail/play_icon.png
+0
-0
play_icon.png.meta
assets/NJ_usercenter/textures/learndetail/play_icon.png.meta
+36
-0
play1.anim
assets/play1.anim
+43
-0
play1.anim.meta
assets/play1.anim.meta
+5
-0
No files found.
assets/NJ_usercenter/scene/NJ_usercenter.fire
View file @
28e00509
This diff is collapsed.
Click to expand it.
assets/NJ_usercenter/script/clickEvent.ts
View file @
28e00509
...
@@ -136,6 +136,31 @@ export default class NewClass extends cc.Component {
...
@@ -136,6 +136,31 @@ export default class NewClass extends cc.Component {
await
this
.
drawPageItems
(
parseInt
(
index
));
await
this
.
drawPageItems
(
parseInt
(
index
));
}
}
clearnDetailItem
()
{
const
node
=
cc
.
find
(
"
Canvas/reportdetail
"
);
const
contentNode
=
cc
.
find
(
"
view/content/userdetail_scollpage/learnresult/itembg
"
,
node
);
// 清理原来的数据
// 字母
const
letterRow
=
cc
.
find
(
"
letter_row
"
,
contentNode
);
const
letterItem
=
cc
.
find
(
"
item
"
,
letterRow
);
letterItem
.
parent
=
node
;
letterRow
.
removeAllChildren
();
letterItem
.
parent
=
letterRow
;
// 单词
const
wordRow
=
cc
.
find
(
"
word_row
"
,
contentNode
);
const
wordItem
=
cc
.
find
(
"
item
"
,
wordRow
);
wordItem
.
parent
=
node
;
wordRow
.
removeAllChildren
();
wordItem
.
parent
=
wordRow
;
// 句子
const
sentenceRow
=
cc
.
find
(
"
sentence_row
"
,
contentNode
);
const
sentenceItem
=
cc
.
find
(
"
item
"
,
sentenceRow
);
sentenceItem
.
parent
=
node
;
sentenceRow
.
removeAllChildren
();
sentenceItem
.
parent
=
sentenceRow
;
}
async
onShowLearnDetail
(
evt
:
cc
.
Event
)
{
async
onShowLearnDetail
(
evt
:
cc
.
Event
)
{
const
node
=
evt
.
currentTarget
;
const
node
=
evt
.
currentTarget
;
if
(
node
.
locked
)
{
if
(
node
.
locked
)
{
...
@@ -143,8 +168,11 @@ export default class NewClass extends cc.Component {
...
@@ -143,8 +168,11 @@ export default class NewClass extends cc.Component {
return
;
return
;
}
}
cc
.
find
(
"
Canvas/learnreport
"
).
active
=
false
;
// 清除之前渲染的列表
this
.
clearnDetailItem
();
cc
.
find
(
"
Canvas/reportdetail
"
).
active
=
true
;
cc
.
find
(
"
Canvas/reportdetail
"
).
active
=
true
;
cc
.
find
(
"
Canvas/learnreport
"
).
active
=
false
;
const
token
=
cc
.
sys
.
localStorage
.
getItem
(
"
token
"
);
const
token
=
cc
.
sys
.
localStorage
.
getItem
(
"
token
"
);
const
res
:
any
=
await
asyncCallNetworkApiGet
(
"
/api/oxford/v1/kid/learn/forder/report
"
,
{
kidid
:
node
.
kidid
,
folderid
:
node
.
folder_id
,
token
});
const
res
:
any
=
await
asyncCallNetworkApiGet
(
"
/api/oxford/v1/kid/learn/forder/report
"
,
{
kidid
:
node
.
kidid
,
folderid
:
node
.
folder_id
,
token
});
...
@@ -231,10 +259,25 @@ export default class NewClass extends cc.Component {
...
@@ -231,10 +259,25 @@ export default class NewClass extends cc.Component {
cc
.
find
(
"
sentence_row
"
,
resultNode
).
active
=
false
;
cc
.
find
(
"
sentence_row
"
,
resultNode
).
active
=
false
;
cc
.
find
(
"
split_line
"
,
resultNode
).
active
=
false
;
cc
.
find
(
"
split_line
"
,
resultNode
).
active
=
false
;
}
}
}
}
// 播放录音
async
onPlayRecordAudio
(
evt
:
cc
.
Event
)
{
const
node
=
evt
.
currentTarget
;
if
(
!
node
.
audio_url
)
{
// TODO 弹出提示框“没有录音”
return
;
}
const
playNode
=
cc
.
find
(
"
play
"
,
node
.
parent
);
playNode
.
active
=
true
;
const
animationState
=
playNode
.
getComponent
(
cc
.
Animation
).
getAnimationState
(
"
play1
"
);
animationState
.
wrapMode
=
cc
.
WrapMode
.
Loop
;
animationState
.
play
();
}
// 返回用户中心
// 返回用户中心
async
onClickBackToUserCenter
()
{
async
onClickBackToUserCenter
()
{
...
@@ -244,4 +287,10 @@ export default class NewClass extends cc.Component {
...
@@ -244,4 +287,10 @@ export default class NewClass extends cc.Component {
cc
.
find
(
"
Canvas/learnreport
"
).
active
=
false
;
cc
.
find
(
"
Canvas/learnreport
"
).
active
=
false
;
}
}
// 返回报告列表
async
onClickBackToReportPage
()
{
cc
.
find
(
"
Canvas/learnreport
"
).
active
=
true
;
cc
.
find
(
"
Canvas/reportdetail
"
).
active
=
false
;
}
}
}
assets/NJ_usercenter/textures/learndetail/play1.png
0 → 100644
View file @
28e00509
4.48 KB
assets/NJ_usercenter/textures/learndetail/play1.png.meta
0 → 100644
View file @
28e00509
{
"ver": "2.3.5",
"uuid": "7b3832de-78fe-4ef4-a0ab-6e9774b8271c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 102,
"height": 39,
"platformSettings": {},
"subMetas": {
"play1": {
"ver": "1.0.4",
"uuid": "701fdca4-143c-4e5a-8b4e-eafcf2c8e9bd",
"rawTextureUuid": "7b3832de-78fe-4ef4-a0ab-6e9774b8271c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 102,
"height": 39,
"rawWidth": 102,
"rawHeight": 39,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/NJ_usercenter/textures/learndetail/play2.png
0 → 100644
View file @
28e00509
4.75 KB
assets/NJ_usercenter/textures/learndetail/play2.png.meta
0 → 100644
View file @
28e00509
{
"ver": "2.3.5",
"uuid": "5ce590e3-075c-4531-b09c-4bd13102fce6",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 102,
"height": 39,
"platformSettings": {},
"subMetas": {
"play2": {
"ver": "1.0.4",
"uuid": "4a7f44f8-6994-4585-8d93-bdb4a4d96e33",
"rawTextureUuid": "5ce590e3-075c-4531-b09c-4bd13102fce6",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 102,
"height": 39,
"rawWidth": 102,
"rawHeight": 39,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/NJ_usercenter/textures/learndetail/play3.png
0 → 100644
View file @
28e00509
4.93 KB
assets/NJ_usercenter/textures/learndetail/play3.png.meta
0 → 100644
View file @
28e00509
{
"ver": "2.3.5",
"uuid": "46cc6f47-2e78-48be-9d11-7486f5a73842",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 102,
"height": 39,
"platformSettings": {},
"subMetas": {
"play3": {
"ver": "1.0.4",
"uuid": "f1be6db4-5bb1-406b-b8ee-998c36b91a6c",
"rawTextureUuid": "46cc6f47-2e78-48be-9d11-7486f5a73842",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 102,
"height": 39,
"rawWidth": 102,
"rawHeight": 39,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/NJ_usercenter/textures/learndetail/play_icon.png
0 → 100644
View file @
28e00509
3.56 KB
assets/NJ_usercenter/textures/learndetail/play_icon.png.meta
0 → 100644
View file @
28e00509
{
"ver": "2.3.5",
"uuid": "5691dc58-0fde-42a1-99fd-cae6dba4c020",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 102,
"height": 39,
"platformSettings": {},
"subMetas": {
"play_icon": {
"ver": "1.0.4",
"uuid": "3cca2fb0-1a57-4bb5-b9ae-425478934001",
"rawTextureUuid": "5691dc58-0fde-42a1-99fd-cae6dba4c020",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 102,
"height": 39,
"rawWidth": 102,
"rawHeight": 39,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/play1.anim
0 → 100644
View file @
28e00509
{
"__type__": "cc.AnimationClip",
"_name": "play1",
"_objFlags": 0,
"_native": "",
"_duration": 1.0166666666666666,
"sample": 60,
"speed": 1,
"wrapMode": 1,
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "701fdca4-143c-4e5a-8b4e-eafcf2c8e9bd"
}
},
{
"frame": 0.3333333333333333,
"value": {
"__uuid__": "4a7f44f8-6994-4585-8d93-bdb4a4d96e33"
}
},
{
"frame": 0.6666666666666666,
"value": {
"__uuid__": "f1be6db4-5bb1-406b-b8ee-998c36b91a6c"
}
},
{
"frame": 1,
"value": {
"__uuid__": "701fdca4-143c-4e5a-8b4e-eafcf2c8e9bd"
}
}
]
}
}
},
"events": []
}
\ No newline at end of file
assets/play1.anim.meta
0 → 100644
View file @
28e00509
{
"ver": "2.1.0",
"uuid": "0ff81042-2658-4de6-8d60-9ce292197bad",
"subMetas": {}
}
\ No newline at end of file
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