Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_kyxq
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
middleLayer_for_kyxq
Commits
235d5aa0
Commit
235d5aa0
authored
Nov 09, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加核心词、高频词、学习字母显示
parent
ce1a1fd0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2442 additions
and
1103 deletions
+2442
-1103
middleLayer_for_kyxq.fire
assets/middleLayer_for_kyxq/scene/middleLayer_for_kyxq.fire
+2387
-1082
LessonReport.ts
assets/middleLayer_for_kyxq/script/LessonReport.ts
+50
-15
MissionPage.ts
assets/middleLayer_for_kyxq/script/MissionPage.ts
+3
-4
bg_title2.png.meta
...leLayer_for_kyxq/textures/LessonReport/bg_title2.png.meta
+2
-2
No files found.
assets/middleLayer_for_kyxq/scene/middleLayer_for_kyxq.fire
View file @
235d5aa0
This source diff could not be displayed because it is too large. You can
view the blob
instead.
assets/middleLayer_for_kyxq/script/LessonReport.ts
View file @
235d5aa0
...
...
@@ -45,11 +45,17 @@ export default class NewClass extends cc.Component {
content
:
cc
.
Node
=
null
;
@
property
(
cc
.
Label
)
storyWord
:
cc
.
Label
=
null
;
storyWord
Label
:
cc
.
Label
=
null
;
@
property
(
cc
.
Label
)
story
Scentence
:
cc
.
Label
=
null
;
story
LetterLabel
:
cc
.
Label
=
null
;
@
property
(
cc
.
Label
)
storyStory
:
cc
.
Label
=
null
;
storyKeyWordLabel
:
cc
.
Label
=
null
;
@
property
(
cc
.
Label
)
storyHFWordLabel
:
cc
.
Label
=
null
;
@
property
(
cc
.
Label
)
storyScentenceLabel
:
cc
.
Label
=
null
;
@
property
(
cc
.
Label
)
storyStoryLabel
:
cc
.
Label
=
null
;
@
property
(
cc
.
ScrollView
)
reportSV
:
cc
.
ScrollView
=
null
;
...
...
@@ -57,8 +63,14 @@ export default class NewClass extends cc.Component {
@
property
(
cc
.
Node
)
nd_storyWord
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
nd_storyLetter
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
nd_storyKeyWord
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
nd_storySentence
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
nd_storyHFWord
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
nd_storyStory
:
cc
.
Node
=
null
;
// LIFE-CYCLE CALLBACKS:
...
...
@@ -91,18 +103,13 @@ export default class NewClass extends cc.Component {
});
const
lastDate
=
_data
.
last_play
?
new
Date
(
_data
.
last_play
)
:
null
;
const
studyDuration
=
_data
.
study_duration
this
.
title
.
string
=
_data
.
name
this
.
unit
.
string
=
_data
.
unitName
this
.
last_play
.
string
=
lastDate
?
`
${
dateFormate
(
"
yyyy.MM.dd
"
,
lastDate
)}
学习过`
:
"
未学过
"
this
.
last_play
.
string
=
lastDate
?
`
${
dateFormate
(
"
yyyy.MM.dd
"
,
lastDate
)}
学习过`
:
"
未学过
1
"
this
.
question_right_percent1
.
string
=
_data
.
question_right_percent
// 正确率 - 白色描边
this
.
question_right_percent2
.
string
=
_data
.
question_right_percent
// 正确率 - 主体红字
this
.
study_duration
.
string
=
_data
.
study_duration
>
999
?
Math
.
floor
(
_data
.
study_duration
/
60
*
10
)
/
10
:
_data
.
study_duration
// 学习时长
this
.
study_duration_unit
.
string
=
_data
.
study_duration
>
999
?
"
小时
"
:
"
分钟
"
;
this
.
question_times
.
string
=
_data
.
question_times
// 练习次数
this
.
record_times
.
string
=
_data
.
record_times
// 开口次数
...
...
@@ -122,28 +129,55 @@ export default class NewClass extends cc.Component {
// 句子
if
(
_data
.
knowledge
)
{
// 学习单词
if
(
_data
.
knowledge
.
word
)
{
this
.
storyWord
.
string
=
_data
.
knowledge
.
word
this
.
storyWord
Label
.
string
=
_data
.
knowledge
.
word
this
.
nd_storyWord
.
active
=
true
}
else
{
this
.
nd_storyWord
.
active
=
false
}
// 学习字母
if
(
_data
.
knowledge
.
letter
)
{
this
.
storyLetterLabel
.
string
=
_data
.
knowledge
.
letter
this
.
nd_storyLetter
.
active
=
true
}
else
{
this
.
nd_storyLetter
.
active
=
false
}
// 核心词汇
if
(
_data
.
knowledge
.
core_word
)
{
this
.
storyKeyWordLabel
.
string
=
_data
.
knowledge
.
core_word
this
.
nd_storyKeyWord
.
active
=
true
}
else
{
this
.
nd_storyKeyWord
.
active
=
false
}
// 高频词汇
if
(
_data
.
knowledge
.
high_frequency_word
)
{
this
.
storyHFWordLabel
.
string
=
_data
.
knowledge
.
high_frequency_word
this
.
nd_storyHFWord
.
active
=
true
}
else
{
this
.
nd_storyHFWord
.
active
=
false
}
// 学习句子
if
(
_data
.
knowledge
.
sentence
)
{
this
.
storyScentence
.
string
=
_data
.
knowledge
.
sentence
this
.
storyScentence
Label
.
string
=
_data
.
knowledge
.
sentence
this
.
nd_storySentence
.
active
=
true
}
else
{
this
.
nd_storySentence
.
active
=
false
}
// 故事梗概
if
(
_data
.
knowledge
.
story
)
{
this
.
storyStory
.
string
=
_data
.
knowledge
.
story
this
.
storyStory
Label
.
string
=
_data
.
knowledge
.
story
this
.
nd_storyStory
.
active
=
true
}
else
{
this
.
nd_storyStory
.
active
=
false
}
if
(
!
_data
.
knowledge
.
word
&&
!
_data
.
knowledge
.
sentence
&&
!
_data
.
knowledge
.
story
)
{
if
(
!
_data
.
knowledge
.
word
&&
!
_data
.
knowledge
.
sentence
&&
!
_data
.
knowledge
.
story
)
{
this
.
storyItem
.
active
=
false
}
else
{
this
.
storyItem
.
active
=
true
...
...
@@ -185,6 +219,7 @@ export default class NewClass extends cc.Component {
});
})
})
btn_play
.
on
(
"
click
"
,
()
=>
{
if
(
!
v
.
record_url
)
return
this
.
stopAudio
()
...
...
assets/middleLayer_for_kyxq/script/MissionPage.ts
View file @
235d5aa0
...
...
@@ -122,13 +122,13 @@ export default class NewClass extends cc.Component {
const
{
code
,
msg
,
results
}
=
await
asyncCallNetworkApiGet
(
`/api/kyxq/v1/user/course/report`
,
{
syllabusid
:
this
.
node
[
"
pData
"
].
id
})
if
(
code
!=
'
200
'
)
{
// 当前没有数据不显示按钮
this
.
btn_report
.
active
=
false
this
.
btn_report
.
active
=
false
;
}
else
{
this
.
btn_report
.
active
=
true
this
.
btn_report
.
active
=
true
;
this
.
reportData
=
results
}
}
else
{
this
.
btn_report
.
active
=
false
this
.
btn_report
.
active
=
false
;
}
}
...
...
@@ -197,7 +197,6 @@ export default class NewClass extends cc.Component {
}
initCustomBg
(
bg_image_url
)
{
console
.
log
(
"
Iniit
"
,
bg_image_url
)
if
(
!
bg_image_url
)
{
// 没有背景图 还原默认图
cc
.
find
(
"
bg/bg_default
"
,
this
.
node
).
active
=
true
;
...
...
assets/middleLayer_for_kyxq/textures/LessonReport/bg_title2.png.meta
View file @
235d5aa0
...
...
@@ -28,8 +28,8 @@
"rawHeight": 43,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"borderLeft":
2
0,
"borderRight":
2
0,
"subMetas": {}
}
}
...
...
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