diff --git a/.gitignore b/.gitignore index 78aadb2..4a95601 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,8 @@ node_modules .pnp .pnp.js +.idea +.vscode # Turbo .turbo diff --git a/apps/l2/src/views/l2/socket/index.vue b/apps/l2/src/views/l2/socket/index.vue new file mode 100644 index 0000000..78e592f --- /dev/null +++ b/apps/l2/src/views/l2/socket/index.vue @@ -0,0 +1,637 @@ + + + + + \ No newline at end of file diff --git a/apps/l2/vue.config.js b/apps/l2/vue.config.js index 4e8e21d..fd96f0f 100644 --- a/apps/l2/vue.config.js +++ b/apps/l2/vue.config.js @@ -39,7 +39,16 @@ module.exports = { pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: '' } - } + }, + // 新增WebSocket代理配置 + // '/ws-api': { // 匹配前端WebSocket连接的路径(如ws://localhost:80/ws-api) + // target: '140.143.206.120:8089', // 目标WebSocket服务地址 + // ws: true, // 启用WebSocket代理 + // changeOrigin: true, // 改变请求源,解决跨域问题 + // pathRewrite: { + // '^/ws-api': '' // 如果目标服务不需要路径前缀,可移除 + // } + // } }, disableHostCheck: true },