Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
YM5-9
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
YM5-9
Commits
d088ed78
Commit
d088ed78
authored
Jan 28, 2021
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed UAT feedback
parent
d5eee57c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
10 deletions
+18
-10
form.component.html
src/app/form/form.component.html
+2
-1
form.component.ts
src/app/form/form.component.ts
+1
-1
play.component.ts
src/app/play/play.component.ts
+14
-7
index.html
src/index.html
+1
-1
No files found.
src/app/form/form.component.html
View file @
d088ed78
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
</nz-form-control>
</nz-form-control>
<nz-form-label
[
nzSpan
]="
2
"
>
标题发音
</nz-form-label>
<nz-form-label
[
nzSpan
]="
2
"
>
标题发音
</nz-form-label>
<nz-form-control
[
nzSpan
]="
4
"
>
<nz-form-control
[
nzSpan
]="
4
"
>
<app-audio-recorder
id=
"
index_audio_1
"
[
audioUrl
]="
title
.
mainTextAudio_url
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
mainTextAudio_url
',
title
)"
></app-audio-recorder>
<app-audio-recorder
id=
"
mainTextAudio_url
"
[
audioUrl
]="
title
.
mainTextAudio_url
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
mainTextAudio_url
',
title
)"
></app-audio-recorder>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
</div>
</div>
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
<app-audio-recorder
[
audioUrl
]="
item
.
audio_url_question
"
<app-audio-recorder
[
audioUrl
]="
item
.
audio_url_question
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
audio_url_question
',
item
)"
>
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
audio_url_question
',
item
)"
>
</app-audio-recorder>
</app-audio-recorder>
<label
nz-checkbox
nzValue=
"Yes"
[(
ngModel
)]="
item
.
showIndex
"
(
ngModelChange
)="
saveItem
()"
>
显示题号
</label>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
...
...
src/app/form/form.component.ts
View file @
d088ed78
...
@@ -78,7 +78,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -78,7 +78,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
}
addItem
()
{
addItem
()
{
this
.
dataArray
.
push
({
questionText
:
""
,
audio_url_question
:
""
,
answerText
:
""
,
audio_url_answer
:
""
})
this
.
dataArray
.
push
({
questionText
:
""
,
audio_url_question
:
""
,
answerText
:
""
,
audio_url_answer
:
""
,
showIndex
:
false
})
this
.
saveItem
();
this
.
saveItem
();
}
}
...
...
src/app/play/play.component.ts
View file @
d088ed78
...
@@ -173,6 +173,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -173,6 +173,7 @@ export class PlayComponent implements OnInit, OnDestroy {
// 映射预加载音频[网路]资源 返回包含音频路径的数组
// 映射预加载音频[网路]资源 返回包含音频路径的数组
mapToAduioArray
(
contentObj
){
mapToAduioArray
(
contentObj
){
let
array
=
[]
let
array
=
[]
contentObj
.
title
.
mainTextAudio_url
&&
array
.
push
(
contentObj
.
title
.
mainTextAudio_url
);
contentObj
.
dataArray
.
forEach
(
element
=>
{
contentObj
.
dataArray
.
forEach
(
element
=>
{
array
.
push
(
element
.
audio_url_answer
);
array
.
push
(
element
.
audio_url_answer
);
array
.
push
(
element
.
audio_url_question
);
array
.
push
(
element
.
audio_url_question
);
...
@@ -261,7 +262,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -261,7 +262,7 @@ export class PlayComponent implements OnInit, OnDestroy {
text
.
ref
.
fontWeight
=
900
text
.
ref
.
fontWeight
=
900
text
.
ref
.
setScaleXY
(
this
.
g_mapScale
)
text
.
ref
.
setScaleXY
(
this
.
g_mapScale
)
let
background
=
this
.
g_cartoon
.
createCartoonElementImageFunc
(
"
main-title-background
"
,
"
bg_50_20
"
,
(
w
,
h
)
=>
{
let
background
=
this
.
g_cartoon
.
createCartoonElementImageFunc
(
"
main-title-background
"
,
"
_
bg_50_20
"
,
(
w
,
h
)
=>
{
return
{
return
{
sx
:
labelWidth
*
2
/
w
,
sx
:
labelWidth
*
2
/
w
,
sy
:
50
*
this
.
g_mapScale
/
h
,
sy
:
50
*
this
.
g_mapScale
/
h
,
...
@@ -287,7 +288,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -287,7 +288,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
initTopMaskLine
()
{
initTopMaskLine
()
{
let
maskTop
=
this
.
g_cartoon
.
createCartoonElementShapeRect
(
"
top-mask
"
,
this
.
g_canvasWidth
,
85
*
this
.
g_mapScale
,
"
#f0f5f8
"
)
let
maskTop
=
this
.
g_cartoon
.
createCartoonElementShapeRect
(
"
top-mask
"
,
this
.
g_canvasWidth
,
105
*
this
.
g_mapScale
,
"
#f0f5f8
"
)
//
this
.
render
(
maskTop
.
ref
,
zIndexMap
.
topMaskLine
)
this
.
render
(
maskTop
.
ref
,
zIndexMap
.
topMaskLine
)
}
}
...
@@ -484,7 +485,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -484,7 +485,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
render
(
pannel
.
ref
,
10
);
this
.
render
(
pannel
.
ref
,
10
);
pannel
.
lastInserType
=
"
Q
"
pannel
.
lastInserType
=
"
Q
"
pannel
.
windowHeight
=
this
.
g_canvasHeight
-
78
*
this
.
g_mapScale
pannel
.
windowHeight
=
this
.
g_canvasHeight
-
78
*
this
.
g_mapScale
pannel
.
currentY
=
32
;
pannel
.
currentY
=
0
;
pannel
.
currentQuestionIndex
=
-
1
;
pannel
.
currentQuestionIndex
=
-
1
;
pannel
.
insertQuestion
=
(
text
,
nextQuestion
=
false
)
=>
{
pannel
.
insertQuestion
=
(
text
,
nextQuestion
=
false
)
=>
{
if
(
nextQuestion
)
{
if
(
nextQuestion
)
{
...
@@ -493,7 +494,12 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -493,7 +494,12 @@ export class PlayComponent implements OnInit, OnDestroy {
let
textString
=
""
let
textString
=
""
let
startX
=
42
*
this
.
g_mapScale
;
let
startX
=
42
*
this
.
g_mapScale
;
if
(
nextQuestion
)
{
if
(
nextQuestion
)
{
textString
=
`
${
pannel
.
currentQuestionIndex
+
1
}
.
${
text
}
`
;
if
(
this
.
g_formData
.
dataArray
[
pannel
.
currentQuestionIndex
].
showIndex
)
{
textString
=
`
${
pannel
.
currentQuestionIndex
+
1
}
.
${
text
}
`
;
}
else
{
textString
=
`
${
text
}
`
;
}
pannel
.
currentY
+=
28
*
this
.
g_mapScale
;
}
else
{
}
else
{
textString
=
text
;
textString
=
text
;
pannel
.
currentY
-=
52
*
this
.
g_mapScale
;
pannel
.
currentY
-=
52
*
this
.
g_mapScale
;
...
@@ -520,9 +526,9 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -520,9 +526,9 @@ export class PlayComponent implements OnInit, OnDestroy {
let
bb
=
label
.
ref
.
getBoundingBox
();
let
bb
=
label
.
ref
.
getBoundingBox
();
label
.
ref
.
x
=
42
*
this
.
g_mapScale
*
2
+
bb
.
width
/
2
;
label
.
ref
.
x
=
42
*
this
.
g_mapScale
*
2
+
bb
.
width
/
2
;
if
(
pannel
.
lastInserType
==
"
Q
"
)
{
if
(
pannel
.
lastInserType
==
"
Q
"
)
{
pannel
.
currentY
-=
3
8
*
this
.
g_mapScale
pannel
.
currentY
-=
2
8
*
this
.
g_mapScale
line
.
mask
.
ref
.
y
-=
3
8
*
this
.
g_mapScale
;
line
.
mask
.
ref
.
y
-=
2
8
*
this
.
g_mapScale
;
line
.
target
.
ref
.
y
-=
3
8
*
this
.
g_mapScale
;
line
.
target
.
ref
.
y
-=
2
8
*
this
.
g_mapScale
;
}
}
label
.
ref
.
y
=
pannel
.
currentY
+
32
*
this
.
g_mapScale
/
2
;
label
.
ref
.
y
=
pannel
.
currentY
+
32
*
this
.
g_mapScale
/
2
;
...
@@ -667,6 +673,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -667,6 +673,7 @@ export class PlayComponent implements OnInit, OnDestroy {
label
:
null
,
label
:
null
,
show
:
null
show
:
null
}
}
line
.
label
=
this
.
g_cartoon
.
createCartoonElementLabel
(
`lebel-question-
${
index
}
`
,
text
,
"
GOTHICB_1
"
,
"
#000000
"
,
36
*
this
.
g_mapScale
);
line
.
label
=
this
.
g_cartoon
.
createCartoonElementLabel
(
`lebel-question-
${
index
}
`
,
text
,
"
GOTHICB_1
"
,
"
#000000
"
,
36
*
this
.
g_mapScale
);
let
bb
=
line
.
label
.
ref
.
getBoundingBox
()
let
bb
=
line
.
label
.
ref
.
getBoundingBox
()
line
.
label
.
ref
.
x
=
startX
+
bb
.
width
/
2
;
line
.
label
.
ref
.
x
=
startX
+
bb
.
width
/
2
;
...
...
src/index.html
View file @
d088ed78
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
</style>
</style>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"favicon.ico"
/>
<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=
"http
s://staging-teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"
></script>
<!-- <script type="text/javascript" src="https://staging-teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air_online.js"></script> -->
<!-- <script type="text/javascript" src="https://staging-teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air_online.js"></script> -->
</head>
</head>
<body>
<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