Commit 28a68d4b authored by 李维's avatar 李维

Bug fix

parent 8fa6c8cc
......@@ -77,7 +77,7 @@
<div class="section-title" >
正确选项
<div style="text-align: center; float: right;">
<button nz-button nzType="primary" (click)="addChoice(item.correct)" [disabled]="(item.correct.length + item.incorrect.length)>=25" >
<button nz-button nzType="primary" (click)="addChoice(item.correct)" [disabled]="(item.correct.length + item.incorrect.length)>=30" >
<i nz-icon nzType="plus-circle" nzTheme="outline"></i>
添加
</button>
......@@ -96,6 +96,14 @@
</nz-radio-group>
</div>
</div>
<div style="display: flex; margin-bottom: 10px;">
<div style="flex:1">
音频
</div>
<div style="flex:5">
<app-audio-recorder [audioUrl]="choiceItem.audio_url" (audioUploaded)="onUploadSuccessByItem($event, choiceItem, 'audio_url')" ></app-audio-recorder>
</div>
</div>
<div *ngIf="choiceItem.type=='Text'" style="display: flex; margin-bottom: 10px;">
<div style="flex:1">
文字
......@@ -114,14 +122,6 @@
</div>
</div>
</div>
<!-- <div style="display: flex; margin-bottom: 10px;">
<div style="flex:1">
音频
</div>
<div style="flex:5">
<app-audio-recorder [audioUrl]="choiceItem.audio_url" (audioUploaded)="onUploadSuccessByItem($event, choiceItem, 'audio_url')" ></app-audio-recorder>
</div>
</div> -->
<button *ngIf="item.correct.length>1" style="margin-top: 10px; position: absolute; bottom: 10px; right: 10px;;" nz-button nzType="danger" (click)="deleteChoice(item.correct, choiceIndex)" >
<span>删除此选项</span>
</button>
......@@ -133,7 +133,7 @@
<div class="section-title" >
错误选项
<div style="text-align: center; float: right;">
<button nz-button nzType="primary" (click)="addChoice(item.incorrect)" [disabled]="(item.correct.length + item.incorrect.length)>=25" >
<button nz-button nzType="primary" (click)="addChoice(item.incorrect)" [disabled]="(item.correct.length + item.incorrect.length)>=30" >
<i nz-icon nzType="plus-circle" nzTheme="outline"></i>
添加
</button>
......
......@@ -243,8 +243,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 40,
"height": 36
"width": 160,
"height": 80
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -348,8 +348,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 180,
"height": 50.4
"width": 165,
"height": 50
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -360,7 +360,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
1,
0,
0,
0,
......
This diff is collapsed.
This diff is collapsed.
......@@ -112,17 +112,17 @@ cc.Class({
getData(cb) {
cb(this.getDefaultData());
// cc.loader.load( "http://www.datalist.com.cn:8060/json/DataKey_dfzx_ppp", function( err, res) {
// if(err) {
// cb(this.getDefaultData());
// } else {
// cb(JSON.parse(res));
// }
// console.log(res)
// if(err) {
// cb(this.getDefaultData());
// } else {
// cb(JSON.parse(res));
// }
// });
},
getDefaultData() {
const dataJson = '{"pic_url":"http://staging-teach.cdn.ireadabc.com/ed94332a503c31e0908bd4c6923a2665.png","pic_url_2":"http://staging-teach.cdn.ireadabc.com/5fb60317ade0195d35ad8034d5370a7f.png","text":"This is a test label.","audio_url":"http://staging-teach.cdn.ireadabc.com/f47f1d7b5c160fe1c59500d180346240.mp3"}'
const dataJson = '{ "contentObj": { "version": "1.0", "key": "DataKey_dfzx_ppp", "question": {}, "dataArray": [ { "correct": [ { "type": "Text", "text": "Demo", "audio_url": "", "image_url": "" } ], "incorrect": [], "audio_url1": "" } ] } }'
const data = JSON.parse(dataJson);
return data;
},
......
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