Commit d1bc94ee by 前端

优化对练

1 parent fc2652d8
......@@ -83,10 +83,6 @@ Page({
Sentences = [...Sentences, ...i.Sentences?i.Sentences:[]]
}
});
if(Sentences.length == 0) {
wx.$util.showToast("对话内容太少");
return;
}
if (isJump) {
return this.back();
}
......@@ -94,6 +90,10 @@ Page({
wx.$util.showToast("AI还未回复");
return;
}
if(Sentences.length == 0) {
wx.$util.showToast("对话内容太短");
return;
}
const chatList = JSON.stringify(audioBox.data.list);
wx.setStorageSync("chatList", chatList);
const {
......@@ -144,6 +144,7 @@ Page({
wx.$util.showToast("语音还未识别");
return;
}
this.data.isSend = false;
const addVal = {
role: 1,
content: "",
......@@ -156,6 +157,7 @@ Page({
message
})
const content = Phrases.similar_words
this.data.isSend = true;
audioBox.setList({
content,
times: Math.ceil(content.length / 4),
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!