Commit 4ae7393e authored by Tt's avatar Tt

欢乐翻卡增加结束小迪

parent b15bf4e4
No preview for this file type
...@@ -366,6 +366,10 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -366,6 +366,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
showXiaodi() { showXiaodi() {
if (!this.data.npcAudioEnd) return; if (!this.data.npcAudioEnd) return;
pg.view.find(this, 'layout_xiaodi/btn_go').active = false;
this.scheduleOnce(() => {
pg.view.find(this, 'layout_xiaodi/btn_go').active = true;
}, 0.5)
pg.view.touchOn(pg.view.find(this, 'layout_xiaodi/btn_go'), this.onTouchExit, this); pg.view.touchOn(pg.view.find(this, 'layout_xiaodi/btn_go'), this.onTouchExit, this);
pg.view.setString(pg.view.find(this, 'layout_xiaodi/btn_go/txt'), this.data.npcAudioText) pg.view.setString(pg.view.find(this, 'layout_xiaodi/btn_go/txt'), this.data.npcAudioText)
pg.view.find(this, 'layout_xiaodi').active = true; pg.view.find(this, 'layout_xiaodi').active = true;
......
...@@ -93,124 +93,123 @@ ...@@ -93,124 +93,123 @@
<div style="margin: 5px"> <div style="margin: 5px">
<span>{{ item.npcAudioEndName}}</span> <span>{{ item.npcAudioEndName}}</span>
</div> </div>
</div>
</div> </div>
</div> <!-- 题目区 -->
<!-- 题目区 --> <div style=" margin: 20px;width: 1000px;">
<div style=" margin: 20px;width: 1000px;"> <div *ngFor="let question of item.questions; let i = index">
<div *ngFor="let question of item.questions; let i = index"> <div style="display: flex;margin-top: 20px;">
<div style="display: flex;margin-top: 20px;"> <div class="border-solid" style="min-width: 1000px;">
<div class="border-solid" style="min-width: 1000px;"> <div class="word-type-title">
<div class="word-type-title"> 题目{{i+1}}
题目{{i+1}}
</div>
<div class="option-audio">
<div class="word-input-title">
题目音频:
</div> </div>
<div style="display: flex"> <div class="option-audio">
<div> <div class="word-input-title">
<app-audio-recorder [audioUrl]="question.audio" 题目音频:
(audioUploaded)="onAudioUploadSuccess($event, 'audio',question,'audioName')">
</app-audio-recorder>
</div> </div>
<div style="margin: 5px"> <div style="display: flex">
<span> <div>
{{ question.audioName}} <app-audio-recorder [audioUrl]="question.audio"
</span> (audioUploaded)="onAudioUploadSuccess($event, 'audio',question,'audioName')">
</app-audio-recorder>
</div>
<div style="margin: 5px">
<span>
{{ question.audioName}}
</span>
</div>
</div> </div>
</div> </div>
</div>
<div *ngFor="let option of question.options; let m = index"> <div *ngFor="let option of question.options; let m = index">
<div style="display: flex;margin-top: 20px;"> <div style="display: flex;margin-top: 20px;">
<div class="border-dashed" style="min-width: 700px;"> <div class="border-dashed" style="min-width: 700px;">
<div style="margin-top: 20px;"> <div style="margin-top: 20px;">
<div class="word-type-option-title"> <div class="word-type-option-title">
选项类型: 选项类型:
</div> </div>
<div style="margin-top: 5px;"> <div style="margin-top: 5px;">
<nz-radio-group [(ngModel)]="option.type" (ngModelChange)="save()"> <nz-radio-group [(ngModel)]="option.type" (ngModelChange)="save()">
<label nz-radio nzValue="img"> <label nz-radio nzValue="img">
<span [style]="{color:option.type=='img' ? '#169BD5':'#000'}">图片</span> <span [style]="{color:option.type=='img' ? '#169BD5':'#000'}">图片</span>
</label> </label>
<label nz-radio nzValue="text"> <label nz-radio nzValue="text">
<span [style]="{color:option.type=='text' ? '#169BD5':'#000'}">文字</span> <span [style]="{color:option.type=='text' ? '#169BD5':'#000'}">文字</span>
</label> </label>
<label nz-radio nzValue="img_text"> <label nz-radio nzValue="img_text">
<span [style]="{color:option.type=='img_text' ? '#169BD5':'#000'}">文字+图片</span> <span [style]="{color:option.type=='img_text' ? '#169BD5':'#000'}">文字+图片</span>
</label> </label>
</nz-radio-group> </nz-radio-group>
</div>
</div> </div>
</div>
<div style="margin-top: 20px;"> <div style="margin-top: 20px;">
<div class="word-type-option-title"> <div class="word-type-option-title">
是否正确: 是否正确:
</div> </div>
<div style="margin-top: 5px;"> <div style="margin-top: 5px;">
<nz-radio-group [(ngModel)]="option.isRight" (ngModelChange)="save()"> <nz-radio-group [(ngModel)]="option.isRight" (ngModelChange)="save()">
<label nz-radio nzValue="1"> <label nz-radio nzValue="1">
<span [style]="{color:option.isRight=='1' ? '#169BD5':'#000'}">正确</span> <span [style]="{color:option.isRight=='1' ? '#169BD5':'#000'}">正确</span>
</label> </label>
<label nz-radio nzValue="0"> <label nz-radio nzValue="0">
<span [style]="{color:option.isRight=='0' ? '#169BD5':'#000'}">错误</span> <span [style]="{color:option.isRight=='0' ? '#169BD5':'#000'}">错误</span>
</label> </label>
</nz-radio-group> </nz-radio-group>
</div>
</div> </div>
</div>
<div style="margin-top: 25px;"> <div style="margin-top: 25px;">
<div class="option-img"> <div class="option-img">
<div *ngIf="option.type=='img' || option.type =='img_text'" style="width: 200px;"> <div *ngIf="option.type=='img' || option.type =='img_text'" style="width: 200px;">
<span style="font-size: 20px;">图片:</span> <span style="font-size: 20px;">图片:</span>
<app-upload-image-with-preview [picUrl]="option.image" <app-upload-image-with-preview [picUrl]="option.image"
(imageUploaded)="onImageUploadSuccess($event, 'image',option)"> (imageUploaded)="onImageUploadSuccess($event, 'image',option)">
</app-upload-image-with-preview> </app-upload-image-with-preview>
</div>
</div> </div>
</div> <div class="option-text">
<div class="option-text"> <div *ngIf="option.type=='text' || option.type =='img_text'" style="width: 200px">
<div *ngIf="option.type=='text' || option.type =='img_text'" style="width: 200px"> <span style="font-size: 20px;">文本</span>
<span style="font-size: 20px;">文本</span> <input type="text" nz-input [(ngModel)]="option.text" (blur)="save()">
<input type="text" nz-input [(ngModel)]="option.text" (blur)="save()"> </div>
</div> </div>
</div>
<!-- <div class="option-audio"> <!-- <div class="option-audio">
<span style="font-size: 20px;">选项音频:</span> <span style="font-size: 20px;">选项音频:</span>
<app-audio-recorder [audioUrl]="option.audio" <app-audio-recorder [audioUrl]="option.audio"
(audioUploaded)="onAssetUploadSuccess($event, 'questions', i, 'options', j, 'audio')"> (audioUploaded)="onAssetUploadSuccess($event, 'questions', i, 'options', j, 'audio')">
</app-audio-recorder> </app-audio-recorder>
</div> --> </div> -->
</div>
</div>
<div style="margin-left: 10px;">
<button class="btn-red" nz-button nzType="default" nzDanger (click)="removeOption(i,m)">删除选项</button>
</div> </div>
</div>
<div style="margin-left: 10px;">
<button class="btn-red" nz-button nzType="default" nzDanger (click)="removeOption(i,m)">删除选项</button>
</div> </div>
</div> </div>
<button *ngIf="question.options.length < 4" class="btn-blue" style="margin-top: 10px;" nz-button
nzType="default" nzDanger (click)="addOption(i)">增加选项</button>
</div> </div>
<button *ngIf="question.options.length < 4" class="btn-blue" style="margin-top: 10px;" nz-button
nzType="default" nzDanger (click)="addOption(i)">增加选项</button>
</div> </div>
</div>
</div> </div>
<div style="margin-top: 20px;"> <div style="margin-top: 20px;">
<button class="btn-blue" style="width: 1000px; height: 50px;" nz-button nzType="default" nzDanger <button class="btn-blue" style="width: 1000px; height: 50px;" nz-button nzType="default" nzDanger
(click)="addQuestion()">+增加题目</button> (click)="addQuestion()">+增加题目</button>
</div> </div>
<nz-modal [(nzVisible)]="isVisible" [nzTitle]="null" [nzContent]="modalContent" [nzFooter]="modalFooter" <nz-modal [(nzVisible)]="isVisible" [nzTitle]="null" [nzContent]="modalContent" [nzFooter]="modalFooter"
(nzOnCancel)="handleCancel()"> (nzOnCancel)="handleCancel()">
<ng-template #modalContent> <ng-template #modalContent>
<p>{{deleteTitle}}</p> <p>{{deleteTitle}}</p>
</ng-template> </ng-template>
<ng-template #modalFooter> <ng-template #modalFooter>
<button nz-button nzType="default" (click)="handleCancel()">取消</button> <button nz-button nzType="default" (click)="handleCancel()">取消</button>
<button nz-button nzType="primary" (click)="handleOk()">确定</button> <button nz-button nzType="primary" (click)="handleOk()">确定</button>
</ng-template> </ng-template>
</nz-modal> </nz-modal>
</div> </div>
\ No newline at end of file \ No newline at end of file
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