Commit f32c8d66 authored by 李帅's avatar 李帅

+1

parent e9dcecba
/* /*
* @Author: ls * @Author: ls
* @Date: 2022-05-15 18:22:18 * @Date: 2022-05-15 18:22:18
* @LastEditTime: 2022-06-13 12:19:45 * @LastEditTime: 2022-06-13 12:36:12
* @LastEditors: ls * @LastEditors: ls
* @Description: * @Description:
* @FilePath: \ls_gramophone\assets\ls_gramophone\scene\ls_gramophone.ts * @FilePath: \ls_gramophone\assets\ls_gramophone\scene\ls_gramophone.ts
...@@ -260,17 +260,21 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -260,17 +260,21 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (window['courseware']) { if (window['courseware']) {
window['courseware'].stopTest((res) => { window['courseware'].stopTest((res) => {
this.log('--------录音返回结果 stopTest ------------'); this.log('--------录音返回结果 stopTest ------------');
this.log(res); this.log('res' + res);
this.log(`sentences录音结果${JSON.stringify(JSON.parse(res).result.sentences)}`); this.log('res.result' + res.result);
// this.log(`录音结果${JSON.stringify(JSON.parse(res).result.sentences[0])}`); this.log('res.result.sentences' + res.result.sentences);
res = JSON.parse(res);
this.log('json res' + res);
this.log('json res.result' + res.result);
this.log('json res.result.sentences' + res.result.sentences);
if (idx !== -1) { if (idx !== -1) {
let it = this.content.children[idx].getComponent(Item); let it = this.content.children[idx].getComponent(Item);
it.recorded(); it.recorded();
let arr = []; let arr = [];
for (let index = 0; index < JSON.parse(res).result.sentences.length; index++) { for (let index = 0; index < res.result.sentences.length; index++) {
let e = JSON.parse(res).result.sentences[index]; let e = res.result.sentences[index];
arr = arr.concat(e.details); arr = arr.concat(e.details);
} }
...@@ -302,9 +306,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -302,9 +306,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.resetRecord(); this.resetRecord();
if (res && JSON.parse(res).audioUrl) { if (res && res.audioUrl) {
if (idx !== -1) { if (idx !== -1) {
this._records[idx] = JSON.parse(res).audioUrl; this._records[idx] = res.audioUrl;
onHomeworkFinish(res); onHomeworkFinish(res);
} }
} }
......
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