Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
ym008
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
ym008
Commits
3ca61d0c
Commit
3ca61d0c
authored
Feb 22, 2020
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支持课件11
parent
180b2328
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
237 additions
and
171 deletions
+237
-171
form.component.html
src/app/form/form.component.html
+102
-86
play.component.ts
src/app/play/play.component.ts
+135
-85
No files found.
src/app/form/form.component.html
View file @
3ca61d0c
<div
class=
"model-content"
>
<div
class=
"model-content"
>
<div
nz-row
>
<div
nz-row
>
<div
nz-col
nzOffset=
'4'
><h1
nz-title
>
课程内容编辑
</h1></div>
<div
nz-col
nzOffset=
'4'
>
<h1
nz-title
>
课程内容编辑
</h1>
</div>
</div>
</div>
<div
nz-form
>
<div
nz-form
>
<div
id=
'title-anchor'
>
<div
id=
'title-anchor'
>
...
@@ -22,8 +24,7 @@
...
@@ -22,8 +24,7 @@
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"t_audio_url"
>
发音
</nz-form-label>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"t_audio_url"
>
发音
</nz-form-label>
<nz-form-control
[
nzSpan
]="
6
"
>
<nz-form-control
[
nzSpan
]="
6
"
>
<app-audio-recorder
<app-audio-recorder
[
audioUrl
]="
item
.
title
.
t_audio_url
"
id=
"t_audio_url"
[
audioUrl
]="
item
.
title
.
t_audio_url
"
id=
"t_audio_url"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
item
.
title
,
'
t_audio_url
')"
>
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
item
.
title
,
'
t_audio_url
')"
>
</app-audio-recorder>
</app-audio-recorder>
</nz-form-control>
</nz-form-control>
...
@@ -31,13 +32,15 @@
...
@@ -31,13 +32,15 @@
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"t_font_size"
>
字体大小
</nz-form-label>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"t_font_size"
>
字体大小
</nz-form-label>
<nz-form-control
[
nzSpan
]="
6
"
>
<nz-form-control
[
nzSpan
]="
6
"
>
<nz-input-number
[(
ngModel
)]="
item
.
title
.
t_font_size
"
[
nzMin
]="
1
"
[
nzStep
]="
1
"
(
blur
)="
save
()"
></nz-input-number>
<nz-input-number
[(
ngModel
)]="
item
.
title
.
t_font_size
"
[
nzMin
]="
1
"
[
nzStep
]="
1
"
(
blur
)="
save
()"
>
</nz-input-number>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"t_font"
>
字体
</nz-form-label>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"t_font"
>
字体
</nz-form-label>
<nz-form-control
[
nzSpan
]="
4
"
>
<nz-form-control
[
nzSpan
]="
4
"
>
<nz-select
[(
ngModel
)]="
item
.
title
.
t_font
"
[
nzShowSearch
]='
true
'
nzAllowClear
nzPlaceHolder=
"Please select the font"
(
ngModelChange
)="
save
()"
>
<nz-select
[(
ngModel
)]="
item
.
title
.
t_font
"
[
nzShowSearch
]='
true
'
nzAllowClear
nzPlaceHolder=
"Please select the font"
(
ngModelChange
)="
save
()"
>
<nz-option
nzValue=
"BRLNSB"
nzLabel=
"BRLNSB"
></nz-option>
<nz-option
nzValue=
"BRLNSB"
nzLabel=
"BRLNSB"
></nz-option>
<nz-option
nzValue=
"BRLNSDB"
nzLabel=
"BRLNSDB"
></nz-option>
<nz-option
nzValue=
"BRLNSDB"
nzLabel=
"BRLNSDB"
></nz-option>
<nz-option
nzValue=
"BRLNSR"
nzLabel=
"BRLNSR"
></nz-option>
<nz-option
nzValue=
"BRLNSR"
nzLabel=
"BRLNSR"
></nz-option>
...
@@ -55,7 +58,8 @@
...
@@ -55,7 +58,8 @@
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"t_font_color"
>
颜色
</nz-form-label>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"t_font_color"
>
颜色
</nz-form-label>
<nz-form-control
[
nzSpan
]="
4
"
>
<nz-form-control
[
nzSpan
]="
4
"
>
<nz-select
[(
ngModel
)]="
item
.
title
.
t_font_color
"
[
nzShowSearch
]='
true
'
nzAllowClear
nzPlaceHolder=
"Please select the color"
(
ngModelChange
)="
save
()"
>
<nz-select
[(
ngModel
)]="
item
.
title
.
t_font_color
"
[
nzShowSearch
]='
true
'
nzAllowClear
nzPlaceHolder=
"Please select the color"
(
ngModelChange
)="
save
()"
>
<nz-option
nzValue=
"#008000"
nzLabel=
"绿色"
></nz-option>
<nz-option
nzValue=
"#008000"
nzLabel=
"绿色"
></nz-option>
<nz-option
nzValue=
"#FF0000"
nzLabel=
"红色"
></nz-option>
<nz-option
nzValue=
"#FF0000"
nzLabel=
"红色"
></nz-option>
<nz-option
nzValue=
"#D2691E"
nzLabel=
"巧克力色"
></nz-option>
<nz-option
nzValue=
"#D2691E"
nzLabel=
"巧克力色"
></nz-option>
...
@@ -68,8 +72,7 @@
...
@@ -68,8 +72,7 @@
<nz-divider
nzText=
"听力材料"
nzOrientation=
"left"
></nz-divider>
<nz-divider
nzText=
"听力材料"
nzOrientation=
"left"
></nz-divider>
<nz-form-item>
<nz-form-item>
<nz-form-control
[
nzSpan
]="
6
"
nzOffset=
"3"
>
<nz-form-control
[
nzSpan
]="
6
"
nzOffset=
"3"
>
<app-audio-recorder
id=
"item.listen_audio_url"
<app-audio-recorder
id=
"item.listen_audio_url"
[
audioUrl
]="
item
.
listen_audio_url
"
[
audioUrl
]="
item
.
listen_audio_url
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
item
,
'
listen_audio_url
')"
>
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
item
,
'
listen_audio_url
')"
>
</app-audio-recorder>
</app-audio-recorder>
</nz-form-control>
</nz-form-control>
...
@@ -78,20 +81,34 @@
...
@@ -78,20 +81,34 @@
<div>
<div>
<nz-divider
nzText=
"字母(组合)"
nzOrientation=
"left"
></nz-divider>
<nz-divider
nzText=
"字母(组合)"
nzOrientation=
"left"
></nz-divider>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"words"
>
字母组合
</nz-form-label>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"words"
>
字母组合一
</nz-form-label>
<nz-form-control
[
nzSpan
]="
6
"
>
<nz-form-control
[
nzSpan
]="
6
"
>
<input
nz-input
type=
"text"
id=
"words"
[(
ngModel
)]="
item
.
words
"
(
blur
)="
save
()"
>
<input
nz-input
type=
"text"
id=
"words"
[(
ngModel
)]="
item
.
words
"
(
blur
)="
save
()"
>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"words_audio_url"
>
字母组合
发音
</nz-form-label>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"words_audio_url"
>
字母组合一
发音
</nz-form-label>
<nz-form-control
[
nzSpan
]="
6
"
>
<nz-form-control
[
nzSpan
]="
6
"
>
<app-audio-recorder
<app-audio-recorder
[
audioUrl
]="
item
.
words_audio_url
"
id=
"words_audio_url"
[
audioUrl
]="
item
.
words_audio_url
"
id=
"words_audio_url"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
item
,
'
words_audio_url
')"
>
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
item
,
'
words_audio_url
')"
>
</app-audio-recorder>
</app-audio-recorder>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"words_two"
>
字母组合二
</nz-form-label>
<nz-form-control
[
nzSpan
]="
6
"
>
<input
nz-input
type=
"text"
id=
"words_two"
[(
ngModel
)]="
item
.
words_two
"
(
blur
)="
save
()"
>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"words_two_audio_url"
>
字母组合二发音
</nz-form-label>
<nz-form-control
[
nzSpan
]="
6
"
>
<app-audio-recorder
[
audioUrl
]="
item
.
words_two_audio_url
"
id=
"words_two_audio_url"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
item
,
'
words_two_audio_url
')"
>
</app-audio-recorder>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div>
<div>
<nz-divider
nzText=
"单词组"
nzOrientation=
"left"
></nz-divider>
<nz-divider
nzText=
"单词组"
nzOrientation=
"left"
></nz-divider>
...
@@ -105,14 +122,14 @@
...
@@ -105,14 +122,14 @@
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"it.left.word_val"
>
单词
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"it.left.word_val"
>
单词
</nz-form-label>
<nz-form-control
[
nzSpan
]="
6
"
>
<nz-form-control
[
nzSpan
]="
6
"
>
<input
type=
"text"
nz-input
placeholder=
"请录入单词"
[(
ngModel
)]="
it
.
left
.
word_val
"
(
blur
)="
saveWordItem
(
i
,'
left
')"
>
<input
type=
"text"
nz-input
placeholder=
"请录入单词"
[(
ngModel
)]="
it
.
left
.
word_val
"
(
blur
)="
saveWordItem
(
i
,'
left
')"
>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"it.left.word_audio_url"
>
发音
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"it.left.word_audio_url"
>
发音
</nz-form-label>
<nz-form-control
[
nzSpan
]="
6
"
>
<nz-form-control
[
nzSpan
]="
6
"
>
<app-audio-recorder
id=
"it.left.word_audio_url"
<app-audio-recorder
id=
"it.left.word_audio_url"
[
audioUrl
]="
it
.
left
.
word_audio_url
"
[
audioUrl
]="
it
.
left
.
word_audio_url
"
(
audioUploaded
)="
onAudioUploadSuccessByItem
($
event
,
it
.
left
,'
word_audio_url
')"
>
(
audioUploaded
)="
onAudioUploadSuccessByItem
($
event
,
it
.
left
,'
word_audio_url
')"
>
</app-audio-recorder>
</app-audio-recorder>
</nz-form-control>
</nz-form-control>
...
@@ -156,14 +173,14 @@
...
@@ -156,14 +173,14 @@
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"it.right.word_val"
>
单词
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"it.right.word_val"
>
单词
</nz-form-label>
<nz-form-control
[
nzSpan
]="
6
"
>
<nz-form-control
[
nzSpan
]="
6
"
>
<input
type=
"text"
nz-input
placeholder=
"请录入单词"
[(
ngModel
)]="
it
.
right
.
word_val
"
(
blur
)="
saveWordItem
(
i
,'
right
')"
>
<input
type=
"text"
nz-input
placeholder=
"请录入单词"
[(
ngModel
)]="
it
.
right
.
word_val
"
(
blur
)="
saveWordItem
(
i
,'
right
')"
>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"it.right.word_audio_url"
>
发音
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"it.right.word_audio_url"
>
发音
</nz-form-label>
<nz-form-control
[
nzSpan
]="
6
"
>
<nz-form-control
[
nzSpan
]="
6
"
>
<app-audio-recorder
id=
"it.right.word_audio_url"
<app-audio-recorder
id=
"it.right.word_audio_url"
[
audioUrl
]="
it
.
right
.
word_audio_url
"
[
audioUrl
]="
it
.
right
.
word_audio_url
"
(
audioUploaded
)="
onAudioUploadSuccessByItem
($
event
,
it
.
right
,'
word_audio_url
')"
>
(
audioUploaded
)="
onAudioUploadSuccessByItem
($
event
,
it
.
right
,'
word_audio_url
')"
>
</app-audio-recorder>
</app-audio-recorder>
</nz-form-control>
</nz-form-control>
...
@@ -208,8 +225,7 @@
...
@@ -208,8 +225,7 @@
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-control
[
nzSpan
]="
3
"
nzOffset=
"3"
class=
"add-btn-box"
>
<nz-form-control
[
nzSpan
]="
3
"
nzOffset=
"3"
class=
"add-btn-box"
>
<button
nz-button
nzType=
"dashed"
class=
"add-btn"
id=
"add-btn"
<button
nz-button
nzType=
"dashed"
class=
"add-btn"
id=
"add-btn"
(
click
)="
addItem
()"
>
(
click
)="
addItem
()"
>
<i
nz-icon
nzType=
"plus-circle"
nzTheme=
"outline"
></i>
添加
<i
nz-icon
nzType=
"plus-circle"
nzTheme=
"outline"
></i>
添加
</button>
</button>
</nz-form-control>
</nz-form-control>
...
...
src/app/play/play.component.ts
View file @
3ca61d0c
...
@@ -77,6 +77,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -77,6 +77,7 @@ export class PlayComponent implements OnInit, OnDestroy {
curAudio
;
curAudio
;
play
=
false
;
play
=
false
;
words_bg
;
words_bg
;
words_bg_right
;
title_bg
;
title_bg
;
wordLoad
:{[
key
:
string
]:{
loaded
:
boolean
;
letters
:{[
key
:
string
]:{
loaded
:
boolean
,
letter
:
Label
}}}}
=
{};
wordLoad
:{[
key
:
string
]:{
loaded
:
boolean
;
letters
:{[
key
:
string
]:{
loaded
:
boolean
,
letter
:
Label
}}}}
=
{};
...
@@ -866,6 +867,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -866,6 +867,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
addUrlToAudioObj
(
this
.
data
.
title
.
t_audio_url
);
this
.
addUrlToAudioObj
(
this
.
data
.
title
.
t_audio_url
);
this
.
addUrlToAudioObj
(
this
.
data
.
words_audio_url
);
this
.
addUrlToAudioObj
(
this
.
data
.
words_audio_url
);
this
.
addUrlToAudioObj
(
this
.
data
.
words_two_audio_url
);
// 初始化单词音效
// 初始化单词音效
for
(
let
i
=
0
;
i
<
this
.
data
.
wordArr
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
data
.
wordArr
.
length
;
++
i
)
{
...
@@ -989,11 +991,37 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -989,11 +991,37 @@ export class PlayComponent implements OnInit, OnDestroy {
words_content
.
fontColor
=
'
#ab5a23
'
;
words_content
.
fontColor
=
'
#ab5a23
'
;
words_content
.
refreshSize
();
words_content
.
refreshSize
();
words_bg
.
addChild
(
words_content
);
words_bg
.
addChild
(
words_content
);
words_bg
.
setScaleXY
(
this
.
mapScale
);
words_bg
.
setRadius
(
words_content
.
width
/
3
*
2
);
let
scale
=
getMinScale
(
words_bg
,
80
)
*
this
.
mapScale
;
words_bg
.
setScaleXY
(
scale
);
// this.data.words_two = "apo";
if
(
this
.
data
.
words_two
){
words_bg
.
x
=
words_bg
.
x
-
(
words_bg
.
width
/
2
)
*
this
.
mapScale
;
//重设第一个球的位置
const
words_bg_right
=
new
ShapeCircle
();
words_bg_right
.
setRadius
(
50
);
words_bg_right
.
fillColor
=
'
#ab5a23
'
;
words_bg_right
.
x
=
this
.
body_bg
.
width
/
2
+
(
words_bg_right
.
width
/
2
)
*
this
.
mapScale
;
words_bg_right
.
y
=
0
;
const
words_content_right
=
new
Label
();
words_content_right
.
text
=
this
.
data
.
words_two
;
words_content_right
.
textAlign
=
'
center
'
;
words_content_right
.
fontSize
=
50
;
words_content_right
.
fontName
=
'
GOTHICB
'
;
words_content_right
.
fontWeight
=
600
;
words_content_right
.
fontColor
=
'
#fdcd00
'
;
words_content_right
.
refreshSize
();
words_bg_right
.
addChild
(
words_content_right
);
words_bg_right
.
setRadius
(
words_content
.
width
/
3
*
2
);
let
scale_r
=
getMinScale
(
words_bg_right
,
80
)
*
this
.
mapScale
;
words_bg_right
.
setScaleXY
(
scale_r
);
this
.
body_bg
.
addChild
(
words_bg_right
);
this
.
words_bg_right
=
words_bg_right
;
}
this
.
body_bg
.
addChild
(
words_bg
);
this
.
body_bg
.
addChild
(
words_bg
);
this
.
words_bg
=
words_bg
;
this
.
words_bg
=
words_bg
;
}
}
/**
/**
...
@@ -1072,8 +1100,6 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1072,8 +1100,6 @@ export class PlayComponent implements OnInit, OnDestroy {
letter_spr
.
fontSize
=
letterFontSize
;
letter_spr
.
fontSize
=
letterFontSize
;
letter_spr
.
fontName
=
'
MMTextBook
'
;
letter_spr
.
fontName
=
'
MMTextBook
'
;
letter_spr
.
fontColor
=
this
.
getColor
(
letter
.
letter_color
);
letter_spr
.
fontColor
=
this
.
getColor
(
letter
.
letter_color
);
//设置不显示
letter_spr
.
visible
=
true
;
letter_spr
.
refreshSize
();
letter_spr
.
refreshSize
();
letter_spr_arr
.
push
(
letter_spr
);
letter_spr_arr
.
push
(
letter_spr
);
//设置坐标
//设置坐标
...
@@ -1109,6 +1135,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1109,6 +1135,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
word_arr_left
.
push
(
word_bg
);
this
.
word_arr_left
.
push
(
word_bg
);
if
(
word_content
.
right
.
letters
.
length
>
0
){
//中间斜杠
//中间斜杠
let
splitStr
=
new
Label
();
let
splitStr
=
new
Label
();
let
splitStrWidth
=
60
;
let
splitStrWidth
=
60
;
...
@@ -1182,16 +1209,21 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1182,16 +1209,21 @@ export class PlayComponent implements OnInit, OnDestroy {
word_bg_right
.
addChild
(
letter_spr
);
word_bg_right
.
addChild
(
letter_spr
);
}
}
word_bg_right
.
setSize
(
totalWidth_right
,
height_right
);
word_bg_right
.
setSize
(
totalWidth_right
,
height_right
);
word_bg_group
.
addChild
(
word_bg_right
)
;
word_bg_group
.
addChild
(
word_bg_right
)
;
word_bg_group
.
setSize
((
totalWidth_right
+
totalWidth
+
splitStrWidth
+
startWidth
),
height
);
word_bg_group
.
setSize
((
totalWidth_right
+
totalWidth
+
splitStrWidth
+
startWidth
),
height
);
this
.
word_arr
.
push
(
word_bg_right
);
}
else
{
this
.
word_arr
.
push
(
null
);
//站位用
word_bg_group
.
setSize
((
totalWidth
+
startWidth
),
height
);
}
if
(
word_bg_group
.
width
>
350
){
if
(
word_bg_group
.
width
>
350
){
word_bg_group
.
setScaleXY
(
getMinScale
(
word_bg_group
,
350
)
*
this
.
mapScale
);
word_bg_group
.
setScaleXY
(
getMinScale
(
word_bg_group
,
350
)
*
this
.
mapScale
);
}
else
{
}
else
{
word_bg_group
.
setScaleXY
(
this
.
mapScale
);
word_bg_group
.
setScaleXY
(
this
.
mapScale
);
}
}
this
.
word_arr
.
push
(
word_bg_right
);
this
.
word_bg_groups
.
push
(
word_bg_group
);
this
.
word_bg_groups
.
push
(
word_bg_group
);
this
.
body_bg
.
addChild
(
word_bg_group
);
this
.
body_bg
.
addChild
(
word_bg_group
);
};
};
...
@@ -1279,11 +1311,29 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1279,11 +1311,29 @@ export class PlayComponent implements OnInit, OnDestroy {
return
;
return
;
}
}
if
(
this
.
words_bg_right
&&
this
.
checkClickTarget
(
this
.
words_bg_right
))
{
this
.
playAudio
(
this
.
data
.
words_two_audio_url
)
;
return
;
}
for
(
let
i
=
0
;
i
<
this
.
word_arr_left
.
length
;
++
i
){
for
(
let
i
=
0
;
i
<
this
.
word_arr_left
.
length
;
++
i
){
let
word
=
this
.
word_arr_left
[
i
];
let
word
=
this
.
word_arr_left
[
i
];
// console.log('word', word) ;
// console.log('word', word) ;
if
(
this
.
checkClickTarget
(
word
))
{
if
(
this
.
checkClickTarget
(
word
))
{
console
.
log
(
'
this word left:
'
,
this
.
data
.
wordArr
[
i
])
;
// 获取是否加载完成
let
loaded
=
word
.
wordLoaded
;
// 未加载,不触发音效,加载单词
if
(
!
loaded
)
{
let
letters
:
Array
<
Label
>
=
word
.
children
.
slice
(
1
);
for
(
let
j
=
0
;
j
<
letters
.
length
;
j
++
)
{
let
labelItem
=
letters
[
j
];
if
(
!
labelItem
.
visible
){
labelItem
.
visible
=
true
;
}
}
word
.
wordLoaded
=
true
;
return
;
}
this
.
playAudio
(
this
.
data
.
wordArr
[
i
].
left
.
word_audio_url
);
this
.
playAudio
(
this
.
data
.
wordArr
[
i
].
left
.
word_audio_url
);
return
;
return
;
}
}
...
@@ -1293,7 +1343,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1293,7 +1343,7 @@ export class PlayComponent implements OnInit, OnDestroy {
for
(
let
i
=
0
;
i
<
this
.
word_arr
.
length
;
++
i
){
for
(
let
i
=
0
;
i
<
this
.
word_arr
.
length
;
++
i
){
let
word
=
this
.
word_arr
[
i
];
let
word
=
this
.
word_arr
[
i
];
// console.log('word', word) ;
// console.log('word', word) ;
if
(
this
.
checkClickTarget
(
word
))
{
if
(
word
&&
this
.
checkClickTarget
(
word
))
{
// 获取是否加载完成
// 获取是否加载完成
let
loaded
=
word
.
wordLoaded
;
let
loaded
=
word
.
wordLoaded
;
// 未加载,不触发音效,加载单词
// 未加载,不触发音效,加载单词
...
...
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