diff --git a/.env.dev b/.env.dev index e691d2d..4d4fdee 100644 --- a/.env.dev +++ b/.env.dev @@ -2,4 +2,5 @@ FT_NODE_ENV=dev -FT_WS_URL=ws://192.168.1.199:8080/ws \ No newline at end of file +FT_WS_URL=ws://192.168.1.199:8080/ws +FT_PROXY=http://192.168.1.199:8080 \ No newline at end of file diff --git a/.env.prod b/.env.prod index f38cde4..52f3349 100644 --- a/.env.prod +++ b/.env.prod @@ -2,4 +2,5 @@ FT_NODE_ENV=prod -FT_WS_URL=ws://192.168.1.168/ws \ No newline at end of file +FT_WS_URL=ws://192.168.1.168/ws +FT_PROXY=http://192.168.1.168 \ No newline at end of file diff --git a/.env.test b/.env.test index 835ed14..bd4db42 100644 --- a/.env.test +++ b/.env.test @@ -2,4 +2,5 @@ FT_NODE_ENV=test -FT_WS_URL=ws://192.168.1.205/ws/ \ No newline at end of file +FT_WS_URL=ws://192.168.1.200:8080/ws +FT_PROXY=http://192.168.1.199:8080 \ No newline at end of file diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json index 28c8cd1..3c297f1 100644 --- a/.eslintrc-auto-import.json +++ b/.eslintrc-auto-import.json @@ -76,6 +76,7 @@ "watchEffect": true, "watchPostEffect": true, "watchSyncEffect": true, - "withModifiers": true + "withModifiers": true, + "ElNotification": true } } diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 94179d8..f6369c1 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -7,6 +7,7 @@ export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] + const ElNotification: typeof import('element-plus/es')['ElNotification'] const computed: typeof import('vue')['computed'] const createApp: typeof import('vue')['createApp'] const customRef: typeof import('vue')['customRef'] diff --git a/src/apis/system.ts b/src/apis/system.ts index ce5d19b..7b3a254 100644 --- a/src/apis/system.ts +++ b/src/apis/system.ts @@ -6,20 +6,7 @@ import http from 'libs/http' */ export const login = (params: { username: string, password: string }) => http.post('/auth/login', params) -export const getStreamData = () => fetch('/api/cmd/stream-data') -export const control = (params: any) => fetch('/api/device/front/control', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify(params), -}) +export const control = (params: any) => http.post('/function', params) -export const debugControl = (params: any) => fetch('/api/device/debug/front/control', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify(params), -}) +export const debugControl = (params: any) => http.post('/function/debug', params) diff --git a/src/components/common/FTButton/index.vue b/src/components/common/FTButton/index.vue index e2d67ff..b2f8fd1 100644 --- a/src/components/common/FTButton/index.vue +++ b/src/components/common/FTButton/index.vue @@ -1,5 +1,7 @@