Commit bd3618b5 authored by 李维's avatar 李维

dev done

parent 22ec6f5d
......@@ -28,11 +28,12 @@
"ali-oss": "^6.5.1",
"compressing": "^1.5.0",
"ng-zorro-antd": "^8.5.2",
"node-sass": "4.0.0",
"rxjs": "~6.5.4",
"spark-md5": "^3.0.0",
"tslib": "^1.10.0",
"zone.js": "~0.10.2",
"node-sass": "4.0.0"
"uuid": "^8.3.2",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.900.3",
......
......@@ -20,101 +20,38 @@
<app-audio-recorder id="index_audio_1" [audioUrl]="title.mainTextAudio_url" (audioUploaded)="onAudioUploadSuccess($event, 'mainTextAudio_url', title)" ></app-audio-recorder>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="2">长音频</nz-form-label>
<nz-form-control [nzSpan]="4">
<app-audio-recorder id="index_audio_1" [audioUrl]="long_audio.audio_url" (audioUploaded)="onAudioUploadSuccess($event, 'audio_url', long_audio)" ></app-audio-recorder>
</nz-form-control>
</nz-form-item>
</div>
<div class="section" style="padding: 1rem;">
<div *ngIf="dataArray.length==0" style="font-style: italic;">
请新建单词
请新建问答
</div>
<div ngfor *ngFor="let item of dataArray; let i = index" class="section-content" style="border-bottom: 1px dashed #ccc; padding-bottom: 5px; display: flex;">
<div style="flex:1">
<div class="form-item" style="margin-bottom: 10px;">
<p>
<span>序号</span>
<strong>{{i+1}}</strong>
</p>
</div>
<div class="form-item" style="margin-bottom: 10px;">
<p>
<span>音频-左</span>
<app-audio-recorder [audioUrl]="item.audio_url_left"
(audioUploaded)="onAudioUploadSuccess($event, 'audio_url_left',item)">
<div ngfor *ngFor="let item of dataArray; let i = index" class="section-content" style="border-bottom: 1px dashed #ccc; padding-bottom: 5px;">
<h3>-{{i+1}}-</h3>
<nz-form-item>
<nz-form-label [nzSpan]="2">问题</nz-form-label>
<nz-form-control [nzSpan]="12">
<textarea rows="4" nz-input [(ngModel)]="item.questionText" (blur)="saveItem()"></textarea>
</nz-form-control>
<nz-form-label [nzSpan]="2">题号</nz-form-label>
<nz-form-control [nzSpan]="8">
<app-audio-recorder [audioUrl]="item.audio_url_question"
(audioUploaded)="onAudioUploadSuccess($event, 'audio_url_question',item)">
</app-audio-recorder>
</p>
</div>
<div class="form-item" style="margin-bottom: 10px; max-width: 400px;">
<p>
<span>单词-左</span>
<input type="text" nz-input placeholder="" maxlength="3" [(ngModel)]="item.text_left" (blur)="saveItem()" />
</p>
</div>
<div class="form-item" style="margin-bottom: 10px; max-width: 400px;">
<p>
<span>图片-左</span>
<app-upload-image-with-preview [picUrl]="item.image_url_left"
(imageUploaded)="onImageUploadSuccess($event, 'image_url_left', item)"></app-upload-image-with-preview>
</p>
</div>
<div class="form-item" style="margin-bottom: 10px; max-width: 400px;">
<p>
<span>反转后图片</span>
<app-upload-image-with-preview [picUrl]="item.image_url_back" (imageUploaded)="onImageUploadSuccess($event, 'image_url_back', item)"></app-upload-image-with-preview>
</p>
</div>
<div class="form-item" style="margin-bottom: 10px; max-width: 400px;">
<button style="margin-bottom: 10px;" nz-button nzType="danger" (click)="deleteItem(i)">
<span>删除</span>
</button>
</div>
</div>
</nz-form-control>
</nz-form-item>
<div style="flex:1">
<div class="form-item" style="margin-bottom: 10px;">
<p>
<span>卡片颜色</span>
<nz-select [(ngModel)]="item.bgColorType" style="width: 150px;" (ngModelChange)="saveItem()">
<nz-option nzValue="g_g" nzLabel="左绿色-右绿色"></nz-option>
<nz-option nzValue="g_p" nzLabel="左绿色-右粉色"></nz-option>
<nz-option nzValue="p_p" nzLabel="左粉色-右粉色"></nz-option>
<nz-option nzValue="p_g" nzLabel="左粉色-右绿色"></nz-option>
</nz-select>
</p>
</div>
<div class="form-item" style="margin-bottom: 10px;">
<p>
<span>音频-右</span>
<app-audio-recorder [audioUrl]="item.audio_url_right"
(audioUploaded)="onAudioUploadSuccess($event, 'audio_url_right',item)">
<nz-form-item>
<nz-form-label [nzSpan]="2">题号</nz-form-label>
<nz-form-control [nzSpan]="12">
<textarea rows="4" nz-input [(ngModel)]="item.answerText" (blur)="saveItem()"></textarea>
</nz-form-control>
<nz-form-label [nzSpan]="2">题号</nz-form-label>
<nz-form-control [nzSpan]="8">
<app-audio-recorder [audioUrl]="item.audio_url_answer"
(audioUploaded)="onAudioUploadSuccess($event, 'audio_url_answer',item)">
</app-audio-recorder>
</p>
</div>
<div class="form-item" style="margin-bottom: 10px; max-width: 400px;">
<p>
<span>单词-右</span>
<input type="text" nz-input placeholder="" maxlength="3" [(ngModel)]="item.text_right" (blur)="saveItem()" />
</p>
</div>
<div class="form-item" style="margin-bottom: 10px; max-width: 400px;">
<p>
<span>图片-右</span>
<app-upload-image-with-preview [picUrl]="item.image_url_right"
(imageUploaded)="onImageUploadSuccess($event, 'image_url_right', item)"></app-upload-image-with-preview>
</p>
</div>
<div class="form-item" style="margin-bottom: 10px; max-width: 400px;">
<p>
<span>反转后音频</span>
<app-audio-recorder [audioUrl]="item.audio_url_back" (audioUploaded)="onAudioUploadSuccess($event, 'audio_url_back', item)" ></app-audio-recorder>
</p>
</div>
<div class="form-item" style="margin-bottom: 10px; max-width: 400px;"></div>
</div>
</div>
</nz-form-control>
</nz-form-item>
</div>
</div>
</div>
......@@ -122,7 +59,7 @@
<div class="card-item" style="padding: 0.5vw; width: 500px;">
<button nz-button [disabled]="dataArray.length>=8" nzType="primary" class="add-btn" (click)="addItem()">
<i nz-icon nzType="plus-circle" nzTheme="outline"></i>
新建词组
新建问答
</button>
</div>
......
......@@ -27,7 +27,6 @@
width: 100%;
}
.section-content{
display: flex;
margin: 5px 0 10px 0;
}
}
......
......@@ -28,9 +28,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
"mainText": "",
"mainTextAudio_url": ""
};
long_audio = {
audio_url: ""
};
@Output()
update = new EventEmitter();
......@@ -68,7 +65,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
init() {
const fields = ["dataArray", "title", "long_audio"]
const fields = ["dataArray", "title"]
if(typeof(this.item.contentObj.dataArray) == undefined || typeof(this.item.contentObj.grid) == undefined || typeof(this.item.contentObj.title) == undefined || this.item.contentObj.version != defaultData.version) {
console.log("Init defalue data")
this.item.contentObj = defaultData
......@@ -81,7 +78,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
addItem() {
this.dataArray.push({bgColorType: "", image_url_back: "", audio_url_back: "", image_url_left: "", image_url_right: "", audio_url_left: "", audio_url_right: "", text_left: "", text_right: "" })
this.dataArray.push({questionText: "", audio_url_question: "", answerText: "", audio_url_answer: ""})
this.saveItem();
}
......
......@@ -31,66 +31,81 @@
}
@font-face{
font-family: 'BRLNSDB';
src: url("../../assets/default/font/BRLNSDB.TTF") ;
}
// @font-face{
// font-family: 'BRLNSDB';
// src: url("../../assets/default/font/BRLNSDB.TTF") ;
// }
@font-face{
font-family: 'RoundedBold';
src: url("../../assets/default/font/ArialRoundedBold.otf") ;
}
// @font-face{
// font-family: 'RoundedBold';
// src: url("../../assets/default/font/ArialRoundedBold.otf") ;
// }
@font-face{
font-family: 'BRLNSB_1';
src: url("../../assets/default/font/BerlinSansFB/BRLNSB_1.TTF") ;
}
@font-face{
font-family: 'BerlinSansFBDemi-Bold';
src: url("../../assets/default/font/BerlinSansFB/BRLNSDB_1.TTF") ;
}
@font-face{
font-family: 'BRLNSR_1';
src: url("../../assets/default/font/BerlinSansFB/BRLNSR_1.TTF") ;
}
// @font-face{
// font-family: 'BRLNSB_1';
// src: url("../../assets/default/font/BerlinSansFB/BRLNSB_1.TTF") ;
// }
// @font-face{
// font-family: 'BerlinSansFBDemi-Bold';
// src: url("../../assets/default/font/BerlinSansFB/BRLNSDB_1.TTF") ;
// }
// @font-face{
// font-family: 'BRLNSR_1';
// src: url("../../assets/default/font/BerlinSansFB/BRLNSR_1.TTF") ;
// }
// @font-face{
// font-family: 'GOTHIC_1';
// src: url("../../assets/default/font/CenturyGothic/GOTHIC_1.TTF") ;
// }
// @font-face{
// font-family: 'GOTHICB_1';
// src: url("../../assets/default/font/CenturyGothic/GOTHICB_1.TTF") ;
// }
// @font-face{
// font-family: 'GOTHICBI_1';
// src: url("../../assets/default/font/CenturyGothic/GOTHICBI_1.TTF") ;
// }
// @font-face{
// font-family: 'GOTHICI_1';
// src: url("../../assets/default/font/CenturyGothic/GOTHICI_1.TTF") ;
// }
// @font-face{
// font-family: 'MMTextBook';
// src: url("../../assets/default/font/MMTextBook/MMTextBook.otf") ;
// }
// @font-face{
// font-family: 'MMTextBook-Bold';
// src: url("../../assets/default/font/MMTextBook/MMTextBook-Bold.otf") ;
// }
// @font-face{
// font-family: 'MMTextBook-BoldItalic';
// src: url("../../assets/default/font/MMTextBook/MMTextBook-BoldItalic.otf") ;
// }
// @font-face{
// font-family: 'MMTextBook-Italic';
// src: url("../../assets/default/font/MMTextBook/MMTextBook-Italic.otf") ;
// }
@font-face{
font-family: 'GOTHIC_1';
src: url("../../assets/default/font/CenturyGothic/GOTHIC_1.TTF") ;
}
@font-face{
font-family: 'GOTHICB_1';
src: url("../../assets/default/font/CenturyGothic/GOTHICB_1.TTF") ;
}
@font-face{
font-family: 'GOTHICBI_1';
src: url("../../assets/default/font/CenturyGothic/GOTHICBI_1.TTF") ;
}
@font-face{
font-family: 'GOTHICI_1';
src: url("../../assets/default/font/CenturyGothic/GOTHICI_1.TTF") ;
}
@font-face{
font-family: 'MMTextBook';
src: url("../../assets/default/font/MMTextBook/MMTextBook.otf") ;
}
@font-face{
font-family: 'MMTextBook-Bold';
src: url("../../assets/default/font/MMTextBook/MMTextBook-Bold.otf") ;
font-family: 'BRLNSDB_1';
src: url("../../assets/play/font/BRLNSDB_1.ttf") ;
}
@font-face{
font-family: 'MMTextBook-BoldItalic';
src: url("../../assets/default/font/MMTextBook/MMTextBook-BoldItalic.otf") ;
font-family: 'DFChu-W4-WIN-BF';
src: url("../../assets/play/font/DFChu-W4-WIN-BF.ttf") ;
}
@font-face{
font-family: 'MMTextBook-Italic';
src: url("../../assets/default/font/MMTextBook/MMTextBook-Italic.otf") ;
font-family: 'FuturaStd-Medium';
src: url("../../assets/play/font/FuturaStd-Medium.otf") ;
}
@font-face{
font-family: 'DFChu-W4-WIN-BF';
src: url("../../assets/play/font/DFChu-W4-WIN-BF.ttf") ;
font-family: 'GOTHICB_1';
src: url("../../assets/play/font/GOTHICB_1.ttf") ;
}
This diff is collapsed.
......@@ -41,6 +41,7 @@ const localImages = {
'slider_body': 'assets/play/slider_body.png',
'slider_bottom': 'assets/play/slider_bottom.png',
'part_number_bg': 'assets/play/part_number_bg.png',
'bg_title_part': 'assets/play/bg_title_part.png',
};
......
export const defaultData = {
version: "1.0",
dataKey: "DataKey_YM5-9",
title: {
NO: "C",
mainText: "Listen, circle and write.",
NO: "",
mainText: "",
mainTextAudio_url: "",
},
dataArray: [],
long_audio: {
audio_url: "",
}
};
export const demoData = {
version: "1.0",
dataKey: "DataKey_YM5-9",
title: {
NO: "C",
mainText: "Listen, circle and write.",
mainTextAudio_url: "",
},
title: { NO: "C", mainText: "Read and point", mainTextAudio_url: "" },
dataArray: [
{
image_url: "demo_card_image_2",
image_url_back: "demo_popup_B",
image_url_left: "demo_0001",
image_url_right: "demo_0002",
audio_url_left: "",
audio_url_right: "",
text_left: "ch",
text_right: "ph",
questionText: "Where is Mandy and Carl's backyard?",
audio_url_question: "",
answerText: "It is behind there house.",
},
{
questionText: "Where is Mandy and Carl's backyard?",
audio_url_question: "",
answerText: "It is behind there house. There is a birdbath and\na windmill next to pond.",
audio_url_answer: "",
},
{
questionText: "Where is Mandy and Carl's backyard?",
audio_url_question: "",
answerText: "It is behind there house.",
audio_url_answer: "",
},
{
questionText: "Where is Mandy and Carl's backyard?",
audio_url_question: "",
answerText: "It is behind there house.",
audio_url_answer: "",
},
{
questionText: "Where is Mandy and Carl's backyard?",
audio_url_question: "",
answerText: "It is behind there house. You can see fireflies at \nnight.",
audio_url_answer: "",
},
],
long_audio: {
audio_url: "",
}
]
};
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