Commit deb4313b authored by Tt's avatar Tt

调整表单配置

parent b941090d
......@@ -1190,8 +1190,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 600,
"height": 400
"width": 900,
"height": 700
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1342,8 +1342,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 600,
"height": 400
"width": 900,
"height": 700
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......
......@@ -7,6 +7,18 @@
</div>
<div style="padding: 10px;">
<div style="width: 500px; margin-top: 20px; border: 1px solid #ccc; border-radius: 5px; padding: 15px;">
开始读条音频:
<app-audio-recorder
style="margin-left: 10px; "
[audioUrl]="item.startLoadingAudio"
(audioUploaded)="onAudioUploadSuccess($event, 'startLoadingAudio', item)"
></app-audio-recorder>
</div>
<div style="width: 500px; margin-top: 20px; border: 1px solid #ccc; border-radius: 5px; padding: 15px;">
猫咪开头音频:
<app-audio-recorder
......@@ -25,6 +37,58 @@
></app-audio-recorder>
</div>
</div>
<div style="padding: 10px;">
<div style="width: 500px; margin-top: 20px; border: 1px solid #ccc; border-radius: 5px; padding: 15px;">
猫咪第一音频:
<app-audio-recorder
style="margin-left: 10px; "
[audioUrl]="item.finishAudioList[0]"
(audioUploaded)="onFinishAudioUploadSuccess($event, 0)"
></app-audio-recorder>
</div>
</div>
<div style="padding: 10px;">
<div style="width: 500px; margin-top: 20px; border: 1px solid #ccc; border-radius: 5px; padding: 15px;">
猫咪第二音频:
<app-audio-recorder
style="margin-left: 10px; "
[audioUrl]="item.finishAudioList[1]"
(audioUploaded)="onFinishAudioUploadSuccess($event, 1)"
></app-audio-recorder>
</div>
</div>
<div style="padding: 10px;">
<div style="width: 500px; margin-top: 20px; border: 1px solid #ccc; border-radius: 5px; padding: 15px;">
猫咪第三音频:
<app-audio-recorder
style="margin-left: 10px; "
[audioUrl]="item.finishAudioList[2]"
(audioUploaded)="onFinishAudioUploadSuccess($event, 2)"
></app-audio-recorder>
</div>
</div>
<div style="padding: 10px;">
<div style="width: 500px; margin-top: 20px; border: 1px solid #ccc; border-radius: 5px; padding: 15px;">
猫咪第四音频:
<app-audio-recorder
style="margin-left: 10px; "
[audioUrl]="item.finishAudioList[3]"
(audioUploaded)="onFinishAudioUploadSuccess($event, 3)"
></app-audio-recorder>
</div>
</div>
<div style="padding: 10px;">
<div style="width: 500px; margin-top: 20px; border: 1px solid #ccc; border-radius: 5px; padding: 15px;">
猫咪第五音频:
<app-audio-recorder
style="margin-left: 10px; "
[audioUrl]="item.finishAudioList[4]"
(audioUploaded)="onFinishAudioUploadSuccess($event, 4)"
></app-audio-recorder>
</div>
</div>
<div style="padding: 10px;">
......
......@@ -26,6 +26,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
maxWrongNumber: 4,
startAudio: '',
endAudio: '',
startLoadingAudio: '',
finishAudioList: [],
question_arr: []
};
......@@ -56,16 +58,28 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
if (!this.item.question_arr) {
this.item.question_arr = [];
}
if (!this.item.finishAudioList) {
this.item.finishAudioList = [];
}
if (!this.item.startLoadingAudio) {
this.item.startLoadingAudio = '';
}
this.questionArr = this.item.question_arr;
}
onFinishAudioUploadSuccess(e, idx) {
this.item.finishAudioList[idx] = e.url;
this.save();
}
addQuestionBtnClick() {
this.questionArr.push({
question_audio_url: '',
option_arr: [ //选项 (多选)
],
audio_url: '',
]
})
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