Commit 4d1af7fd authored by linzhiguo's avatar linzhiguo

+ 答题由后台生成

parent 706fc6c4
......@@ -65,14 +65,14 @@
<app-audio-recorder [audioUrl]="data.audio_url" (audioUploaded)="onAudioUploadSuccess($event, data, 'audio_url')" ></app-audio-recorder>
</div>
</div>
<div style="display: flex; margin-bottom: 10px;">
<!-- <div style="display: flex; margin-bottom: 10px;">
<div style="flex:1">
是否正确
</div>
<div style="flex:auto">
<label nz-checkbox [(ngModel)]="data.correct" (ngModelChange)="saveItem()" ></label>
</div>
</div>
</div> -->
</div>
......
......@@ -173,6 +173,10 @@ cc.Class({
this.title.string = this.data.title;
if (this.data.random != null){
this.data.answer = this.data.random.split(',');
}
this._start = cc.find('Canvas/start');
this._start.on('click',()=>{
......@@ -295,7 +299,14 @@ cc.Class({
}
this._aiexerciseid = info.aiexerciseid;
this.hit_result = info.correct;
//this.hit_result = info.correct;
let tmp = this.data.answer[this._mouse_index];
this.hit_result = false;
if (tmp != null){
this.hit_result = info.word == tmp.toUpperCase() || info.word == tmp.toLowerCase();
}
this._astr = info.word;
this.currentOutline(this._mouse_index);
......
......@@ -29,5 +29,6 @@ export const defaultData =
],
"title": "weioewowe",
"time": "3",
"audio_url": "http://staging-teach.cdn.ireadabc.com/738ef124b1882d10b31d59fb2fbd7eb7.mp3"
"audio_url": "http://staging-teach.cdn.ireadabc.com/738ef124b1882d10b31d59fb2fbd7eb7.mp3",
"random":"A,c,U,x,E,Y"
}
\ 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