Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hw_003
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
hw_003
Commits
bce9fd06
Commit
bce9fd06
authored
Feb 03, 2021
by
Li MingZhe
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://vcs.ireadabc.com/template/hw_003
parents
3f658fc7
8f88565b
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
94 deletions
+59
-94
package-lock.json
package-lock.json
+33
-85
package.json
package.json
+4
-3
form.component.html
src/app/form/form.component.html
+4
-0
form.component.ts
src/app/form/form.component.ts
+8
-0
play.component.ts
src/app/play/play.component.ts
+9
-5
index.html
src/index.html
+1
-1
No files found.
package-lock.json
View file @
bce9fd06
This diff is collapsed.
Click to expand it.
package.json
View file @
bce9fd06
...
...
@@ -47,6 +47,7 @@
"
rxjs
"
:
"
^6.3.3
"
,
"
rxjs-compat
"
:
"
^6.3.3
"
,
"
rxjs-tslint
"
:
"
^0.1.6
"
,
"
sass
"
:
"
^1.32.6
"
,
"
spark-md5
"
:
"
^3.0.0
"
,
"
webpack
"
:
"
^4.28.2
"
,
"
zone.js
"
:
"
^0.8.26
"
...
...
src/app/form/form.component.html
View file @
bce9fd06
...
...
@@ -8,6 +8,10 @@
<div
style=
"margin-top: 1vw; margin-left: 2vw; margin-bottom: 3vw;"
>
<label
nz-checkbox
nzValue=
"stopPlayBgAudio"
[(
ngModel
)]="
stopPlayBgAudio
"
(
ngModelChange
)="
clickCheckBox
()"
>
默认不播放背景音
</label>
</div>
<div
*
ngFor=
"let it of picArr; let i = index"
style=
"padding: 0.5vw"
>
...
...
src/app/form/form.component.ts
View file @
bce9fd06
...
...
@@ -23,6 +23,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
_item
:
any
;
stopPlayBgAudio
=
false
;
KEY
=
'
hw_003
'
;
...
...
@@ -103,6 +105,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this
.
item
.
contentObj
.
optionType
=
'
A
'
;
}
this
.
stopPlayBgAudio
=
this
.
item
.
contentObj
.
stopPlayBgAudio
;
let
tmpFlag
=
false
;
...
...
@@ -247,14 +250,19 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
clickCheckBox
()
{
console
.
log
(
'
in clickCheckBox
'
);
this
.
item
.
contentObj
.
stopPlayBgAudio
=
!
this
.
item
.
contentObj
.
stopPlayBgAudio
;
this
.
saveItem
();
}
saveItem
()
{
console
.
log
(
'
in saveItem
'
);
// this.update.emit(this.item);
console
.
log
(
'
this.item
'
+
JSON
.
stringify
(
this
.
item
));
this
.
save
();
}
...
...
src/app/play/play.component.ts
View file @
bce9fd06
...
...
@@ -615,8 +615,10 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
initQuestionWindow
();
if
(
!
this
.
data
.
contentObj
.
stopPlayBgAudio
)
{
this
.
playAudio
(
'
bg
'
);
}
}
showStartAnima
()
{
...
...
@@ -2019,8 +2021,10 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
wheelRun
();
this
.
playAudio
(
'
click_1
'
);
if
(
!
this
.
data
.
contentObj
.
stopPlayBgAudio
)
{
this
.
playAudio
(
'
bg
'
);
}
}
getNextItemIndex
()
{
...
...
@@ -2155,8 +2159,10 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
textBgArr
[
i
].
wrongBg
.
visible
=
false
;
if
(
this
.
answerLabelArr
[
i
]
&&
answerArr
[
i
].
text
)
{
this
.
answerLabelArr
[
i
].
text
=
answerArr
[
i
].
text
;
this
.
textBgArr
[
i
].
visible
=
true
;
}
else
{
this
.
answerLabelArr
[
i
].
text
=
''
;
this
.
textBgArr
[
i
].
visible
=
false
;
}
}
...
...
@@ -2697,14 +2703,12 @@ export class PlayComponent implements OnInit, OnDestroy {
preloadAudio
(
url
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
audio
=
new
Audio
();
audio
.
oncanplay
=
(
a
)
=>
{
resolve
();
};
audio
.
onerror
=
()
=>
{
reject
;
};
audio
.
src
=
url
;
audio
.
load
();
resolve
(
null
);
});
}
...
...
src/index.html
View file @
bce9fd06
...
...
@@ -7,7 +7,7 @@
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"favicon.ico"
>
<script
type=
"text/javascript"
src=
"
http:
//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"
></script>
<script
type=
"text/javascript"
src=
"//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"
></script>
</head>
<body>
...
...
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