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