Commit 318f3912 authored by Tt's avatar Tt

增加音频部分

parent a349a239
......@@ -7,17 +7,20 @@ export const defaultData = {
{
"type": "txt",
"image": "",
"text": "bird"
"text": "bird",
"audio": 'http://staging-teach.cdn.ireadabc.com/981ebff00a4717b1327b9dcd32b9ad2f_l.mp3'
},
{
"type": "img",
"image": "http://staging-teach.cdn.ireadabc.com/c62b5960641fd7cf29613cc45fb00cd6.png",
"text": ""
"text": "",
"audio": 'http://staging-teach.cdn.ireadabc.com/981ebff00a4717b1327b9dcd32b9ad2f_l.mp3'
},
{
"type": "img_txt",
"image": "http://staging-teach.cdn.ireadabc.com/a71f2b71e45ff2525714494f6edd624b.jpg",
"text": "wind"
"text": "wind",
"audio": 'http://staging-teach.cdn.ireadabc.com/981ebff00a4717b1327b9dcd32b9ad2f_l.mp3'
},
// {
// "type": "txt",
......
......@@ -180,6 +180,17 @@
<input type="text" class="input-place-red" nz-input [(ngModel)]="option.text" placeholder=""
(blur)="save()">
</div>
<span style="font-size: 20px;">音频: </span>
<div style="display:flex ;">
<div>
<app-audio-recorder [audioUrl]="option.audio"
(audioUploaded)="onAudioUploadSuccess($event, 'audio',option,'audioName')">
</app-audio-recorder>
</div>
<div style="margin: 5px">
<span>{{ option.audioName }}</span>
</div>
</div>
</div>
......
......@@ -55,7 +55,9 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
this.item.questions[i].options.push({
type: 'img',
image: '',
text: ''
text: '',
audio: '',
audioName: '',
})
this.save();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment