Compare commits

2 Commits

Author SHA1 Message Date
eric
bd23a91a58 's' 2025-08-28 19:53:27 +08:00
eric
f6dc0091f7 's' 2025-08-28 19:49:01 +08:00
4 changed files with 11 additions and 5 deletions

0
frontend/dist/.gitkeep vendored Normal file
View File

View File

@@ -8,7 +8,7 @@
"pnpm": ">=9.0.0"
},
"scripts": {
"dev": "vite dev",
"dev": "vite dev --host 0.0.0.0",
"build": "pnpm run typecheck && vite build",
"clean": "find ./dist -maxdepth 1 -mindepth 1 ! -name '.gitkeep' -exec rm -r {} +",
"typecheck": "vue-tsc -p ./tsconfig.tsc.json --noEmit",

View File

@@ -379,7 +379,9 @@ const stopLive = async () => {
const thread_id = props.url.replace(/\//g, "_");
// 调用 FastAPI 停止接口
const res = await fetch("http://192.168.31.245:8700/stop_live", {
// const res = await fetch("http://live.local:8700/stop_live", {
const res = await fetch("http://localhost:8700/stop_live", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ thread_id }) // 如果想停止全部可以 body: {}
@@ -408,7 +410,8 @@ const startLive = async () => {
// 调用 FastAPI 后端接口
// const res = await fetch("http://live.local:8700/start_live", {
const res = await fetch("http://192.168.31.245:8700/start_live", {
const res = await fetch("http://localhost:8700/start_live", {
// const res = await fetch("http://192.168.31.245:8700/start_live", {
method: "POST",
headers: { "Content-Type": "application/json" },

View File

@@ -41,11 +41,14 @@ export default defineConfig(({ command }) => {
proxy: {
// Zero3 后端 WebSocket如果你有 ws 接口)
"/api/command": {
target: "ws://live.local:8081",
// target: "ws://live.local:8081",
target: "ws://localhost:8081",
ws: true,
},
// Zero3 后端 HTTP
"/api": "http://live.local:8081",
// "/api": "http://live.local:8081",
"/api": "http://localhost:8081",
},
},
};