Commit 12471be7 authored by Tt's avatar Tt

修改单题无法进入bug

parent 7fab9c3b
......@@ -138,6 +138,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
let currentLayer = this.createLayer();
this.updateLayer(currentLayer, this.CurrentData)
this.layers.push(currentLayer)
if (!this.NextData) return;
let nextLayer = this.createLittleLayer();
this.updateLayer(nextLayer, this.NextData)
this.layers.push(nextLayer)
......@@ -532,6 +533,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
@property(cc.Node)
public btn_voice: cc.Node = null;
updateLayer(layer, data) {
if (!layer || !data) return;
// 根据数据来渲染
let itemBg1 = pg.view.find(layer, 'bg_1')
let itemBg2 = pg.view.find(layer, 'bg_2')
......
export const defaultData =
// {
// "recordFlag": 2,
// "title": "test",
// "questionText": "",
// "questionTextAudio": "",
// "questions": [
// {
// "questionAudio": "",
// "duration": 120,
// "options": [
// {
// "type": "img_txt_audio",
// "image": "http://staging-teach.cdn.ireadabc.com/cadf4f62024a1e932aa8c108de0d0a27.jpg",
// "audio": "http://staging-teach.cdn.ireadabc.com/f7fb9f71ab7d460ac2f78c85efba7610_l.mp3",
// "text": "This is Annie's apple tree?",
// "duration": 5,
// "content": "yes,It is Annie's apple tree.",
// "right": false,
// "imageBig": 3,
// "audioName": "btn_hy01_danci.mp3",
// npcAudio: "http://staging-teach.cdn.ireadabc.com/7f617b30a5eb2a090234920500f9c7ce_l.mp3",
// npcAudioName: "right_sn17_danci.mp3"
// }, {
// "type": "img_txt_audio",
// "image": "http://staging-teach.cdn.ireadabc.com/befdc1801d93fd95b3a8ee7c7a2d2d05.png", "audio": "http://staging-teach.cdn.ireadabc.com/43839adb578c7e01456748b8a176a0c3_l.mp3", "text": "clound in air", "duration": 10,
// "content": "clound is cloud", "right": false, "audioName": "敲碎蛋的声音.mp3", "imageBig": 2,
// npcAudio: "http://staging-teach.cdn.ireadabc.com/7f617b30a5eb2a090234920500f9c7ce_l.mp3",
// npcAudioName: "right_sn17_danci.mp3"
// }, {
// "type": "img_txt_audio", "imageBig": 1, "image": "http://staging-teach.cdn.ireadabc.com/ef1e6f871b37ad482e268809e91d20b7.png", "audio": "http://staging-teach.cdn.ireadabc.com/5f4e4c72671607bb35d1ecd1d291f238_l.mp3", "text": "", "duration": 10, "content": "", "right": false, "audioName": "excellent_dg10_ty.mp3"
// }]
// }],
// "bgAudio": "", "bgAudioName": "", "audioName": "", "npcTitle": "test",
// "npcAudio": "http://staging-teach.cdn.ireadabc.com/fd75d456ec85f8c90ffd03f1d9d8d10f_l.mp3", "npcAudioName": "tryagain_dg10_ty.mp3", "word_count": "20", "sentence_count": "11", "zi_count": "33"
// }
{
"recordFlag": 2,
"title": "test",
"recordFlag": "3",
"npcTitle": "一问一答",
"npcAudio": "http://staging-teach.cdn.ireadabc.com/b6a1ee625d8298a757e8d78bf50352ab_l.mp3",
"npcAudioName": "a apple.mp3",
"questionText": "",
"questionTextAudio": "",
"questions": [
......@@ -11,26 +48,24 @@ export const defaultData =
"options": [
{
"type": "img_txt_audio",
"image": "http://staging-teach.cdn.ireadabc.com/cadf4f62024a1e932aa8c108de0d0a27.jpg",
"audio": "http://staging-teach.cdn.ireadabc.com/f7fb9f71ab7d460ac2f78c85efba7610_l.mp3",
"text": "This is Annie's apple tree?",
"duration": 5,
"content": "yes,It is Annie's apple tree.",
"imageBig": 1,
"image": "http://staging-teach.cdn.ireadabc.com/6d78cd31a6d72ad30db6da53ddad47c6.jpeg",
"audio": "http://staging-teach.cdn.ireadabc.com/45f046740d0172760c854babde438355_l.mp3",
"text": "",
"duration": "",
"content": "",
"right": false,
"imageBig": 3,
"audioName": "btn_hy01_danci.mp3",
npcAudio: "http://staging-teach.cdn.ireadabc.com/7f617b30a5eb2a090234920500f9c7ce_l.mp3",
npcAudioName: "right_sn17_danci.mp3"
}, {
"type": "img_txt_audio",
"image": "http://staging-teach.cdn.ireadabc.com/befdc1801d93fd95b3a8ee7c7a2d2d05.png", "audio": "http://staging-teach.cdn.ireadabc.com/43839adb578c7e01456748b8a176a0c3_l.mp3", "text": "clound in air", "duration": 10,
"content": "clound is cloud", "right": false, "audioName": "敲碎蛋的声音.mp3", "imageBig": 2,
npcAudio: "http://staging-teach.cdn.ireadabc.com/7f617b30a5eb2a090234920500f9c7ce_l.mp3",
npcAudioName: "right_sn17_danci.mp3"
}, {
"type": "img_txt_audio", "imageBig": 1, "image": "http://staging-teach.cdn.ireadabc.com/ef1e6f871b37ad482e268809e91d20b7.png", "audio": "http://staging-teach.cdn.ireadabc.com/5f4e4c72671607bb35d1ecd1d291f238_l.mp3", "text": "", "duration": 10, "content": "", "right": false, "audioName": "excellent_dg10_ty.mp3"
}]
}],
"bgAudio": "", "bgAudioName": "", "audioName": "", "npcTitle": "test",
"npcAudio": "http://staging-teach.cdn.ireadabc.com/fd75d456ec85f8c90ffd03f1d9d8d10f_l.mp3", "npcAudioName": "tryagain_dg10_ty.mp3", "word_count": "20", "sentence_count": "11", "zi_count": "33"
}
"audioName": "a alligator.mp3",
"npcAudio": "http://staging-teach.cdn.ireadabc.com/651907aeee4b61ed893657c9fd8fd83d_l.mp3",
"npcAudioName": "What festival are they having?.mp3"
}
]
}
],
"bgAudio": "",
"bgAudioName": "",
"word_count": "0",
"sentence_count": "0",
"zi_count": "0",
"audioName": ""
}
\ 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