Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
YM4-11
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
YM4-11
Commits
a65352ba
Commit
a65352ba
authored
Sep 12, 2020
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Almost completed form page
parent
4d304e3f
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
312 additions
and
99 deletions
+312
-99
Unit.ts
src/app/common/custom-hot-zone/Unit.ts
+6
-6
custom-hot-zone.component.html
...app/common/custom-hot-zone/custom-hot-zone.component.html
+164
-40
custom-hot-zone.component.scss
...app/common/custom-hot-zone/custom-hot-zone.component.scss
+3
-0
custom-hot-zone.component.ts
src/app/common/custom-hot-zone/custom-hot-zone.component.ts
+83
-28
form.component.ts
src/app/form/form.component.ts
+3
-1
filename.txt
src/assets/play/filename.txt
+13
-24
creatJsonProfile.py
src/assets/play/hotZooCard/creatJsonProfile.py
+13
-0
defalut_bg.png
src/assets/play/hotZooCard/defalut_bg.png
+0
-0
filename.txt
src/assets/play/hotZooCard/filename.txt
+27
-0
No files found.
src/app/common/custom-hot-zone/Unit.ts
View file @
a65352ba
...
...
@@ -437,10 +437,10 @@ export class HotZoneImageItem extends MySprite {
arrowRight
;
init
(
image_url
=
null
,
text
?,
type
?,
callback
?,
handleSave
?){
let
change
=
true
;
if
(
type
==
this
.
type
){
change
=
false
}
//
let change = true;
//
if(type == this.type){
//
change = false
//
}
if
(
type
&&
type
==
"
Text
"
){
image_url
=
"
assets/default/images/bg_50_50.png
"
;
...
...
@@ -475,9 +475,9 @@ export class HotZoneImageItem extends MySprite {
}
this
.
drawArrow
()
}
if
(
change
){
//
if(change){
this
.
showLineDash
()
}
//
}
})
}
...
...
src/app/common/custom-hot-zone/custom-hot-zone.component.html
View file @
a65352ba
<div
class=
"p-image-children-editor"
>
<div
style=
"float: left; width: 60%;border-right: 2px solid #ddd; border-bottom: 2px solid #ddd;"
>
<h5
style=
"margin-left: 2.5%;"
>
预览:
</h5>
<div
id=
"canvas-container"
style=
"margin:5px;"
>
<div
class=
"preview-box"
#
wrap
style=
"margin-bottom: 20px"
>
<canvas
id=
"canvas"
#
canvas
></canvas>
<div
style=
"float: left; width: 20%; border-right: 2px solid #ddd;"
class=
"clearfix"
>
<div
nzAlign=
"middle"
style=
"border-bottom: 2px solid #DDD;"
>
<div
class=
"img-box clearfix"
style=
"border-bottom: 1px solid #DDD; padding-bottom: 10px;"
>
<div
style=
"float: left;"
>
<h3>
音频素材
</h3>
<app-audio-recorder
id=
"index_audio_1"
[
audioUrl
]="
bgItem
.
audio_url
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
bgItem
,
null
)"
>
</app-audio-recorder>
</div>
</div>
<div
style=
"text-align: center"
>
<button
nz-button
nzType=
"primary"
[
nzSize
]="'
small
'"
nzShape=
"round"
(
click
)="
saveClick
()"
[
disabled
]="!
hotZoneChanged
"
>
<i
nz-icon
type=
"save"
></i>
Save
</button>
</div>
<h5
style=
"border-top: 2px solid #ddd;"
>
背景图:
</h5>
<div
style=
"width: 200px;margin: auto;"
>
<div
class=
"bg-box"
>
<app-upload-image-with-preview
[
picUrl
]="
bgItem
.
url
"
(
imageUploaded
)="
onBackgroundUploadSuccess
($
event
)"
>
</app-upload-image-with-preview>
<div
nzAlign=
"middle"
>
<div
class=
"img-box clearfix"
style=
"border-bottom: 1px solid #DDD; padding-bottom: 10px;"
>
<div
style=
"position: relative; margin-bottom: 5px;"
>
<h3>
左侧单词
</h3>
<div
style=
"display: flex; "
>
<div
style=
"flex: 1"
>
音频
</div>
<div
style=
"flex: 4"
>
<app-audio-recorder
id=
"index_audio_1"
[
audioUrl
]="
bgItem
.
wordLeft_audio_url
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
bgItem
,
'
wordLeft_audio_url
')"
>
</app-audio-recorder>
</div>
</div>
<div
style=
"float: left; width: 40%"
>
<div
nzAlign=
"middle"
>
</div>
<div
style=
"position: relative;"
>
<div
style=
"display: flex; "
>
<div
style=
"flex: 1"
>
文字
</div>
<div
style=
"flex: 4"
>
<input
type=
"text"
nz-input
placeholder=
""
[(
ngModel
)]="
bgItem
.
wordLeft_text
"
(
blur
)="
autoSave
()"
/>
</div>
</div>
</div>
</div>
</div>
<div
nzAlign=
"middle"
style=
"border-bottom: 2px solid #DDD;"
>
<div
class=
"img-box clearfix"
style=
"border-bottom: 1px solid #DDD; padding-bottom: 10px;"
>
<div
style=
"float: left;"
>
<h3>
音频素材
</h3>
<app-audio-recorder
id=
"index_audio_1"
[
audioUrl
]="
bgItem
.
audio_url
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
bgItem
)"
>
</app-audio-recorder>
<div
style=
"position: relative; margin-bottom: 5px;"
>
<h3>
右侧单词
</h3>
<div
style=
"display: flex; "
>
<div
style=
"flex: 1"
>
音频
</div>
<div
style=
"flex: 4"
>
<app-audio-recorder
id=
"index_audio_1"
[
audioUrl
]="
bgItem
.
wordRight_audio_url
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
bgItem
,
'
wordRight_audio_url
')"
>
</app-audio-recorder>
</div>
</div>
<div
nzAlign=
"middle"
>
</div>
<div
style=
"position: relative;"
>
<div
style=
"display: flex; "
>
<div
style=
"flex: 1"
>
文字
</div>
<div
style=
"flex: 4"
>
<input
type=
"text"
nz-input
placeholder=
""
[(
ngModel
)]="
bgItem
.
wordRight_text
"
(
blur
)="
autoSave
()"
/>
</div>
</div>
</div>
</div>
</div>
<div
nzAlign=
"middle"
class=
"clearfix"
>
<div
class=
"img-box clearfix"
*
ngFor=
"let it of hotZoneArr; let i = index"
style=
"border-bottom: 1px solid #DDD; padding-bottom: 10px;"
>
<div
style=
"
height: 115px; position: relative; width: 250px;
"
>
<h3>
选区-{{ i + 1 }}
</h3>
<div
style=
"
position: relative; margin-bottom: 5px;
"
>
<h3>
选区-{{ i + 1 }}
</h3>
<div
style=
"display: flex; "
>
<div
style=
"flex:
2
"
>
选区音效
<div
style=
"flex:
1
"
>
音频
</div>
<div
style=
"flex:4"
>
<app-audio-recorder
id=
"index_audio_1"
[
audioUrl
]="
bgItem
.
audio_url
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
bgItem
)"
>
</app-audio-recorder>
<div
style=
"flex:
4"
>
<app-audio-recorder
id=
"index_audio_1"
[
audioUrl
]="
it
.
audio_url
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
it
,
null
)"
>
</app-audio-recorder>
</div>
</div>
</div>
<div
style=
"position: relative;
width: 250px;
"
>
<div
style=
"position: relative;
margin-bottom: 5px;
"
>
<div
style=
"display: flex; "
>
<div
style=
"flex:
2
"
>
<div
style=
"flex:
1
"
>
文字
</div>
<div
style=
"flex:4"
>
<input
type=
"text"
nz-input
placeholder=
""
[(
ngModel
)]="
it
.
text
"
(
blur
)="
refreshHotZoneText
(
it
);
autoSave
()"
/>
<div
style=
"flex:
4"
>
<input
type=
"text"
nz-input
placeholder=
""
[(
ngModel
)]="
it
.
text
"
(
blur
)="
autoSave
()"
/>
</div>
</div>
</div>
<div
style=
"position: relative;"
>
<button
style=
"float: right; margin-bottom: 5px;"
nz-button
nzType=
"danger"
(
click
)="
deleteItem
($
event
,
i
)"
>
<i
nz-icon
nzType=
"delete"
nzTheme=
"outline"
></i>
删除
</button>
</div>
<div
style=
"float: right; display: flex; padding-left: 10px;"
>
<!-- <button style="flex:1; margin-bottom: 5px;" nz-button nzType="dashed" (click)="handleMoveItemUp($event, i)"
...
...
@@ -68,11 +101,11 @@
[disabled]="i==hotZoneArr.length-1">
<i nz-icon nzType="down" nzTheme="outline"></i>
下移
</button>
-->
</button>
<button style="flex:1; margin-bottom: 5px;" nz-button nzType="danger" (click)="deleteItem($event, i)">
<i nz-icon nzType="delete" nzTheme="outline"></i>
删除
</button>
</button>
-->
</div>
</div>
<div
nz-col
nzSpan=
"5"
nzOffset=
"1"
>
...
...
@@ -85,7 +118,98 @@
</div>
</div>
</div>
<nz-divider></nz-divider>
<div
class=
"save-box"
>
<div
style=
"float: left; width: 80%; border-bottom: 2px solid #ddd;"
>
<h5
style=
"margin-left: 2.5%;"
>
预览:
</h5>
<div
id=
"canvas-container"
style=
"margin:5px;"
>
<div
class=
"preview-box"
#
wrap
style=
"margin-bottom: 20px"
>
<canvas
id=
"canvas"
#
canvas
></canvas>
</div>
</div>
<div
style=
"text-align: center"
>
<button
nz-button
nzType=
"primary"
[
nzSize
]="'
small
'"
nzShape=
"round"
(
click
)="
saveClick
()"
[
disabled
]="!
hotZoneChanged
"
>
<i
nz-icon
type=
"save"
></i>
Save
</button>
</div>
<h5
style=
"border-top: 2px solid #ddd;"
>
背景图:
</h5>
<div
style=
"width: 200px;margin: auto;"
>
<div
class=
"bg-box"
>
<app-upload-image-with-preview
[
picUrl
]="
bgItem
.
url
"
(
imageUploaded
)="
onBackgroundUploadSuccess
($
event
)"
>
</app-upload-image-with-preview>
</div>
</div>
<div
style=
"border-bottom: 2px solid #DDD;"
></div>
<h3>
题目配置
</h3>
<div
nzAlign=
"middle"
*
ngFor=
"let item of bgItem.questions; let QI = index"
>
<div
class=
"img-box clearfix"
style=
"border-bottom: 1px solid #DDD; padding-bottom: 10px; "
>
<div>
<div
style=
"float: left; margin-right: 10px;"
>
<div>
No.
</div>
<div
style=
"height: 32px; padding: 5px 10px;"
>
{{QI+1}}
</div>
</div>
<div
style=
"float: left; margin-right: 10px;"
>
<div>
组合数
</div>
<div
style=
"float: left;"
>
<nz-input-number
[(
ngModel
)]="
item
.
number
"
[
nzMin
]="
1
"
[
nzMax
]="
5
"
[
nzStep
]="
1
"
(
ngModelChange
)="
handleCombinLength
(
item
)"
></nz-input-number>
</div>
</div>
<div
style=
"float: left; margin-left: 10px;"
>
<div>
组合
</div>
<div>
<nz-select
*
ngFor=
"let part of item.combin; let i = index"
[(
ngModel
)]="
item
.
combin
[
i
]"
style=
"float: left; margin-right: 5px;"
(
ngModelChange
)="
handlePartChange
($
event
,
item
,
i
)"
>
<nz-option
nzValue=
"-1"
[
nzLabel
]="'
L-
'
+
bgItem
.
wordLeft_text
"
></nz-option>
<nz-option
nzValue=
"-2"
[
nzLabel
]="'
R-
'
+
bgItem
.
wordRight_text
"
></nz-option>
<nz-option
*
ngFor=
"let hot of hotZoneArr; let j = index;"
[
nzValue
]="
j
"
[
nzLabel
]="(
j
+
1
)
+
'
-
'
+
hot
.
text
"
></nz-option>
</nz-select>
</div>
</div>
<div
style=
"float: left; margin-left: 10px;"
>
<div>
预览
</div>
<div
style=
"background-color: #ccc; height: 32px; padding: 5px 10px;"
>
{{getQuestionWord(item.combin)}}
</div>
</div>
<div
style=
"float: left; margin-left: 20px;"
>
<div>
发音
</div>
<div>
<app-audio-recorder
id=
"index_audio_1"
[
audioUrl
]="
item
.
audio_url
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
item
,
null
)"
>
</app-audio-recorder>
</div>
</div>
<div
style=
"float: right;"
>
<div>
题序/删除
</div>
<div>
<button
style=
"flex:1; margin-bottom: 5px;"
nz-button
nzType=
"dashed"
(
click
)="
handleMoveItemUp
($
event
,
QI
)"
[
disabled
]="
QI=
=0"
>
<i
nz-icon
nzType=
"up"
nzTheme=
"outline"
></i>
上移
</button>
<button
style=
"flex:1; margin-bottom: 5px;"
nz-button
nzType=
"dashed"
(
click
)="
handleMoveItemDown
($
event
,
QI
)"
[
disabled
]="
QI=
=bgItem.questions.length-1"
>
<i
nz-icon
nzType=
"down"
nzTheme=
"outline"
></i>
下移
</button>
<button
style=
"flex:1; margin-bottom: 5px;"
nz-button
nzType=
"danger"
(
click
)="
deleteQuestionItem
($
event
,
QI
)"
>
<i
nz-icon
nzType=
"delete"
nzTheme=
"outline"
></i>
删除
</button>
</div>
</div>
</div>
</div>
</div>
<div
style=
"padding-left: 10px; padding-bottom: 10px;"
>
<button
nz-button
nzType=
"dashed"
(
click
)="
addQustion
()"
[
disabled
]="
bgItem
.
questions
.
length=
=8"
>
<i
nz-icon
nzType=
"plus-circle"
nzTheme=
"outline"
></i>
添加题目
</button>
</div>
</div>
<nz-divider></nz-divider>
</div>
\ No newline at end of file
src/app/common/custom-hot-zone/custom-hot-zone.component.scss
View file @
a65352ba
...
...
@@ -72,6 +72,9 @@ h5 {
margin-top
:
1rem
;
}
nz-select
{
min-width
:
80px
;
}
//@import '../../../style/common_mixin';
//
//.p-image-uploader {
...
...
src/app/common/custom-hot-zone/custom-hot-zone.component.ts
View file @
a65352ba
...
...
@@ -26,20 +26,10 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
return
this
.
_bgItem
;
}
@
Input
()
imgItemArr
=
null
;
@
Input
()
hotZoneItemArr
=
null
;
@
Input
()
hotZoneArr
=
null
;
@
Output
()
save
=
new
EventEmitter
();
@
Input
()
imgItemArr
=
null
;
@
Input
()
hotZoneItemArr
=
null
;
@
Input
()
hotZoneArr
=
null
;
@
Output
()
save
=
new
EventEmitter
();
@
ViewChild
(
'
canvas
'
)
canvas
:
ElementRef
;
@
ViewChild
(
'
wrap
'
)
wrap
:
ElementRef
;
...
...
@@ -137,23 +127,24 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
const
item
=
this
.
getHotZoneItem
();
this
.
hotZoneArr
.
push
(
item
);
this
.
refreshHotZoneId
();
this
.
refreshIndexNumber
()
this
.
autoSave
()
}
handleMoveItemUp
(
event
,
index
)
{
if
(
index
!=
0
)
{
this
.
hotZoneArr
[
index
]
=
this
.
hotZoneArr
.
splice
(
index
-
1
,
1
,
this
.
hotZoneArr
[
index
])[
0
];
this
.
bgItem
.
questions
[
index
]
=
this
.
bgItem
.
questions
.
splice
(
index
-
1
,
1
,
this
.
bgItem
.
questions
[
index
])[
0
];
}
else
{
this
.
hotZoneArr
.
push
(
this
.
hotZoneArr
.
shift
());
this
.
bgItem
.
questions
.
push
(
this
.
bgItem
.
questions
.
shift
());
}
this
.
autoSave
()
}
handleMoveItemDown
(
event
,
index
)
{
if
(
index
!=
this
.
hotZoneArr
.
length
-
1
)
{
this
.
hotZoneArr
[
index
]
=
this
.
hotZoneArr
.
splice
(
index
+
1
,
1
,
this
.
hotZoneArr
[
index
])[
0
];
if
(
index
!=
this
.
bgItem
.
questions
.
length
-
1
)
{
this
.
bgItem
.
questions
[
index
]
=
this
.
bgItem
.
questions
.
splice
(
index
+
1
,
1
,
this
.
bgItem
.
questions
[
index
])[
0
];
}
else
{
this
.
hotZoneArr
.
unshift
(
this
.
hotZoneArr
.
splice
(
index
,
1
)[
0
]);
this
.
bgItem
.
questions
.
unshift
(
this
.
bgItem
.
questions
.
splice
(
index
,
1
)[
0
]);
}
this
.
autoSave
()
}
...
...
@@ -168,8 +159,13 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
this
.
autoSave
()
}
onAudioUploadSuccess
(
e
,
item
)
{
onAudioUploadSuccess
(
e
,
item
,
key
)
{
if
(
key
)
{
item
.
audio_url
=
e
.
url
;
}
else
{
item
[
key
]
=
e
.
url
;
}
this
.
autoSave
()
}
...
...
@@ -213,8 +209,9 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
// item.image_url = saveData.media.image_url
// item.text = saveData.media.text
// item.type = saveData.media.type
item
.
audio_url
=
saveData
.
media
.
audio_url
?
saveData
.
media
.
audio_url
:
""
item
.
image_url
=
"
assets/play/bg_70_40.png
"
item
.
text
=
""
//
item.text = ""
item
.
type
=
"
Image
"
}
else
{
item
.
init
(
"
assets/play/bg_70_40.png
"
,
null
,
"
Image
"
,
()
=>
{
...
...
@@ -224,12 +221,21 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
item
.
y
=
this
.
canvasHeight
/
2
-
20
;
},
()
=>
this
.
autoSave
());
}
item
.
text
=
item
.
text
?
item
.
text
:
""
item
.
anchorX
=
0.5
;
item
.
anchorY
=
0.5
;
return
item
;
}
refreshIndexNumber
()
{
this
.
hotZoneArr
.
forEach
((
element
:
HotZoneImageItem
,
index
)
=>
{
element
.
init
(
`assets/play/hotZooCard/bg_70_40_
${
index
+
1
}
.png`
,
element
.
text
,
"
Image
"
,
()
=>
{
})
},
()
=>
this
.
autoSave
());
// this.autoSave()
}
getPicItem
(
img
,
saveData
=
null
)
{
const
item
=
new
EditorItem
(
this
.
ctx
);
...
...
@@ -265,8 +271,8 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
}
onAudioUploadSuccessByImg
(
e
,
i
mg
)
{
i
mg
.
audio_url
=
e
.
url
;
onAudioUploadSuccessByImg
(
e
,
i
tem
)
{
i
tem
.
audio_url
=
e
.
url
;
this
.
autoSave
()
}
...
...
@@ -276,6 +282,12 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
this
.
autoSave
()
}
deleteQuestionItem
(
e
,
i
)
{
this
.
bgItem
.
questions
.
splice
(
i
,
1
);
// this.refreshHotZoneId();
this
.
autoSave
()
}
init
()
{
this
.
initData
();
this
.
initCtx
();
...
...
@@ -284,8 +296,11 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
initItem
()
{
if
(
!
this
.
bgItem
)
{
this
.
bgItem
=
{};
this
.
bgItem
=
{
};
}
else
{
if
(
!
this
.
bgItem
.
questions
)
{
this
.
bgItem
.
questions
=
[]
}
this
.
refreshBackground
(()
=>
{
if
(
!
this
.
hotZoneItemArr
)
{
this
.
hotZoneItemArr
=
[];
...
...
@@ -325,6 +340,30 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
this
.
refreshHotZoneId
();
}
addQustion
()
{
this
.
bgItem
.
questions
.
push
({
number
:
2
,
combin
:
[
0
,
0
]
})
}
handleCombinLength
(
item
)
{
if
(
Number
(
item
.
number
)
>
5
){
return
}
if
(
Number
(
item
.
number
)
>
item
.
combin
.
length
)
{
let
num
=
Number
(
item
.
number
)
-
item
.
combin
.
length
for
(
var
index
=
0
;
index
<
num
;
index
++
)
{
item
.
combin
.
push
(
0
)
}
}
else
{
item
.
combin
=
item
.
combin
.
splice
(
0
,
Number
(
item
.
number
))
}
this
.
autoSave
()
console
.
log
(
item
.
combin
)
}
initImgArr
()
{
let
curBgRect
;
if
(
this
.
bg
)
{
...
...
@@ -361,6 +400,19 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
this
.
refreshImageId
();
}
getQuestionWord
(
combin
)
{
let
str
=
""
combin
.
forEach
(
element
=>
{
if
(
element
==
-
1
)
{
str
+=
this
.
bgItem
.
wordLeft_text
?
this
.
bgItem
.
wordLeft_text
:
""
;
}
else
if
(
element
==
-
2
)
{
str
+=
this
.
bgItem
.
wordRight_text
?
this
.
bgItem
.
wordRight_text
:
""
;
}
else
{
str
+=
this
.
hotZoneArr
[
element
]
&&
this
.
hotZoneArr
[
element
].
text
?
this
.
hotZoneArr
[
element
].
text
:
""
;
}
});
return
str
}
initData
()
{
this
.
canvasWidth
=
this
.
wrap
.
nativeElement
.
clientWidth
;
...
...
@@ -502,13 +554,16 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
}
changeCurItem
(
item
)
{
this
.
hideAllLineDash
();
this
.
curItem
=
item
;
this
.
curItem
.
showLineDash
();
}
handlePartChange
(
e
,
item
,
index
)
{
item
.
combin
[
index
]
=
e
console
.
log
(
item
.
combin
,
index
)
}
hideAllLineDash
()
{
for
(
let
i
=
0
;
i
<
this
.
imgArr
.
length
;
i
++
)
{
if
(
this
.
imgArr
[
i
].
picItem
)
{
...
...
@@ -690,7 +745,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
hotZoneItem
[
'
media
'
].
image_url
=
hotZoneArr
[
i
].
image_url
hotZoneItem
[
'
media
'
].
text
=
hotZoneArr
[
i
].
text
hotZoneItem
[
'
media
'
].
type
=
hotZoneArr
[
i
].
type
//
hotZoneItem['media'].audio_url = hotZoneArr[i].audio_url ? hotZoneArr[i].audio_url : ""
hotZoneItem
[
'
media
'
].
audio_url
=
hotZoneArr
[
i
].
audio_url
?
hotZoneArr
[
i
].
audio_url
:
""
// hotZoneItem['media'].card_audio_url = hotZoneArr[i].card_audio_url ? hotZoneArr[i].card_audio_url : ""
hotZoneItemArr
.
push
(
hotZoneItem
);
}
...
...
src/app/form/form.component.ts
View file @
a65352ba
...
...
@@ -80,7 +80,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
if
(
this
.
item
.
contentObj
.
bgItem
)
{
this
.
bgItem
=
this
.
item
.
contentObj
.
bgItem
;
}
else
{
this
.
bgItem
=
{}
this
.
bgItem
=
{
url
:
'
assets/play/hotZooCard/defalut_bg.png
'
}
this
.
item
.
contentObj
.
bgItem
=
this
.
bgItem
;
}
}
...
...
src/assets/play/filename.txt
View file @
a65352ba
'bg_line': 'assets/play/bg_line.png',
'bg_line_container': 'assets/play/bg_line_container.png',
'bg_sentence': 'assets/play/bg_sentence.png',
'bg_title_b': 'assets/play/bg_title_b.png',
'bg_title_c': 'assets/play/bg_title_c.png',
'bg_title_part': 'assets/play/bg_title_part.png',
'bg_white': 'assets/play/bg_white.png',
'bg_70_40': 'assets/play/bg_70_40.png',
'creatJsonProfile': 'assets/play/creatJsonProfile.py',
'filename': 'assets/play/filename.txt',
'hot-zoo-bg': 'assets/play/hot-zoo-bg.png',
'icon_audio_container': 'assets/play/icon_audio_container.png',
'icon_paly': 'assets/play/icon_paly.png',
'icon_pause': 'assets/play/icon_pause.png',
'resizeImg': 'assets/play/resizeImg.py',
'icon_laba (1)': 'assets/play/frame/icon_laba (1).png',
'icon_laba (2)': 'assets/play/frame/icon_laba (2).png',
'icon_laba (3)': 'assets/play/frame/icon_laba (3).png',
'icon_laba (4)': 'assets/play/frame/icon_laba (4).png',
'icon_labaxiao (1)': 'assets/play/frame/icon_labaxiao (1).png',
'icon_labaxiao (2)': 'assets/play/frame/icon_labaxiao (2).png',
'icon_labaxiao (3)': 'assets/play/frame/icon_labaxiao (3).png',
'correct': 'assets/play/sound/correct.mp3',
'fanhui': 'assets/play/sound/fanhui.mp3',
'shuibo': 'assets/play/sound/shuibo.mp3',
'xinyemian': 'assets/play/sound/xinyemian.mp3',
'yes': 'assets/play/sound/yes.mp3',
'1': 'assets/play/sound/1.mp3',
'2': 'assets/play/sound/2.mp3',
'3': 'assets/play/sound/3.mp3',
'check': 'assets/play/sound/check.mp3',
'fanye': 'assets/play/sound/fanye.mp3',
'jifen': 'assets/play/sound/jifen.mp3',
'kulian': 'assets/play/sound/kulian.mp3',
'putong': 'assets/play/sound/putong.mp3',
'start': 'assets/play/sound/start.mp3',
'xianshi': 'assets/play/sound/xianshi.mp3',
'xiaolian': 'assets/play/sound/xiaolian.mp3',
'xingxing': 'assets/play/sound/xingxing.mp3',
src/assets/play/hotZooCard/creatJsonProfile.py
0 → 100644
View file @
a65352ba
import
os
import
json
def
file_name
(
file_dir
):
fileList
=
[
"bg_kuang"
,
"bg_kuang2"
,
"bg_light"
]
f
=
open
(
'filename.txt'
,
'w'
);
blank
=
False
for
root
,
dirs
,
files
in
os
.
walk
(
file_dir
):
for
fileName
in
files
:
print
(
root
.
split
(
"
\\
"
)[
-
1
])
f
.
write
(
"'"
+
fileName
.
split
(
"."
)[
0
]
+
"': 'assets/hotZooCard/"
+
root
.
split
(
"
\\
"
)[
-
1
]
+
"/"
+
fileName
+
"',
\n
"
)
f
.
close
()
fileList
=
file_name
(
os
.
path
.
abspath
(
'.'
))
src/assets/play/hotZooCard/defalut_bg.png
0 → 100644
View file @
a65352ba
2.49 KB
src/assets/play/hotZooCard/filename.txt
0 → 100644
View file @
a65352ba
'bg_70_40_1': 'assets/hotZooCard/hotZooCard/bg_70_40_1.png',
'bg_70_40_10': 'assets/hotZooCard/hotZooCard/bg_70_40_10.png',
'bg_70_40_11': 'assets/hotZooCard/hotZooCard/bg_70_40_11.png',
'bg_70_40_12': 'assets/hotZooCard/hotZooCard/bg_70_40_12.png',
'bg_70_40_13': 'assets/hotZooCard/hotZooCard/bg_70_40_13.png',
'bg_70_40_14': 'assets/hotZooCard/hotZooCard/bg_70_40_14.png',
'bg_70_40_15': 'assets/hotZooCard/hotZooCard/bg_70_40_15.png',
'bg_70_40_16': 'assets/hotZooCard/hotZooCard/bg_70_40_16.png',
'bg_70_40_17': 'assets/hotZooCard/hotZooCard/bg_70_40_17.png',
'bg_70_40_18': 'assets/hotZooCard/hotZooCard/bg_70_40_18.png',
'bg_70_40_19': 'assets/hotZooCard/hotZooCard/bg_70_40_19.png',
'bg_70_40_2': 'assets/hotZooCard/hotZooCard/bg_70_40_2.png',
'bg_70_40_20': 'assets/hotZooCard/hotZooCard/bg_70_40_20.png',
'bg_70_40_21': 'assets/hotZooCard/hotZooCard/bg_70_40_21.png',
'bg_70_40_22': 'assets/hotZooCard/hotZooCard/bg_70_40_22.png',
'bg_70_40_23': 'assets/hotZooCard/hotZooCard/bg_70_40_23.png',
'bg_70_40_24': 'assets/hotZooCard/hotZooCard/bg_70_40_24.png',
'bg_70_40_25': 'assets/hotZooCard/hotZooCard/bg_70_40_25.png',
'bg_70_40_3': 'assets/hotZooCard/hotZooCard/bg_70_40_3.png',
'bg_70_40_4': 'assets/hotZooCard/hotZooCard/bg_70_40_4.png',
'bg_70_40_5': 'assets/hotZooCard/hotZooCard/bg_70_40_5.png',
'bg_70_40_6': 'assets/hotZooCard/hotZooCard/bg_70_40_6.png',
'bg_70_40_7': 'assets/hotZooCard/hotZooCard/bg_70_40_7.png',
'bg_70_40_8': 'assets/hotZooCard/hotZooCard/bg_70_40_8.png',
'bg_70_40_9': 'assets/hotZooCard/hotZooCard/bg_70_40_9.png',
'creatJsonProfile': 'assets/hotZooCard/hotZooCard/creatJsonProfile.py',
'filename': 'assets/hotZooCard/hotZooCard/filename.txt',
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