Commit ccd617cb authored by Tt's avatar Tt

基本数据完成

parent d588e12a
export const defaultData = {
"questions": [{
"leftPage": {
"bgItem": {
"url": "http://staging-teach.cdn.ireadabc.com/41923549cd9d8c8034c94f1a046acb40.jpg", "rect": { "x": 102, "y": 0, "width": 928, "height": 522 }
},
"hotZoneItemArr": [{
"id": "1705242304472", "index": 0, "audio_url": "http://staging-teach.cdn.ireadabc.com/abcaf4332f90cdc4b7d1fe77f3e24e03.mp3", "itemType": "rect", "fontScale": 0.884375, "imgScale": 1, "imgSizeW": 0, "imgSizeH": 0, "mapScale": 0.884375, "dragDot": { "x": 566, "y": 261 }, "gIdx": "0", "fontSize": 50, "fontName": "ahronbd-1", "ontColor": "#8f3758", "rect": { "x": 82, "y": 91, "width": 200, "height": 200 }
}, {
"id": "1705242309178", "index": 1, "audio_url": "http://staging-teach.cdn.ireadabc.com/129d9ff4a170f4535427bf80988a1d9e.mp3", "itemType": "rect", "fontScale": 0.884375, "imgScale": 1, "imgSizeW": 0, "imgSizeH": 0, "mapScale": 0.884375, "dragDot": { "x": 566, "y": 261 }, "gIdx": "0", "fontSize": 50, "fontName": "ahronbd-1", "ontColor": "#8f3758", "rect": { "x": 356, "y": 102, "width": 200, "height": 200 }
}, {
"id": "1705242312271", "index": 2, "audio_url": "http://staging-teach.cdn.ireadabc.com/3656883821fc547da4af0253476ab9be.mp3", "itemType": "rect", "fontScale": 0.884375, "imgScale": 1, "imgSizeW": 0, "imgSizeH": 0, "mapScale": 0.884375, "dragDot": { "x": 566, "y": 261 }, "gIdx": "0", "fontSize": 50, "fontName": "ahronbd-1", "ontColor": "#8f3758", "rect": { "x": 640, "y": 98, "width": 200, "height": 200 }
}]
}, "rightPage": {
"bgItem": {
"url": "http://staging-teach.cdn.ireadabc.com/a10d1a2ae72f4ce153948ea882bf30b9.jpg", "rect": { "x": 139.28, "y": 0, "width": 853.44, "height": 522 }
},
"hotZoneItemArr": [{
"id": "1705242323890", "index": 0, "audio_url": "http://staging-teach.cdn.ireadabc.com/3656883821fc547da4af0253476ab9be.mp3", "itemType": "rect", "fontScale": 0.884375, "imgScale": 1, "imgSizeW": 0, "imgSizeH": 0, "mapScale": 0.884375, "dragDot": { "x": 566, "y": 261 }, "gIdx": "0", "fontSize": 50, "fontName": "ahronbd-1", "ontColor": "#8f3758", "rect": { "x": 48.72, "y": 49, "width": 126, "height": 126 }
}, {
"id": "1705242324374", "index": 1, "audio_url": "http://staging-teach.cdn.ireadabc.com/4fed41d4d5d49564e6c2c65efbaeefcb.mp3", "itemType": "rect", "fontScale": 0.884375, "imgScale": 1, "imgSizeW": 0, "imgSizeH": 0, "mapScale": 0.884375, "dragDot": { "x": 566, "y": 261 }, "gIdx": "0", "fontSize": 50, "fontName": "ahronbd-1", "ontColor": "#8f3758", "rect": { "x": 484.72, "y": 33, "width": 140, "height": 140 }
}, {
"id": "1705242324901", "index": 2, "audio_url": "http://staging-teach.cdn.ireadabc.com/032ce2b956871f7bc7b200d0ebbb7afc.mp3", "itemType": "rect", "fontScale": 0.884375, "imgScale": 1, "imgSizeW": 0, "imgSizeH": 0, "mapScale": 0.884375, "dragDot": { "x": 566, "y": 261 }, "gIdx": "0", "fontSize": 50, "fontName": "ahronbd-1", "ontColor": "#8f3758", "rect": { "x": 47.72, "y": 193, "width": 136, "height": 136 }
}]
}, "options": [{
"type": "img_audio", "image": "", "audio": "http://staging-teach.cdn.ireadabc.com/0a78ca4f93c66c026d1e5319baffae6e_l.mp3", "text": "test", "time": "", "right": false, "duration": 5, "content": "nice", "audioName": "eff_good_dg30_fenlei.mp3"
}, {
"type": "img", "image": "", "audio": "http://staging-teach.cdn.ireadabc.com/3656883821fc547da4af0253476ab9be_l.mp3", "text": "good", "time": "", "right": false, "duration": 5, "content": "final", "audioName": "error_dg30_fenlei.mp3"
}]
}, {
"leftPage": {
"bgItem": { "url": "http://staging-teach.cdn.ireadabc.com/ddbc929506ebd89f528a85b14611ed83.png", "rect": { "x": 0, "y": 131.13, "width": 1132, "height": 636.75 } }, "hotZoneItemArr": [{ "id": "1705242433819", "index": 0, "audio_url": "http://staging-teach.cdn.ireadabc.com/3c44b75c54a59cf176ad82faceb2fa1c.mp3", "itemType": "rect", "fontScale": 0.884375, "imgScale": 1, "imgSizeW": 0, "imgSizeH": 0, "mapScale": 0.884375, "dragDot": { "x": 566, "y": 449.5 }, "gIdx": "0", "fontSize": 50, "fontName": "ahronbd-1", "ontColor": "#8f3758", "rect": { "x": 94, "y": 149.37, "width": 200, "height": 200 } }, { "id": "1705242435146", "index": 1, "audio_url": "http://staging-teach.cdn.ireadabc.com/9754dafc00b5060dcd921d0f0832968b.mp3", "itemType": "rect", "fontScale": 0.884375, "imgScale": 1, "imgSizeW": 0, "imgSizeH": 0, "mapScale": 0.884375, "dragDot": { "x": 566, "y": 449.5 }, "gIdx": "0", "fontSize": 50, "fontName": "ahronbd-1", "ontColor": "#8f3758", "rect": { "x": 476, "y": 139.37, "width": 200, "height": 200 } }, { "id": "1705242436114", "index": 2, "audio_url": "http://staging-teach.cdn.ireadabc.com/2c383c1fce3d89070430342b36469a9c.mp3", "itemType": "rect", "fontScale": 0.884375, "imgScale": 1, "imgSizeW": 0, "imgSizeH": 0, "mapScale": 0.884375, "dragDot": { "x": 566, "y": 449.5 }, "gIdx": "0", "fontSize": 50, "fontName": "ahronbd-1", "ontColor": "#8f3758", "rect": { "x": 785, "y": 139.37, "width": 200, "height": 200 } }]
},
"rightPage": {
"bgItem": { "url": "http://staging-teach.cdn.ireadabc.com/f225a9e64c053c72b17586bf5ce21efc.png", "rect": { "x": 0, "y": 131.13, "width": 1132, "height": 636.75 } }, "hotZoneItemArr": [{ "id": "1705242449571", "index": 0, "audio_url": "http://staging-teach.cdn.ireadabc.com/0141460bd2afcab0ddef86e3055aa908.mp3", "itemType": "rect", "fontScale": 0.884375, "imgScale": 1, "imgSizeW": 0, "imgSizeH": 0, "mapScale": 0.884375, "dragDot": { "x": 566, "y": 449.5 }, "gIdx": "0", "fontSize": 50, "fontName": "ahronbd-1", "ontColor": "#8f3758", "rect": { "x": 248, "y": 398.37, "width": 200, "height": 200 } }, { "id": "1705242450733", "index": 1, "audio_url": "http://staging-teach.cdn.ireadabc.com/129d9ff4a170f4535427bf80988a1d9e.mp3", "itemType": "rect", "fontScale": 0.884375, "imgScale": 1, "imgSizeW": 0, "imgSizeH": 0, "mapScale": 0.884375, "dragDot": { "x": 566, "y": 449.5 }, "gIdx": "0", "fontSize": 50, "fontName": "ahronbd-1", "ontColor": "#8f3758", "rect": { "x": 620, "y": 442.37, "width": 200, "height": 200 } }, { "id": "1705242451202", "index": 2, "audio_url": "http://staging-teach.cdn.ireadabc.com/abcaf4332f90cdc4b7d1fe77f3e24e03.mp3", "itemType": "rect", "fontScale": 0.884375, "imgScale": 1, "imgSizeW": 0, "imgSizeH": 0, "mapScale": 0.884375, "dragDot": { "x": 566, "y": 449.5 }, "gIdx": "0", "fontSize": 50, "fontName": "ahronbd-1", "ontColor": "#8f3758", "rect": { "x": 902, "y": 445.37, "width": 200, "height": 200 } }]
},
"options": [{
"type": "img", "image": "", "audio": "http://staging-teach.cdn.ireadabc.com/2c383c1fce3d89070430342b36469a9c_l.mp3", "text": "funny", "time": "", "right": false, "duration": 5, "content": "do", "audioName": "eff_turn_dg30_fenlei.mp3"
}, {
"type": "img", "image": "", "audio": "http://staging-teach.cdn.ireadabc.com/5f4e4c72671607bb35d1ecd1d291f238_l.mp3", "text": "show", "time": "", "right": false, "duration": 5, "content": "meet", "audioName": "right_dg30_fenlei.mp3"
}]
}]
}
let m = {
"questions": [
{
"bgItem": {
......
......@@ -121,6 +121,62 @@
</div>
<div>
<div class="word-type-option-title" style="margin-top:20px;">
单词卡内容:
</div>
<div *ngFor="let option of question.options; let j = index">
<div style="display: flex;margin-top:20px">
<div class="option-title">
单词卡{{j+1}}
</div>
<div class="option-content" style="padding: 15px 30px;">
<div style="margin-top: 25px;">
<div class="option-text">
<div style="width: 200px">
<span style="font-size: 20px;">单词文本</span>
<input type="text" nz-input [(ngModel)]="option.text" (blur)="save()">
</div>
</div>
<div class="option-audio" >
<span style="font-size: 20px;">提示音频:</span>
<div style="display: flex">
<div>
<app-audio-recorder [audioUrl]="option.audio"
(audioUploaded)="onAudioUploadSuccess($event,'audio',option,'audioName')">
</app-audio-recorder>
</div>
<div style="margin: 5px">
<span>
{{ option.audioName}}
</span>
</div>
</div>
</div>
<div class="option-time">
<div class="word-type-option-title">录音倒计时: </div>
<input type="number" nz-input [(ngModel)]="option.duration" (blur)="save()">
<span style="font-size: 20px;">录音文本</span>
<input type="text" nz-input [(ngModel)]="option.content" (blur)="save()">
</div>
</div>
</div>
<div class="option-btns" style="display: flex;flex-direction: column;">
<button class="btn-red" nz-button nzType="default" nzDanger (click)="removeOption(i,j)">删除单词卡</button>
<button class="btn-blue" style="margin-top: 10px;" nz-button nzType="default" nzDanger
(click)="copyOption(i,j)">复制单词卡</button>
</div>
</div>
</div>
<div style="margin-left: 69px;margin-top: 15px;">
<button class="btn-blue" nz-button nzType="default" nzDanger (click)="addOption(i)">+增加单词卡</button>
</div>
</div>
</div><!-- 内容框体 结束 -->
......
......@@ -10,7 +10,7 @@ import { NzMessageService } from 'ng-zorro-antd';
})
export class FormComponent extends ComponentBase implements OnInit, OnChanges, OnDestroy {
// 储存数据用
saveKey = "dg_book_voice_1001";
saveKey = "dg_book_voice_1002";
/*
整体配置部分解析
......
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