File tree Expand file tree Collapse file tree 5 files changed +12
-7
lines changed Expand file tree Collapse file tree 5 files changed +12
-7
lines changed Original file line number Diff line number Diff line change
1
+ VITE_APP_WS_URL = ' ws://localhost:3333'
2
+ VITE_APP_API_URL = ' /api'
Original file line number Diff line number Diff line change
1
+ ENV = production
2
+
3
+ VITE_APP_WS_URL = ' ws://43.153.50.34:3333'
4
+ VITE_APP_API_URL = ' http://43.153.50.34:8999'
Original file line number Diff line number Diff line change @@ -67,7 +67,10 @@ const onClickSend = () => {
67
67
sendPrompt ()
68
68
}
69
69
70
- const onKeyDown = useDebounceFn ((event : Event ) => {
70
+ const onKeyDown = useDebounceFn ((event : KeyboardEvent ) => {
71
+ if (event .ctrlKey || event .metaKey || event .shiftKey ) {
72
+ return ;
73
+ }
71
74
event .stopPropagation ()
72
75
event .preventDefault ()
73
76
sendPrompt ()
Original file line number Diff line number Diff line change @@ -3,12 +3,9 @@ import Toast from '../components/Toast/index'
3
3
import { tokenStorage , userStorage } from '@/utils/storage'
4
4
import { showLoginModal } from '@/utils/index' ;
5
5
6
- // export const host = "http://localhost:8999";
7
- // export const host = "/api";
8
- export const host = "http://43.153.50.34:8999" ;
6
+ export const host = import . meta. env . VITE_APP_API_URL ;
9
7
10
8
export const $http = axios . create ( {
11
- // baseURL: host + '/api'
12
9
baseURL : host
13
10
} ) ;
14
11
Original file line number Diff line number Diff line change @@ -36,8 +36,7 @@ export const createWebsocket = (ops?: CreateWsOptions) => {
36
36
}
37
37
}
38
38
39
- const ws = wsInstance = new WebSocket ( `ws://43.153.50.34:3333` )
40
- // const ws = wsInstance = new WebSocket(`ws://localhost:3333`);
39
+ const ws = wsInstance = new WebSocket ( import . meta. env . VITE_APP_WS_URL ) ;
41
40
ws . addEventListener ( 'open' , ( event ) => {
42
41
ws . send ( JSON . stringify ( {
43
42
event : 'init'
You can’t perform that action at this time.
0 commit comments