Commit d088ed78 authored by 李维's avatar 李维

Fixed UAT feedback

parent d5eee57c
......@@ -17,7 +17,7 @@
</nz-form-control>
<nz-form-label [nzSpan]="2">标题发音</nz-form-label>
<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-item>
</div>
......@@ -37,6 +37,7 @@
<app-audio-recorder [audioUrl]="item.audio_url_question"
(audioUploaded)="onAudioUploadSuccess($event, 'audio_url_question',item)">
</app-audio-recorder>
<label nz-checkbox nzValue="Yes" [(ngModel)]="item.showIndex" (ngModelChange)="saveItem()">显示题号</label>
</nz-form-control>
</nz-form-item>
......
......@@ -78,7 +78,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
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();
}
......
......@@ -173,6 +173,7 @@ export class PlayComponent implements OnInit, OnDestroy {
// 映射预加载音频[网路]资源 返回包含音频路径的数组
mapToAduioArray(contentObj){
let array = []
contentObj.title.mainTextAudio_url && array.push(contentObj.title.mainTextAudio_url);
contentObj.dataArray.forEach(element => {
array.push(element.audio_url_answer);
array.push(element.audio_url_question);
......@@ -261,7 +262,7 @@ export class PlayComponent implements OnInit, OnDestroy {
text.ref.fontWeight = 900
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 {
sx: labelWidth*2 / w,
sy: 50*this.g_mapScale / h,
......@@ -287,7 +288,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}
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)
}
......@@ -484,7 +485,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this.render(pannel.ref, 10);
pannel.lastInserType = "Q"
pannel.windowHeight = this.g_canvasHeight - 78 * this.g_mapScale
pannel.currentY = 32;
pannel.currentY = 0;
pannel.currentQuestionIndex = -1;
pannel.insertQuestion = (text, nextQuestion = false) => {
if(nextQuestion) {
......@@ -493,7 +494,12 @@ export class PlayComponent implements OnInit, OnDestroy {
let textString = ""
let startX = 42 * this.g_mapScale;
if(nextQuestion) {
if(this.g_formData.dataArray[pannel.currentQuestionIndex].showIndex) {
textString = `${pannel.currentQuestionIndex+1}. ${text}`;
} else {
textString = `${text}`;
}
pannel.currentY += 28 * this.g_mapScale;
} else {
textString = text;
pannel.currentY -= 52 * this.g_mapScale;
......@@ -520,9 +526,9 @@ export class PlayComponent implements OnInit, OnDestroy {
let bb = label.ref.getBoundingBox();
label.ref.x = 42 * this.g_mapScale * 2 + bb.width / 2;
if(pannel.lastInserType == "Q") {
pannel.currentY -= 38 * this.g_mapScale
line.mask.ref.y -= 38 * this.g_mapScale;
line.target.ref.y -= 38 * this.g_mapScale;
pannel.currentY -= 28 * this.g_mapScale
line.mask.ref.y -= 28 * this.g_mapScale;
line.target.ref.y -= 28 * this.g_mapScale;
}
label.ref.y = pannel.currentY + 32 * this.g_mapScale / 2;
......@@ -667,6 +673,7 @@ export class PlayComponent implements OnInit, OnDestroy {
label: null,
show: null
}
line.label = this.g_cartoon.createCartoonElementLabel(`lebel-question-${index}`, text, "GOTHICB_1", "#000000", 36 * this.g_mapScale);
let bb = line.label.ref.getBoundingBox()
line.label.ref.x = startX + bb.width / 2;
......
......@@ -13,7 +13,7 @@
</style>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<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="https://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> -->
</head>
<body>
......
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