|
|
@@ -203,11 +203,12 @@
|
|
|
// 仅保留必要的导入和主组件逻辑
|
|
|
import {ref, onMounted, onUnmounted, reactive, computed} from 'vue';
|
|
|
import { useRouter } from 'vue-router';
|
|
|
-import { ArrowLeftBold } from '@element-plus/icons-vue';
|
|
|
+import {ArrowLeftBold} from '@element-plus/icons-vue';
|
|
|
import * as Blockly from "blockly";
|
|
|
import 'blockly/msg/zh-hans';
|
|
|
import { javascriptGenerator } from "blockly/javascript";
|
|
|
import { pythonGenerator } from "blockly/python";
|
|
|
+import {Message} from "@/utils/message/Message.js";
|
|
|
|
|
|
// 【文生图】文生图
|
|
|
import {
|
|
|
@@ -527,6 +528,7 @@ const aiService = {
|
|
|
|
|
|
recognition.onerror = (event) => {
|
|
|
console.error("语音识别错误:", event.error);
|
|
|
+ Message().warning('请检查麦克风是否正常工作!', true);
|
|
|
showStatus("语音识别发生错误: " + event.error, 'error');
|
|
|
endRecordingStatus(); // 在识别错误时结束语音状态
|
|
|
resolve("");
|
|
|
@@ -776,7 +778,7 @@ const aiService = {
|
|
|
await this.topLampOff();
|
|
|
}
|
|
|
return isOn;
|
|
|
- }, '控制窗帘状态失败'),
|
|
|
+ }, '控制顶灯状态失败'),
|
|
|
|
|
|
// 打开顶灯
|
|
|
topLampOn: withErrorHandling('打开顶灯', async function() {
|