端口修改

This commit is contained in:
2025-12-15 14:50:29 +08:00
parent 302173f623
commit 3767150fd6
16 changed files with 52 additions and 52 deletions

View File

@@ -118,7 +118,7 @@
entryGlobalName: "shared",
name: "shared",
type: "module",
entry: "http://localhost:5000/remoteEntry.js",
entry: "http://localhost:7000/remoteEntry.js",
shareScope: "default",
}

View File

@@ -4,9 +4,9 @@
"type": "module",
"private": true,
"scripts": {
"dev": "vite --port 5003 --host",
"dev": "vite",
"build": "vue-tsc && vite build",
"preview": "vite preview --port 5003"
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.5.13",

View File

@@ -19,7 +19,7 @@ export const API_BASE_URL = (import.meta as any).env?.VITE_API_BASE_URL || '/api
* Platform URL单点登录入口
* 开发环境:
* - 通过nginx访问时使用 '/'(推荐)
* - 直接访问各服务时使用 'http://localhost:5001'
* - 直接访问各服务时使用 'http://localhost:7001'
* 生产环境:统一使用 '/'
*/
export const PLATFORM_URL = (import.meta as any).env?.VITE_PLATFORM_URL || '/'

View File

@@ -12,7 +12,7 @@
<script setup lang="ts">
const goToMainSystem = () => {
window.location.href = 'http://localhost:5002'
window.location.href = 'http://localhost:7002'
}
</script>

View File

@@ -26,7 +26,7 @@ export default defineConfig(({ mode }) => ({
shared: {
type: 'module',
name: 'shared',
entry: 'http://localhost:5000/remoteEntry.js'
entry: 'http://localhost:7000/remoteEntry.js'
}
},
shared: {
@@ -51,7 +51,7 @@ export default defineConfig(({ mode }) => ({
},
server: {
port: 5003,
port: 7003,
host: true,
cors: true,
open: '/workcase/', // 开发时自动打开到 /workcase/ 路径
@@ -63,7 +63,7 @@ export default defineConfig(({ mode }) => ({
},
// 代理共享模块请求到 shared 服务
'/shared': {
target: 'http://localhost:5000',
target: 'http://localhost:7000',
changeOrigin: true
}
}