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
08e9d720
Commit
08e9d720
authored
Nov 22, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正学习时长不准的问题
parent
d3ffbd8e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
3 deletions
+43
-3
middleLayer_for_kyxq.meta
assets/middleLayer_for_kyxq.meta
+24
-1
LessonReport.ts
assets/middleLayer_for_kyxq/script/LessonReport.ts
+19
-2
No files found.
assets/middleLayer_for_kyxq.meta
View file @
08e9d720
{"ver":"1.1.2","uuid":"c35bb2f6-f24a-4850-ae44-643f2fdc7541","isBundle":false,"bundleName":"","priority":1,"compressionType":{"android":"default","ios":"default"},"optimizeHotUpdate":{"android":false,"ios":false},"inlineSpriteFrames":{"android":false,"ios":false},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "c35bb2f6-f24a-4850-ae44-643f2fdc7541",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {
"android": "default",
"ios": "default"
},
"optimizeHotUpdate": {
"android": false,
"ios": false
},
"inlineSpriteFrames": {
"android": false,
"ios": false
},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
assets/middleLayer_for_kyxq/script/LessonReport.ts
View file @
08e9d720
...
...
@@ -113,11 +113,13 @@ export default class LessonReportClass extends cc.Component {
this
.
last_play
.
string
=
lastDate
?
`
${
dateFormate
(
"
yyyy.MM.dd
"
,
lastDate
)}
学习过`
:
"
未学过
"
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
// 开口次数
const
timeUnit
=
this
.
getTimeString
(
_data
.
study_duration
)
this
.
study_duration
.
string
=
timeUnit
.
str
;
this
.
study_duration_unit
.
string
=
timeUnit
.
unit
;
for
(
let
i
=
1
;
i
<=
5
;
i
++
)
{
let
_star
=
this
.
stars
.
getChildByName
(
`icon_star
${
i
}
`
)
_star
.
active
=
_data
.
question_right_percent
>=
20
*
i
...
...
@@ -195,6 +197,21 @@ export default class LessonReportClass extends cc.Component {
this
.
reportSV
.
scrollToTop
()
}
getTimeString
(
duration
)
{
const
min
=
duration
/
(
60
*
1000
);
if
(
min
<=
999
)
{
return
{
str
:
Math
.
floor
(
min
*
10
)
/
10
+
""
,
unit
:
"
分钟
"
}
}
else
{
return
{
str
:
Math
.
floor
(
min
/
60
*
10
)
/
10
+
""
,
unit
:
"
小时
"
}
}
}
createItem
(
v
,
parent
)
{
let
_node
=
cc
.
instantiate
(
this
.
pronounceItem
)
_node
.
active
=
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