Commit 19c93dcc authored by Tt's avatar Tt

解决触摸问题,及页面适配问题

parent e5fd1484
This diff is collapsed.
...@@ -96,6 +96,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -96,6 +96,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
//5. 视频播放 //5. 视频播放
nextStage() { nextStage() {
this.rich_content.active = false;
const richText = this.rich_content.getComponent(cc.RichText);
richText.string = "";
// 处理下一个数 // 处理下一个数
if (!this.nextQuestion) { if (!this.nextQuestion) {
this.gameOver(); this.gameOver();
...@@ -190,7 +193,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -190,7 +193,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.recording = false; this.recording = false;
this.showTimeEnd(); this.showTimeEnd();
let testData = { let testData = {
"text": "Hello every one my name is world", "text": "yes i can blue whales qiant pandas endangered",
"audio": "https://staging-teach.cdn.ireadabc.com/6ee3ccaa831a884f02c6a75c6f647cb5.wav" "audio": "https://staging-teach.cdn.ireadabc.com/6ee3ccaa831a884f02c6a75c6f647cb5.wav"
} }
if (!courseware) { if (!courseware) {
...@@ -209,7 +212,10 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -209,7 +212,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
});//结束录音 });//结束录音
} }
recordEnd(data) { recordEnd(data) {
const keyTextArr = this.currentQuestion.keyword.split(","); let keyTextArr = this.currentQuestion.keyword.split(",");
keyTextArr = keyTextArr.map(key => {
return key.trim();
})
const dataTextArr = data.text.split(" "); const dataTextArr = data.text.split(" ");
let colorNormal = '#313131'; let colorNormal = '#313131';
...@@ -261,7 +267,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -261,7 +267,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
console.log('next') console.log('next')
if (this.recording) return; if (this.recording) return;
if (!this.nextQuestion) { if (!this.nextQuestion) {
pg.view.find(this, 'layout_game/img_question').active = false; pg.view.find(this, 'layout_game/layout_record/img_question').active = false;
this.btn_vioce.active = false; this.btn_vioce.active = false;
this.label_tip_wait.active = false; this.label_tip_wait.active = false;
this.label_tip_ing.active = false; this.label_tip_ing.active = false;
......
export const defaultData = export const defaultData =
{ {"npcAudioText":"去看影像","npcAudio":"","npcAudioName":"","npcAudioEnd":"http://teach.cdn.ireadabc.com/51cf798ecb6d6503b568650119756323_l.mp3","npcAudioEndName":"","video":"http://teach.cdn.ireadabc.com/dd6c6a4d86af226e3d4cf3c86233889c.mp4","questions":[{"img":"http://teach.cdn.ireadabc.com/22bd5eb379682e6577d7c4865ffb06f8.png","title":"The pictures show some endangered animals.Can you name any other endangered animals?","keyword":"Yes, I can, Blue whales, giant pandas, endangered","startAudio":"http://teach.cdn.ireadabc.com/7b060c020cbc36cf6d1e1c50f569df18_l.mp3","startAudioName":"","rightAudio":"http://teach.cdn.ireadabc.com/e3ab2de0acd00ccc9dc7c895d30a0f7b_l.mp3","rightAudioName":"","errorAudio":"http://teach.cdn.ireadabc.com/acd02042b5e43fafc99784efc11beae0_l.mp3","errorAudioName":"","audioName":""},{"img":"http://teach.cdn.ireadabc.com/9ff8046fa6e17f42e850e15d2de7ea56.png","title":"7545437567456","keyword":"dig, head, circle, glass, short hair","startAudio":"http://teach.cdn.ireadabc.com/9fadff1fae6245b15217aa70de36eb37_l.mp3","startAudioName":"","rightAudio":"http://teach.cdn.ireadabc.com/d41d8cd98f00b204e9800998ecf8427e_l.mp3","rightAudioName":"","errorAudio":"http://teach.cdn.ireadabc.com/acd02042b5e43fafc99784efc11beae0_l.mp3","errorAudioName":"","audioName":""}],"questionText":"","audioName":""}
let a = {
"npcTitle": "exit", "npcTitle": "exit",
"npcAudio": "", "npcAudio": "",
"npcAudioName": "", "npcAudioName": "",
......
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