Commit bb111ffe authored by yu's avatar yu

1

parent 4eb9a32d
......@@ -767,16 +767,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
})
}
private checkWords(data) {
let words = data.result.words;
let isSuccess = true;
for (const key in words) {
if (Object.prototype.hasOwnProperty.call(words, key)) {
const element = words[key];
this.log("score: " + element.scores.overall);
if (element.scores.overall <= 40) return isSuccess = false;
const sentences = data.result.sentences;
for (let i = 0; i < sentences.length; i++) {
const details = sentences[i].details;
const isSuccess = details.some(item => item.overall <= 40);
if (isSuccess) {
return false;
}
}
return isSuccess;
return true;
}
}
......
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