Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd23a91a58 |
@@ -8,7 +8,7 @@
|
|||||||
"pnpm": ">=9.0.0"
|
"pnpm": ">=9.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite dev",
|
"dev": "vite dev --host 0.0.0.0",
|
||||||
"build": "pnpm run typecheck && vite build",
|
"build": "pnpm run typecheck && vite build",
|
||||||
"clean": "find ./dist -maxdepth 1 -mindepth 1 ! -name '.gitkeep' -exec rm -r {} +",
|
"clean": "find ./dist -maxdepth 1 -mindepth 1 ! -name '.gitkeep' -exec rm -r {} +",
|
||||||
"typecheck": "vue-tsc -p ./tsconfig.tsc.json --noEmit",
|
"typecheck": "vue-tsc -p ./tsconfig.tsc.json --noEmit",
|
||||||
|
|||||||
@@ -379,7 +379,9 @@ const stopLive = async () => {
|
|||||||
const thread_id = props.url.replace(/\//g, "_");
|
const thread_id = props.url.replace(/\//g, "_");
|
||||||
|
|
||||||
// 调用 FastAPI 停止接口
|
// 调用 FastAPI 停止接口
|
||||||
const res = await fetch("http://live.local:8700/stop_live", {
|
// const res = await fetch("http://live.local:8700/stop_live", {
|
||||||
|
const res = await fetch("http://localhost:8700/stop_live", {
|
||||||
|
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify({ thread_id }) // 如果想停止全部可以 body: {}
|
body: JSON.stringify({ thread_id }) // 如果想停止全部可以 body: {}
|
||||||
@@ -407,7 +409,8 @@ const startLive = async () => {
|
|||||||
console.log('file_path',file_path)
|
console.log('file_path',file_path)
|
||||||
|
|
||||||
// 调用 FastAPI 后端接口
|
// 调用 FastAPI 后端接口
|
||||||
const res = await fetch("http://live.local:8700/start_live", {
|
// const res = await fetch("http://live.local:8700/start_live", {
|
||||||
|
const res = await fetch("http://localhost:8700/start_live", {
|
||||||
// const res = await fetch("http://192.168.31.245:8700/start_live", {
|
// const res = await fetch("http://192.168.31.245:8700/start_live", {
|
||||||
|
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|||||||
@@ -41,11 +41,14 @@ export default defineConfig(({ command }) => {
|
|||||||
proxy: {
|
proxy: {
|
||||||
// Zero3 后端 WebSocket(如果你有 ws 接口)
|
// Zero3 后端 WebSocket(如果你有 ws 接口)
|
||||||
"/api/command": {
|
"/api/command": {
|
||||||
target: "ws://live.local:8081",
|
// target: "ws://live.local:8081",
|
||||||
|
target: "ws://localhost:8081",
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
// Zero3 后端 HTTP
|
// Zero3 后端 HTTP
|
||||||
"/api": "http://live.local:8081",
|
// "/api": "http://live.local:8081",
|
||||||
|
"/api": "http://localhost:8081",
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user