端口修改
This commit is contained in:
@@ -13,18 +13,18 @@
|
||||
<script type="importmap">
|
||||
{
|
||||
"imports": {
|
||||
"@shared/components": "http://localhost:5000/shared/components.js",
|
||||
"@shared/utils": "http://localhost:5000/shared/utils.js",
|
||||
"@shared/api": "http://localhost:5000/shared/api.js",
|
||||
"@shared/composables": "http://localhost:5000/shared/composables.js",
|
||||
"@shared/types": "http://localhost:5000/shared/types.js"
|
||||
"@shared/components": "http://localhost:7000/shared/components.js",
|
||||
"@shared/utils": "http://localhost:7000/shared/utils.js",
|
||||
"@shared/api": "http://localhost:7000/shared/api.js",
|
||||
"@shared/composables": "http://localhost:7000/shared/composables.js",
|
||||
"@shared/types": "http://localhost:7000/shared/types.js"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- 预加载关键模块 -->
|
||||
<link rel="modulepreload" href="http://localhost:5000/shared/components.js">
|
||||
<link rel="modulepreload" href="http://localhost:5000/shared/utils.js">
|
||||
<link rel="modulepreload" href="http://localhost:7000/shared/components.js">
|
||||
<link rel="modulepreload" href="http://localhost:7000/shared/utils.js">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -34,7 +34,7 @@ export default defineConfig(({ mode }) => ({
|
||||
},
|
||||
|
||||
server: {
|
||||
port: 5002,
|
||||
port: 7002,
|
||||
host: true,
|
||||
cors: true,
|
||||
open: '/bidding/', // 开发时自动打开到 /bidding/ 路径
|
||||
@@ -46,7 +46,7 @@ export default defineConfig(({ mode }) => ({
|
||||
},
|
||||
// 代理共享模块请求到 shared 服务
|
||||
'/shared': {
|
||||
target: 'http://localhost:5000',
|
||||
target: 'http://localhost:7000',
|
||||
changeOrigin: true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite --port 5001 --host",
|
||||
"dev": "vite --host",
|
||||
"build": "vue-tsc && vite build",
|
||||
"preview": "vite preview --port 5001"
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"vue": "^3.5.13",
|
||||
|
||||
@@ -25,14 +25,14 @@ const menuItems: MenuItem[] = [
|
||||
key: 'bidding',
|
||||
label: '招标助手',
|
||||
icon: 'Document',
|
||||
iframeUrl: 'http://localhost:5002',
|
||||
iframeUrl: 'http://localhost:7002',
|
||||
type: 'iframe'
|
||||
},
|
||||
{
|
||||
key: 'service',
|
||||
label: '泰豪小电',
|
||||
icon: 'Service',
|
||||
iframeUrl: 'http://localhost:5003',
|
||||
iframeUrl: 'http://localhost:7003',
|
||||
type: 'iframe'
|
||||
},
|
||||
{
|
||||
@@ -100,12 +100,12 @@ interface MenuItem {
|
||||
|
||||
### 1. 招标助手 (Bidding)
|
||||
- **端口**:5002
|
||||
- **URL**:http://localhost:5002
|
||||
- **URL**:http://localhost:7002
|
||||
- **说明**:招投标业务管理系统
|
||||
|
||||
### 2. 泰豪小电 (Service)
|
||||
- **端口**:5003
|
||||
- **URL**:http://localhost:5003
|
||||
- **URL**:http://localhost:7003
|
||||
- **说明**:智能客服工单管理系统
|
||||
|
||||
### 3. 智能体编排 (Workflow)
|
||||
@@ -165,7 +165,7 @@ interface MenuItem {
|
||||
# nginx 配置
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
# 或者
|
||||
add_header Content-Security-Policy "frame-ancestors 'self' http://localhost:5001";
|
||||
add_header Content-Security-Policy "frame-ancestors 'self' http://localhost:7001";
|
||||
```
|
||||
|
||||
2. **端口配置**:确保对应服务已启动
|
||||
@@ -188,7 +188,7 @@ interface MenuItem {
|
||||
key: 'new-app',
|
||||
label: '新应用',
|
||||
icon: 'Plus',
|
||||
iframeUrl: 'http://localhost:5004',
|
||||
iframeUrl: 'http://localhost:7004',
|
||||
type: 'iframe'
|
||||
}
|
||||
```
|
||||
|
||||
@@ -25,14 +25,14 @@ const menuItems: MenuItem[] = [
|
||||
key: 'bidding',
|
||||
label: '招标助手',
|
||||
icon: 'Document',
|
||||
iframeUrl: 'http://localhost:5002',
|
||||
iframeUrl: 'http://localhost:7002',
|
||||
type: 'iframe'
|
||||
},
|
||||
{
|
||||
key: 'service',
|
||||
label: '泰豪小电',
|
||||
icon: 'Service',
|
||||
iframeUrl: 'http://localhost:5003',
|
||||
iframeUrl: 'http://localhost:7003',
|
||||
type: 'iframe'
|
||||
},
|
||||
{
|
||||
@@ -100,12 +100,12 @@ interface MenuItem {
|
||||
|
||||
### 1. 招标助手 (Bidding)
|
||||
- **端口**:5002
|
||||
- **URL**:http://localhost:5002
|
||||
- **URL**:http://localhost:7002
|
||||
- **说明**:招投标业务管理系统
|
||||
|
||||
### 2. 泰豪小电 (Service)
|
||||
- **端口**:5003
|
||||
- **URL**:http://localhost:5003
|
||||
- **URL**:http://localhost:7003
|
||||
- **说明**:智能客服工单管理系统
|
||||
|
||||
### 3. 智能体编排 (Workflow)
|
||||
@@ -165,7 +165,7 @@ interface MenuItem {
|
||||
# nginx 配置
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
# 或者
|
||||
add_header Content-Security-Policy "frame-ancestors 'self' http://localhost:5001";
|
||||
add_header Content-Security-Policy "frame-ancestors 'self' http://localhost:7001";
|
||||
```
|
||||
|
||||
2. **端口配置**:确保对应服务已启动
|
||||
@@ -188,7 +188,7 @@ interface MenuItem {
|
||||
key: 'new-app',
|
||||
label: '新应用',
|
||||
icon: 'Plus',
|
||||
iframeUrl: 'http://localhost:5004',
|
||||
iframeUrl: 'http://localhost:7004',
|
||||
type: 'iframe'
|
||||
}
|
||||
```
|
||||
|
||||
@@ -26,7 +26,7 @@ export default defineConfig({
|
||||
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({
|
||||
},
|
||||
|
||||
server: {
|
||||
port: 5001,
|
||||
port: 7001,
|
||||
host: true,
|
||||
cors: true,
|
||||
open: '/', // 开发时自动打开到根路径
|
||||
|
||||
@@ -100,7 +100,7 @@ const devConfig: AppRuntimeConfig = {
|
||||
|
||||
// 单点登录配置
|
||||
// 推荐:开发环境也通过nginx访问(http://localhost)
|
||||
// 备选:直接访问各服务端口(platformUrl: 'http://localhost:5001')
|
||||
// 备选:直接访问各服务端口(platformUrl: 'http://localhost:7001')
|
||||
sso: {
|
||||
platformUrl: '/', // 通过nginx访问platform
|
||||
workcaseUrl: '/workcase', // 通过nginx访问workcase
|
||||
|
||||
@@ -100,7 +100,7 @@ export default defineConfig({
|
||||
},
|
||||
|
||||
server: {
|
||||
port: 5000,
|
||||
port: 7000,
|
||||
strictPort: true,
|
||||
host: true,
|
||||
cors: true,
|
||||
@@ -112,7 +112,7 @@ export default defineConfig({
|
||||
},
|
||||
|
||||
preview: {
|
||||
port: 5000,
|
||||
port: 7000,
|
||||
host: true,
|
||||
cors: true,
|
||||
headers: {
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
entryGlobalName: "shared",
|
||||
name: "shared",
|
||||
type: "module",
|
||||
entry: "http://localhost:5000/remoteEntry.js",
|
||||
entry: "http://localhost:7000/remoteEntry.js",
|
||||
shareScope: "default",
|
||||
}
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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 || '/'
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
const goToMainSystem = () => {
|
||||
window.location.href = 'http://localhost:5002'
|
||||
window.location.href = 'http://localhost:7002'
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user