Commit be1ec04f authored by liujiaxin's avatar liujiaxin

111

parent f07b1776
...@@ -97,9 +97,9 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -97,9 +97,9 @@ export class PlayComponent implements OnInit, OnDestroy {
// 数据 // 数据
data; data;
constructor() { constructor() {
this.rightAudio.src = '/assets/right.mp3'; this.rightAudio.src = 'assets/right.mp3';
this.rightAudio.load(); this.rightAudio.load();
this.wrongAudio.src = '/assets/wrong.mp3'; this.wrongAudio.src = 'assets/wrong.mp3';
this.wrongAudio.load(); this.wrongAudio.load();
this.questionAudio.addEventListener('play', () => { this.questionAudio.addEventListener('play', () => {
this.playerState.next({ isPlaying: true }); this.playerState.next({ isPlaying: true });
...@@ -115,8 +115,33 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -115,8 +115,33 @@ export class PlayComponent implements OnInit, OnDestroy {
ngOnInit() { ngOnInit() {
this.data = { this.data = {
contentObj: {} "contentObj": {
}; "title": "ssssss",
"pic_id": "http://staging-teach.cdn.ireadabc.com/5502addf299f5f34dc181f993f81e311.png",
"options": [{
"text": "111",
"pic_id": null,
"right": false,
"type": 1
}, {
"text": "222",
"pic_id": null,
"right": true,
"type": 1
}, {
"text": "333",
"pic_id": null,
"right": false,
"type": 1
}, {
"text": "dddd",
"pic_id": null,
"right": false,
"type": 1
}],
"question_audio_id": "http://staging-teach.cdn.ireadabc.com/ab0872d9ed584c06181d41d9c7c4bf75.mp3"
}
}
this.zoomIn = false; this.zoomIn = false;
this.options = _.get(this.data.contentObj, 'options', []).map(item => { this.options = _.get(this.data.contentObj, 'options', []).map(item => {
item.state = ''; item.state = '';
......
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