Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hy17_hds
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
hy17_hds
Commits
71b0cb89
Commit
71b0cb89
authored
Sep 07, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整完成
parent
087be0a1
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
17 deletions
+32
-17
.DS_Store
.DS_Store
+0
-0
hy17_hds.ts
assets/hy17_hds/scene/hy17_hds.ts
+15
-13
defaultData_hy17_hds.ts
assets/hy17_hds/script/defaultData_hy17_hds.ts
+1
-3
form.component.html
form/src/app/form/form.component.html
+9
-0
form.component.ts
form/src/app/form/form.component.ts
+7
-1
No files found.
.DS_Store
View file @
71b0cb89
No preview for this file type
assets/hy17_hds/scene/hy17_hds.ts
View file @
71b0cb89
...
...
@@ -426,10 +426,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
zi_count
:
this
.
data
.
zi_count
,
score
:
this
.
score
,
};
let
details
=
pg
.
hw
.
getRecord
();
if
(
details
&&
details
.
length
>
0
)
{
upData
.
details
=
details
let
recordList
=
pg
.
hw
.
getRecord
();
if
(
recordList
&&
recordList
.
length
>
0
)
{
upData
.
recordList
=
recordList
}
console
.
log
(
'
upload->
'
+
JSON
.
stringify
(
upData
))
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
).
getComponent
(
'
middleLayer
'
);
middleLayer
.
onHomeworkFinish
(
upData
,
()
=>
{
res
(
''
);
...
...
@@ -437,7 +438,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
})
}
gameOver
()
{
this
.
sendData
()
this
.
sendData
()
.
then
(()
=>
{
pg
.
view
.
visible
(
this
.
sentence_box
,
false
)
// pg.event.emit('layer_ending_show', {
// coin: this.score
...
...
@@ -447,6 +448,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
).
getComponent
(
'
middleLayer
'
);
middleLayer
.
saveGolds
(
this
.
score
);
// 保存金币数量;num 是获得金币的数量,数字类型;
middleLayer
.
goNextPage
();
// 跳转到下一页
})
}
}
...
...
assets/hy17_hds/script/defaultData_hy17_hds.ts
View file @
71b0cb89
export
const
defaultData
=
{
word_count
:
1
,
sentence_count
:
1
,
zi_count
:
1
,
"
word_count
"
:
"
22
"
,
"
sentence_count
"
:
"
11
"
,
"
zi_count
"
:
"
33
"
,
npcTitle
:
"
123
"
,
"
recordFlag
"
:
false
,
"
title
"
:
""
,
"
questionText
"
:
""
,
"
questionTextAudio
"
:
""
,
"
questions
"
:
[
{
"
text
"
:
"
apple
"
,
"
time
"
:
2
},
...
...
form/src/app/form/form.component.html
View file @
71b0cb89
...
...
@@ -91,6 +91,15 @@
<span>
{{ item.npcAudioName}}
</span>
</div>
</div>
<span
style=
"font-size: 20px;"
>
掌握单词数:
</span>
<input
type=
"text"
nz-input
[(
ngModel
)]="
item
.
word_count
"
(
blur
)="
save
()"
>
<span
style=
"font-size: 20px;"
>
掌握短语数:
</span>
<input
type=
"text"
nz-input
[(
ngModel
)]="
item
.
sentence_count
"
(
blur
)="
save
()"
>
<span
style=
"font-size: 20px;"
>
掌握字数:
</span>
<input
type=
"text"
nz-input
[(
ngModel
)]="
item
.
zi_count
"
(
blur
)="
save
()"
>
</div>
...
...
form/src/app/form/form.component.ts
View file @
71b0cb89
...
...
@@ -25,7 +25,10 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
}],
bgAudio
:
""
,
bgAudioName
:
""
,
audioName
:
""
audioName
:
""
,
word_count
:
'
0
'
,
sentence_count
:
'
0
'
,
zi_count
:
'
0
'
,
};
isVisible
=
false
;
...
...
@@ -49,6 +52,9 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
if
(
!
this
.
item
.
npcTitle
)
this
.
item
.
npcTitle
=
''
;
if
(
!
this
.
item
.
npcAudio
)
this
.
item
.
npcAudio
=
''
;
if
(
!
this
.
item
.
npcAudioName
)
this
.
item
.
npcAudioName
=
''
;
if
(
!
this
.
item
.
word_count
)
this
.
item
.
word_count
=
''
;
if
(
!
this
.
item
.
sentence_count
)
this
.
item
.
sentence_count
=
''
;
if
(
!
this
.
item
.
zi_count
)
this
.
item
.
zi_count
=
''
;
}
...
...
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