Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sn02_playAudio
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
sn02_playAudio
Commits
d7929c87
Commit
d7929c87
authored
Sep 27, 2023
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
7fc6d2af
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
383 additions
and
187 deletions
+383
-187
sn02_playAudio.fire
assets/sn02_playAudio/scene/sn02_playAudio.fire
+226
-126
sn02_playAudio.ts
assets/sn02_playAudio/scene/sn02_playAudio.ts
+18
-7
Game_sn02_playAudio.ts
assets/sn02_playAudio/scene/tool/Game_sn02_playAudio.ts
+2
-3
defaultData_sn02_playAudio.ts
assets/sn02_playAudio/script/defaultData_sn02_playAudio.ts
+71
-32
rect_sn02_audio.png
assets/sn02_playAudio/textures/rect_sn02_audio.png
+0
-0
rect_sn02_audio.png.meta
assets/sn02_playAudio/textures/rect_sn02_audio.png.meta
+36
-0
form.component.html
form/src/app/form/form.component.html
+27
-18
form.component.ts
form/src/app/form/form.component.ts
+3
-1
No files found.
assets/sn02_playAudio/scene/sn02_playAudio.fire
View file @
d7929c87
...
...
@@ -81,19 +81,19 @@
"__id__": 25
},
{
"__id__": 6
5
"__id__": 6
7
}
],
"_active": true,
"_components": [
{
"__id__": 8
0
"__id__": 8
2
},
{
"__id__": 8
1
"__id__": 8
3
},
{
"__id__": 8
2
"__id__": 8
4
}
],
"_prefab": null,
...
...
@@ -1200,7 +1200,7 @@
"_active": true,
"_components": [
{
"__id__": 6
4
"__id__": 6
6
}
],
"_prefab": null,
...
...
@@ -1635,6 +1635,9 @@
},
{
"__id__": 62
},
{
"__id__": 64
}
],
"_active": true,
...
...
@@ -1702,7 +1705,7 @@
"__id__": 39
},
{
"__id__": 4
1
"__id__": 4
3
}
],
"_active": true,
...
...
@@ -1734,7 +1737,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-1
0,
156.973,
0,
0,
...
...
@@ -1855,16 +1858,20 @@
},
{
"__type__": "cc.Node",
"_name": "
bg_book2_shadow
",
"_name": "
New Node
",
"_objFlags": 0,
"_parent": {
"__id__": 36
},
"_children": [],
"_children": [
{
"__id__": 40
}
],
"_active": true,
"_components": [
{
"__id__": 4
0
"__id__": 4
2
}
],
"_prefab": null,
...
...
@@ -1878,8 +1885,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 3
57
,
"height":
42
0
"width": 3
30
,
"height":
39
0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -1890,8 +1897,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
6
6.682
,
-
74.899
,
6
4.283
,
-
67.988
,
0,
0,
0,
...
...
@@ -1913,56 +1920,20 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "5crAoSbnlD25nS2WStPJga"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "0775270c-6af3-4682-a459-ded33bb7a281"
},
"_type": 0,
"_sizeMode": 2,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": false,
"_atlas": null,
"_id": "90yy/ZDGpLdpUIyf8FH5UT"
"_id": "bcbHzjDYZB0KJhboCiNDHb"
},
{
"__type__": "cc.Node",
"_name": "
New Node
",
"_name": "
img
",
"_objFlags": 0,
"_parent": {
"__id__": 3
6
"__id__": 3
9
},
"_children": [
{
"__id__": 42
}
],
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
4
"__id__": 4
1
}
],
"_prefab": null,
...
...
@@ -1976,8 +1947,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 3
30
,
"height": 3
90
"width": 3
05
,
"height": 3
82
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -1988,8 +1959,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
64.28
3,
-
67.988
,
0.77
3,
-
0.385
,
0,
0,
0,
...
...
@@ -2011,20 +1982,74 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "bcbHzjDYZB0KJhboCiNDHb"
"_id": "75ShOgt21HM4AtXICxvbU4"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 40
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8cdb44ac-a3f6-449f-b354-7cd48cf84061"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "66/R5s74tP0b8j5Mx3P13F"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_spriteFrame": {
"__uuid__": "53839116-c81a-4bae-aadc-7858f0b901a4"
},
"_type": 2,
"_segments": 10000,
"_N$alphaThreshold": 1,
"_N$inverted": false,
"_id": "e7vrhRbepNiZEbK+eCnrgv"
},
{
"__type__": "cc.Node",
"_name": "
img
",
"_name": "
bg_book2_shadow
",
"_objFlags": 0,
"_parent": {
"__id__":
41
"__id__":
36
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
3
"__id__": 4
4
}
],
"_prefab": null,
...
...
@@ -2038,8 +2063,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 3
05
,
"height":
382
"width": 3
57
,
"height":
420
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -2050,8 +2075,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0.773
,
-
0.385
,
66.682
,
-
74.899
,
0,
0,
0,
...
...
@@ -2073,14 +2098,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
75ShOgt21HM4AtXICxvbU4
"
"_id": "
5crAoSbnlD25nS2WStPJga
"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
2
"__id__": 4
3
},
"_enabled": true,
"_materials": [
...
...
@@ -2091,10 +2116,10 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "
8cdb44ac-a3f6-449f-b354-7cd48cf8406
1"
"__uuid__": "
0775270c-6af3-4682-a459-ded33bb7a28
1"
},
"_type": 0,
"_sizeMode":
0
,
"_sizeMode":
2
,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
...
...
@@ -2103,31 +2128,9 @@
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode":
tru
e,
"_isTrimmedMode":
fals
e,
"_atlas": null,
"_id": "66/R5s74tP0b8j5Mx3P13F"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 41
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_spriteFrame": {
"__uuid__": "6096859d-4f11-4fd2-85b8-8edfe787679a"
},
"_type": 2,
"_segments": 10000,
"_N$alphaThreshold": 1,
"_N$inverted": false,
"_id": "e7vrhRbepNiZEbK+eCnrgv"
"_id": "90yy/ZDGpLdpUIyf8FH5UT"
},
{
"__type__": "cc.Sprite",
...
...
@@ -2209,7 +2212,7 @@
"ctor": "Float64Array",
"array": [
0,
-
305.203
,
-
255
,
0,
0,
0,
...
...
@@ -2964,7 +2967,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1
22.72
,
"width": 1
53.4
,
"height": 50.4
},
"_anchorPoint": {
...
...
@@ -2977,7 +2980,7 @@
"ctor": "Float64Array",
"array": [
61.368,
-20
9.891
,
-20
5.905
,
0,
0,
0,
...
...
@@ -3018,7 +3021,7 @@
"_dstBlendFactor": 771,
"_string": "Starter 1",
"_N$string": "Starter 1",
"_fontSize":
32
,
"_fontSize":
40
,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
...
...
@@ -3034,6 +3037,100 @@
"_N$cacheMode": 0,
"_id": "2aFSveCoVESY8tlRPklgo1"
},
{
"__type__": "cc.Node",
"_name": "btn_replay",
"_objFlags": 0,
"_parent": {
"__id__": 35
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 65
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 149,
"height": 149
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-133.055,
-26.611,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "6eR6jfBltOWJ/oNVVFwCOR"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "67b5cb1c-1405-48f3-96ed-396544fd79c8"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "93K/ZSt9pKe5KQeK2wh0S3"
},
{
"__type__": "cc.Widget",
"_name": "",
...
...
@@ -3070,7 +3167,7 @@
},
"_children": [
{
"__id__": 6
6
"__id__": 6
8
}
],
"_active": true,
...
...
@@ -3128,12 +3225,9 @@
"_name": "card1",
"_objFlags": 0,
"_parent": {
"__id__": 6
5
"__id__": 6
7
},
"_children": [
{
"__id__": 67
},
{
"__id__": 69
},
...
...
@@ -3148,12 +3242,15 @@
},
{
"__id__": 77
},
{
"__id__": 79
}
],
"_active": true,
"_components": [
{
"__id__":
79
"__id__":
81
}
],
"_prefab": null,
...
...
@@ -3209,13 +3306,13 @@
"_name": "btn_play",
"_objFlags": 0,
"_parent": {
"__id__": 6
6
"__id__": 6
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
68
"__id__":
70
}
],
"_prefab": null,
...
...
@@ -3271,7 +3368,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
7
"__id__": 6
9
},
"_enabled": true,
"_materials": [
...
...
@@ -3303,13 +3400,13 @@
"_name": "btn_stop",
"_objFlags": 0,
"_parent": {
"__id__": 6
6
"__id__": 6
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
0
"__id__": 7
2
}
],
"_prefab": null,
...
...
@@ -3365,7 +3462,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
69
"__id__":
71
},
"_enabled": true,
"_materials": [
...
...
@@ -3397,13 +3494,13 @@
"_name": "num_normal",
"_objFlags": 0,
"_parent": {
"__id__": 6
6
"__id__": 6
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
2
"__id__": 7
4
}
],
"_prefab": null,
...
...
@@ -3459,7 +3556,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
1
"__id__": 7
3
},
"_enabled": true,
"_materials": [
...
...
@@ -3492,13 +3589,13 @@
"_name": "desc_normal",
"_objFlags": 0,
"_parent": {
"__id__": 6
6
"__id__": 6
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
4
"__id__": 7
6
}
],
"_prefab": null,
...
...
@@ -3554,7 +3651,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
3
"__id__": 7
5
},
"_enabled": true,
"_materials": [
...
...
@@ -3587,13 +3684,13 @@
"_name": "num",
"_objFlags": 0,
"_parent": {
"__id__": 6
6
"__id__": 6
8
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 7
6
"__id__": 7
8
}
],
"_prefab": null,
...
...
@@ -3649,7 +3746,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
5
"__id__": 7
7
},
"_enabled": true,
"_materials": [
...
...
@@ -3682,13 +3779,13 @@
"_name": "desc",
"_objFlags": 0,
"_parent": {
"__id__": 6
6
"__id__": 6
8
},
"_children": [],
"_active": false,
"_components": [
{
"__id__":
78
"__id__":
80
}
],
"_prefab": null,
...
...
@@ -3744,7 +3841,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
7
"__id__": 7
9
},
"_enabled": true,
"_materials": [
...
...
@@ -3777,7 +3874,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
6
"__id__": 6
8
},
"_enabled": true,
"_materials": [
...
...
@@ -3866,14 +3963,17 @@
"__id__": 46
},
"card": {
"__id__": 6
6
"__id__": 6
8
},
"bg_img": {
"__id__": 4
2
"__id__": 4
0
},
"btn_playall": {
"__id__": 54
},
"btn_replay": {
"__id__": 64
},
"label_title": {
"__id__": 60
},
...
...
assets/sn02_playAudio/scene/sn02_playAudio.ts
View file @
d7929c87
...
...
@@ -85,6 +85,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
@
property
(
cc
.
Node
)
btn_playall
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
btn_replay
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
label_title
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
label_t2
:
cc
.
Node
=
null
;
...
...
@@ -164,6 +166,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
})
this
.
showLeft
();
this
.
btn_playall
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
onPlayAll
,
this
);
this
.
btn_replay
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
onReplay
,
this
);
cc
.
find
(
"
label_len
"
,
this
.
btn_playall
).
getComponent
(
cc
.
Label
).
string
=
"
(
"
+
op
.
length
+
"
)
"
;
cc
.
find
(
"
scrollView
"
,
this
.
layout_game
).
on
(
"
scroll-began
"
,
()
=>
{
this
.
playLocalAudio
(
"
gun
"
);
...
...
@@ -175,9 +178,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
if
(
this
.
isPlayAudio
)
return
;
this
.
autoPlayAudio
();
}
private
onReplay
()
{
this
.
btn_replay
.
active
=
false
;
this
.
itemIdx
=
0
;
this
.
autoPlayAudio
();
}
private
autoPlayAudio
()
{
let
op
=
Game
.
getIns
().
getCurrentPage
().
optionList
[
this
.
itemIdx
];
if
(
!
op
)
return
;
if
(
!
op
)
{
this
.
btn_replay
.
active
=
true
;
return
;
}
pg
.
audio
.
playAudioByUrl
(
Game
.
getIns
().
getCurrentPage
().
optionList
[
this
.
itemIdx
].
audioUrl
,
(
id
)
=>
{
this
.
itemAudioId
=
id
;
this
.
updateTime
();
...
...
@@ -187,7 +198,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
autoPlayAudio
();
}
});
this
.
showLeft
();
//
this.showLeft();
this
.
updateItems
();
}
private
itemAudioId
;
...
...
@@ -229,7 +240,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
});
this
.
itemIdx
=
idx
;
this
.
showLeft
();
//
this.showLeft();
this
.
updateItems
();
})
...
...
@@ -253,10 +264,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
private
showLeft
()
{
let
data
=
Game
.
getIns
().
getCurrentPage
()
.
optionList
[
this
.
itemIdx
]
;
this
.
label_title
.
getComponent
(
cc
.
Label
).
string
=
data
.
text
;
this
.
label_t2
.
getComponent
(
cc
.
Label
).
string
=
data
.
desc
;
pg
.
view
.
setNetImg
(
this
.
bg_img
,
data
.
picUrl
,
{
w
:
305
,
h
:
382
})
let
data
=
Game
.
getIns
().
getCurrentPage
();
this
.
label_title
.
getComponent
(
cc
.
Label
).
string
=
data
.
desc
;
this
.
label_t2
.
getComponent
(
cc
.
Label
).
string
=
data
.
text
;
pg
.
view
.
setNetImg
(
this
.
bg_img
,
data
.
image
,
{
w
:
305
,
h
:
382
})
}
private
itemDuration
=
0
;
private
updateTime
()
{
...
...
assets/sn02_playAudio/scene/tool/Game_sn02_playAudio.ts
View file @
d7929c87
...
...
@@ -48,7 +48,7 @@ export class Item {
public
optionList
;
public
bgItem
;
public
hotZoneItemArr
;
public
pointsArr
;
public
desc
;
public
text
:
string
;
public
isClick
:
boolean
;
public
type
;
...
...
@@ -56,8 +56,7 @@ export class Item {
constructor
(
data
,
page
)
{
this
.
audio
=
data
.
audio
;
this
.
text
=
data
.
text
;
this
.
bgItem
=
data
.
bgItem
;
this
.
hotZoneItemArr
=
data
.
hotZoneItemArr
;
this
.
desc
=
data
.
desc
;
this
.
page
=
page
;
this
.
type
=
data
.
type
||
"
txt
"
;
this
.
image
=
data
.
image
||
""
;
...
...
assets/sn02_playAudio/script/defaultData_sn02_playAudio.ts
View file @
d7929c87
...
...
@@ -2,82 +2,121 @@ export const defaultData = {
"
questions
"
:
[{
"
options
"
:
[{
"
type
"
:
"
txt
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/95df6e27bfce8b01a4250e877ba6aa3e.png
"
,
"
image
"
:
""
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/83268f4def70e408cf9243bc214592b6_l.mp3
"
,
"
text
"
:
"
startstart
"
,
"
text
"
:
"
Theme sone - Track 1
"
,
"
desc
"
:
""
,
"
audioTitle
"
:
""
,
"
time
"
:
""
,
"
right
"
:
false
,
"
audioName
"
:
"
bear_1.mp3
"
,
"
desc
"
:
"
start
"
"
audioName
"
:
"
bear_1.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/274e8acd17edf25f9fc610f650ea37a2.png
"
,
"
image
"
:
""
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/944ae51b57fb9390dd03104d9651e5f4_l.mp3
"
,
"
text
"
:
"
fast fast
"
,
"
text
"
:
"
Theme sone - Track 2
"
,
"
desc
"
:
""
,
"
audioTitle
"
:
""
,
"
time
"
:
""
,
"
right
"
:
false
,
"
audioName
"
:
"
bear_2.mp3
"
,
"
desc
"
:
"
fast
"
"
audioName
"
:
"
bear_2.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/c0bb6a1eca5c75522010a4d26c519d33.png
"
,
"
image
"
:
""
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/36067f9e2415d59fa37c3795a3929087_l.mp3
"
,
"
text
"
:
"
bbtime
"
,
"
text
"
:
"
Theme sone - Track 3
"
,
"
desc
"
:
""
,
"
audioTitle
"
:
""
,
"
time
"
:
""
,
"
right
"
:
false
,
"
audioName
"
:
"
bear_3.mp3
"
,
"
desc
"
:
"
time
"
"
audioName
"
:
"
bear_3.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/557ae63f493c63f51ee745f9b491280d.png
"
,
"
image
"
:
""
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/449e65975d358514cc3494f9f67bc012_l.mp3
"
,
"
text
"
:
"
seven seven
"
,
"
text
"
:
"
Theme sone - Track 4
"
,
"
desc
"
:
""
,
"
audioTitle
"
:
""
,
"
time
"
:
""
,
"
right
"
:
false
,
"
audioName
"
:
"
cape.mp3
"
,
"
desc
"
:
"
seven
"
"
audioName
"
:
"
cape.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/6b0f46f023aca058732e6b8a9057d3f0.png
"
,
"
image
"
:
""
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/7934cdcec68eabe639020bad5420d7f8_l.mp3
"
,
"
text
"
:
"
Theme sone - Track 5
"
,
"
desc
"
:
""
,
"
audioTitle
"
:
""
,
"
time
"
:
""
,
"
right
"
:
false
,
"
audioName
"
:
"
dsdasdsdasdsdasdsdasdsdasdsdasdsdasdsdasdsdasdsdasdsdasdsdas.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
image
"
:
""
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/c3b69ad3d51385eac7d4195773ef59f7_l.mp3
"
,
"
text
"
:
"
five five
"
,
"
text
"
:
"
Theme sone - Track 6
"
,
"
desc
"
:
""
,
"
audioTitle
"
:
""
,
"
time
"
:
""
,
"
right
"
:
false
,
"
audioName
"
:
"
极速滑雪 游戏说明.MP3
"
,
"
desc
"
:
"
five
"
"
audioName
"
:
"
极速滑雪 游戏说明.MP3
"
},
{
"
type
"
:
"
txt
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/64e428e093b15f403ade21b2d6116eb0.png
"
,
"
image
"
:
""
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/83268f4def70e408cf9243bc214592b6_l.mp3
"
,
"
text
"
:
"
time time
"
,
"
text
"
:
"
Theme sone - Track 7
"
,
"
desc
"
:
""
,
"
audioTitle
"
:
""
,
"
time
"
:
""
,
"
right
"
:
false
,
"
audioName
"
:
"
bear_1.mp3
"
,
"
desc
"
:
"
tt
"
"
audioName
"
:
"
bear_1.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/aa3966efdfbde6209523ba9781375191.png
"
,
"
image
"
:
""
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/944ae51b57fb9390dd03104d9651e5f4_l.mp3
"
,
"
text
"
:
"
ame ame
"
,
"
text
"
:
"
Theme sone - Track 8
"
,
"
desc
"
:
""
,
"
audioTitle
"
:
""
,
"
time
"
:
""
,
"
right
"
:
false
,
"
audioName
"
:
"
bear_2.mp3
"
,
"
desc
"
:
"
ame
"
"
audioName
"
:
"
bear_2.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
image
"
:
""
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/36067f9e2415d59fa37c3795a3929087_l.mp3
"
,
"
text
"
:
"
Theme sone - Track 9
"
,
"
desc
"
:
""
,
"
audioTitle
"
:
""
,
"
time
"
:
""
,
"
right
"
:
false
,
"
audioName
"
:
"
bear_3.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
image
"
:
""
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/449e65975d358514cc3494f9f67bc012_l.mp3
"
,
"
text
"
:
"
Theme sone - Track 10
"
,
"
desc
"
:
""
,
"
audioTitle
"
:
""
,
"
time
"
:
""
,
"
right
"
:
false
,
"
audioName
"
:
"
cape.mp3
"
}
],
"
type
"
:
"
txt
"
,
"
text
"
:
""
,
"
type
"
:
"
img
"
,
"
text
"
:
"
Starter 1
"
,
"
desc
"
:
"
Magic Trip Review
"
,
"
questionAudio
"
:
""
,
"
image
"
:
""
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/2acdedb9d07a738e0655b9a8aafd286a.jpg
"
,
"
contentMain
"
:
""
,
"
contentArr
"
:
[]
}
],
"
title
"
:
"
音频播放
"
,
"
time
"
:
60
,
"
opleng
"
:
7
,
"
opleng
"
:
10
,
"
word_count
"
:
"
0
"
,
"
sentence_count
"
:
"
0
"
,
"
zi_count
"
:
"
0
"
}
assets/sn02_playAudio/textures/rect_sn02_audio.png
0 → 100644
View file @
d7929c87
3.24 KB
assets/sn02_playAudio/textures/rect_sn02_audio.png.meta
0 → 100644
View file @
d7929c87
{
"ver": "2.3.5",
"uuid": "a461299f-bb6e-4313-a78f-e10cf2cad81d",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 305,
"height": 382,
"platformSettings": {},
"subMetas": {
"rect_sn02_audio": {
"ver": "1.0.4",
"uuid": "53839116-c81a-4bae-aadc-7858f0b901a4",
"rawTextureUuid": "a461299f-bb6e-4313-a78f-e10cf2cad81d",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 305,
"height": 382,
"rawWidth": 305,
"rawHeight": 382,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
form/src/app/form/form.component.html
View file @
d7929c87
...
...
@@ -110,14 +110,6 @@
</nz-radio-group>
</div> -->
</div>
<!-- <div class=" option-text">
<div class="word-input-title">
<span style="color:red;margin-left:-15px">* </span>
<span>文本: </span>
</div>
<input type="text" class="input-place-red" nz-input [(ngModel)]="question.text" placeholder=""
(blur)="save()">
</div>
<div
class=
"option-img"
>
<div>
<div
class=
"word-input-title"
>
...
...
@@ -129,15 +121,32 @@
</app-upload-image-with-preview>
</div>
</div>
</div> -->
</div>
<div
class=
" option-text"
>
<div
class=
"word-input-title"
>
<!-- <span style="color:red;margin-left:-15px">* </span> -->
<span>
封面标题:
</span>
</div>
<input
type=
"text"
class=
"input-place-red"
nz-input
[(
ngModel
)]="
question
.
text
"
placeholder=
""
(
blur
)="
save
()"
>
</div>
<div
class=
" option-text"
>
<div
class=
"word-input-title"
>
<!-- <span style="color:red;margin-left:-15px">* </span> -->
<span>
封面副标题:
</span>
</div>
<input
type=
"text"
class=
"input-place-red"
nz-input
[(
ngModel
)]="
question
.
desc
"
placeholder=
""
(
blur
)="
save
()"
>
</div>
<div
class=
"word-type-option-title"
style=
"margin-top:20px;"
>
选项
内容:
音频
内容:
</div>
<div
*
ngFor=
"let option of question.options; let j = index"
>
<div
style=
"display: flex;margin-top:20px"
>
<div
class=
"option-title"
>
选项
{{j+1}}
音频
{{j+1}}
</div>
<div
class=
"option-content"
style=
"padding: 15px 30px;"
>
<div
class=
"word-input-title"
>
...
...
@@ -185,10 +194,10 @@
</div>
</div>
</div>
<div
class=
"option-img"
>
<
!-- <
div class="option-img">
<div>
<div class="word-input-title">
图片
:
封面
:
</div>
<div style="width: 300px;">
<app-upload-image-with-preview [picUrl]="option.image"
...
...
@@ -199,17 +208,17 @@
</div>
<div *ngIf="option.type=='txt'" class="option-text">
<div class="word-input-title">
<span>
标题:
</span>
<span>
封面
标题: </span>
</div>
<input style="font-size: 22px;" class="input-place-red" type="text" nz-input
[(ngModel)]="option.text" (blur)="save()">
</div>
</div>
-->
<div
*
ngIf=
"option.type=='txt'"
class=
"option-text"
>
<div
class=
"word-input-title"
>
<span>
副标题
:
</span>
<span>
音频名称
:
</span>
</div>
<input
style=
"font-size: 22px;"
class=
"input-place-red"
type=
"text"
nz-input
[(
ngModel
)]="
option
.
desc
"
(
blur
)="
save
()"
>
[(
ngModel
)]="
option
.
text
"
(
blur
)="
save
()"
>
</div>
<!-- <div class="option-time">
<div class="word-input-title">
...
...
@@ -241,7 +250,7 @@
</div>
</div>
<div
*
ngIf=
"item.questions.length <
4
"
style=
"margin-top: 20px;"
>
<div
*
ngIf=
"item.questions.length <
1
"
style=
"margin-top: 20px;"
>
<button
class=
"btn-blue"
style=
"width: 1000px; height: 50px;"
nz-button
nzType=
"default"
nzDanger
(
click
)="
addquestion
()"
>
+增加题目
</button>
</div>
...
...
form/src/app/form/form.component.ts
View file @
d7929c87
...
...
@@ -88,6 +88,7 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
audio
:
""
,
text
:
""
,
desc
:
""
,
audioTitle
:
""
,
time
:
""
,
right
:
false
});
...
...
@@ -106,8 +107,9 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
addquestion
()
{
this
.
item
.
questions
.
push
({
options
:
[],
type
:
"
txt
"
,
type
:
"
img
"
,
text
:
""
,
desc
:
""
,
questionAudio
:
""
,
// wordAudio: "",
// wordAudioName: "",
...
...
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