Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd23a91a58 | ||
|
|
f6dc0091f7 |
0
frontend/dist/.gitkeep
vendored
Normal file
0
frontend/dist/.gitkeep
vendored
Normal 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",
|
||||
|
||||
@@ -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" },
|
||||
|
||||
@@ -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",
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user