Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
LST-04-01
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
LST-04-01
Commits
485e2042
Commit
485e2042
authored
Feb 02, 2021
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:需求变更
parent
d7a5a9b0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
14 deletions
+27
-14
custom-hot-zone.component.html
...app/common/custom-hot-zone/custom-hot-zone.component.html
+1
-1
custom-hot-zone.component.ts
src/app/common/custom-hot-zone/custom-hot-zone.component.ts
+14
-3
play.component.ts
src/app/play/play.component.ts
+11
-10
resources.js
src/app/play/resources.js
+1
-0
try_again.mp3
src/assets/play/music/try_again.mp3
+0
-0
No files found.
src/app/common/custom-hot-zone/custom-hot-zone.component.html
View file @
485e2042
...
...
@@ -95,7 +95,7 @@
<div
class=
"save-box"
>
<button
class=
"save-btn"
nz-button
nzType=
"primary"
[
nzSize
]="'
large
'"
nzShape=
"round"
<button
class=
"save-btn"
nz-button
nzType=
"primary"
[
nzSize
]="'
large
'"
nzShape=
"round"
[
disabled
]="
saveDisabled
?
true
:
false
"
(
click
)="
saveClick
()"
>
<i
nz-icon
nzType=
"save"
></i>
Save
...
...
src/app/common/custom-hot-zone/custom-hot-zone.component.ts
View file @
485e2042
...
...
@@ -71,7 +71,6 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
images
=
new
Map
();
animationId
:
any
;
// 资源
// rawImages = new Map(res);
winResizeEventStream
=
new
Subject
();
...
...
@@ -142,15 +141,18 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
console
.
log
(
'
e:
'
,
e
);
this
.
bgItem
.
picUrl
=
e
.
url
;
this
.
refreshBackground
();
this
.
saveDisabled
=
false
;
}
onItemImgUploadSuccess
(
e
,
item
)
{
item
.
pic_url
=
e
.
url
;
this
.
loadHotZonePic
(
item
.
pic
,
e
.
url
);
this
.
saveDisabled
=
false
;
}
onItemAudioUploadSuccess
(
e
,
item
)
{
item
.
audio_url
=
e
.
url
;
this
.
saveDisabled
=
false
;
}
...
...
@@ -195,6 +197,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
this
.
refreshHotZoneId
();
this
.
saveDisabled
=
false
;
}
deleteBtnClick
(
index
)
{
...
...
@@ -205,11 +208,14 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
this
.
refreshHotZoneId
();
this
.
saveDisabled
=
false
;
}
onImgUploadSuccessByImg
(
e
,
img
)
{
img
.
pic_url
=
e
.
url
;
this
.
refreshImage
(
img
);
this
.
saveDisabled
=
false
;
}
refreshImage
(
img
)
{
...
...
@@ -348,6 +354,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
onAudioUploadSuccessByImg
(
e
,
img
)
{
img
.
audio_url
=
e
.
url
;
this
.
saveDisabled
=
false
;
}
deleteItem
(
e
,
i
)
{
...
...
@@ -356,6 +363,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
this
.
hotZoneArr
.
splice
(
i
,
1
);
this
.
refreshHotZoneId
();
this
.
saveDisabled
=
false
;
}
...
...
@@ -364,7 +372,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
this
.
refreshItem
(
item
);
// console.log(' in radioChange e: ', e)
;
this
.
saveDisabled
=
false
;
}
refreshItem
(
item
)
{
...
...
@@ -600,7 +608,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
this
.
oldPos
=
{
x
:
this
.
mx
,
y
:
this
.
my
};
this
.
saveDisabled
=
tru
e
;
this
.
saveDisabled
=
fals
e
;
}
...
...
@@ -919,6 +927,8 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
}
this
.
save
.
emit
({
bgItem
,
hotZoneItemArr
,
exercises
});
this
.
saveDisabled
=
true
;
}
private
updatePos
()
{
...
...
@@ -998,6 +1008,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
saveText
(
item
)
{
item
.
textLabel
.
text
=
item
.
text
;
this
.
saveDisabled
=
false
;
}
private
loadHotZonePic
(
pic
:
HotZoneImg
,
url
)
{
...
...
src/app/play/play.component.ts
View file @
485e2042
...
...
@@ -981,8 +981,11 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
curAudio
=
this
.
playAudio
(
this
.
curHotZoneItem
.
data
.
audio_url
,
true
,
()
=>
{
this
.
curIndex
++
;
this
.
showNext
();
setTimeout
(()
=>
{
this
.
curIndex
++
;
this
.
showNext
();
},
3000
);
});
}
...
...
@@ -1065,16 +1068,14 @@ export class PlayComponent implements OnInit, OnDestroy {
else
{
this
.
magnifier
[
'
wrong
'
].
visible
=
true
;
this
.
canTouch
=
fals
e
;
this
.
playAudio
(
'
wrong
'
,
true
);
this
.
canTouch
=
tru
e
;
this
.
playAudio
(
'
try_again
'
,
true
);
shake
(
this
.
magnifier
,
0.5
,
()
=>
{
//加载下一个
this
.
curIndex
++
;
this
.
showNext
();
})
}
}
this
.
isMagnifierTouched
=
false
;
...
...
src/app/play/resources.js
View file @
485e2042
...
...
@@ -48,6 +48,7 @@ const resAudio = [
[
'
right
'
,
"
assets/play/music/right.mp3
"
],
[
'
find
'
,
"
assets/play/music/find.mp3
"
],
[
'
wrong
'
,
"
assets/play/music/wrong.mp3
"
],
[
'
try_again
'
,
"
assets/play/music/try_again.mp3
"
],
];
export
{
res
,
resAudio
};
src/assets/play/music/try_again.mp3
0 → 100644
View file @
485e2042
File added
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