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

Bug fix

parent 8fa6c8cc
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<div class="section-title" > <div class="section-title" >
正确选项 正确选项
<div style="text-align: center; float: right;"> <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> <i nz-icon nzType="plus-circle" nzTheme="outline"></i>
添加 添加
</button> </button>
...@@ -96,6 +96,14 @@ ...@@ -96,6 +96,14 @@
</nz-radio-group> </nz-radio-group>
</div> </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>
<div *ngIf="choiceItem.type=='Text'" style="display: flex; margin-bottom: 10px;"> <div *ngIf="choiceItem.type=='Text'" style="display: flex; margin-bottom: 10px;">
<div style="flex:1"> <div style="flex:1">
文字 文字
...@@ -114,14 +122,6 @@ ...@@ -114,14 +122,6 @@
</div> </div>
</div> </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)" > <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> <span>删除此选项</span>
</button> </button>
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
<div class="section-title" > <div class="section-title" >
错误选项 错误选项
<div style="text-align: center; float: right;"> <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> <i nz-icon nzType="plus-circle" nzTheme="outline"></i>
添加 添加
</button> </button>
......
...@@ -243,8 +243,8 @@ ...@@ -243,8 +243,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 40, "width": 160,
"height": 36 "height": 80
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -348,8 +348,8 @@ ...@@ -348,8 +348,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 180, "width": 165,
"height": 50.4 "height": 50
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -360,7 +360,7 @@ ...@@ -360,7 +360,7 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 1,
0, 0,
0, 0,
0, 0,
......
This diff is collapsed.
This diff is collapsed.
...@@ -112,17 +112,17 @@ cc.Class({ ...@@ -112,17 +112,17 @@ cc.Class({
getData(cb) { getData(cb) {
cb(this.getDefaultData()); cb(this.getDefaultData());
// cc.loader.load( "http://www.datalist.com.cn:8060/json/DataKey_dfzx_ppp", function( err, res) { // cc.loader.load( "http://www.datalist.com.cn:8060/json/DataKey_dfzx_ppp", function( err, res) {
// if(err) { // console.log(res)
// cb(this.getDefaultData()); // if(err) {
// } else { // cb(this.getDefaultData());
// cb(JSON.parse(res)); // } else {
// } // cb(JSON.parse(res));
// }
// }); // });
}, },
getDefaultData() { getDefaultData() {
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 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 data = JSON.parse(dataJson); const data = JSON.parse(dataJson);
return data; 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