feat: 添加语音盒子在线烧录功能

This commit is contained in:
zhuoqinglian
2026-01-23 15:29:43 +08:00
parent b78292b270
commit 974fe6c3b7
6 changed files with 32 additions and 31 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

+3 -2
View File
@@ -4,9 +4,10 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> <link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="./favicon.ico">
<title>Xiaozhi AI Customization</title> <title>Xiaozhi AI Customization</title>
<script type="module" crossorigin src="./assets/index-FKVSBRAB.js"></script> <script type="module" crossorigin src="./assets/index-DZRFpHRV.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-NXxBVrod.css"> <link rel="stylesheet" crossorigin href="./assets/index-CrIJdTCK.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
@@ -64,7 +64,7 @@
<el-button size="mini" type="text" @click="handleUnbind(scope.row.device_id)"> <el-button size="mini" type="text" @click="handleUnbind(scope.row.device_id)">
{{ $t('device.unbind') }} {{ $t('device.unbind') }}
</el-button> </el-button>
<el-button v-if="isGenerate(scope.row)" size="mini" type="text" @click="handleGenertor"> <el-button v-if="isGenerate(scope.row)" size="mini" type="text" @click="handleGenertor(scope.row)">
{{ $t('device.deviceThemeGeneration') }} {{ $t('device.deviceThemeGeneration') }}
</el-button> </el-button>
</template> </template>
@@ -337,10 +337,10 @@ export default {
}); });
}); });
}, },
handleGenertor() { handleGenertor(row) {
const pathname = window.location.pathname; const pathname = window.location.pathname;
const basePath = pathname.split('/').slice(0, -1).join('/'); const basePath = pathname.split('/').slice(0, -1).join('/');
const url = `${window.location.origin}${basePath}/generator/`; const url = `${window.location.origin}${basePath}/generator/?deviceId=${row.device_id}`;
sessionStorage.setItem('devicePath', window.location.href); sessionStorage.setItem('devicePath', window.location.href);
window.location.href = url; window.location.href = url;
}, },
+1 -1
View File
@@ -44,7 +44,7 @@ module.exports = defineConfig({
port: 8001, // 指定端口为 8001 port: 8001, // 指定端口为 8001
proxy: { proxy: {
'/xiaozhi': { '/xiaozhi': {
target: 'http://127.0.0.1:8002', target: 'http://test.aiot.xin-nan.com',
changeOrigin: true changeOrigin: true
} }
}, },