fix: 修改微应用环境变量引入

This commit is contained in:
NICE CODE BY DEV 2024-03-13 17:12:00 +08:00
parent f5bc3fb66a
commit 397bb1e806
2 changed files with 16 additions and 23 deletions

View File

@ -7,7 +7,9 @@ export default defineConfig({
initialState: {},
layout: false,
qiankun: {
master: {},
master: {
prefetch: false,
},
},
routes: [
{

View File

@ -16,38 +16,29 @@ export function useQiankunStateForSlave() {
};
}
const env = process.env.NODE_ENV;
export const qiankun = {
apps: [
{
name: 'intelligent-file-cabinet', // 盒子管理
entry:
env === 'production'
? '//localhost:30068/intelligent-file-cabinet/'
: '//localhost:30068/',
props: {},
},
{
name: 'algorithm-warehouse', // AI 算法分析
entry:
env === 'production'
? '//localhost:30078/algorithm-warehouse/'
: '//localhost:30078/',
entry: '//localhost:30068/intelligent-file-cabinet/',
props: {
accountInfo: {
username: 'admin',
password: 'test123',
},
},
},
{
name: 'smart-video-analysis', // AI 智能分析仓
entry:
env === 'production'
? '//localhost:30088/smart-video-analysis/'
: '//localhost:30088/',
entry: '//localhost:30088/smart-video-analysis/',
},
{
name: 'algorithm-warehouse', // AI 算法分析
entry: '//localhost:30078/algorithm-warehouse/',
},
{
name: 'communal-facilities-pages', // 物料库
entry:
env === 'production'
? '//localhost:30098/communal-facilities-pages/'
: '//localhost:30098/',
entry: '//localhost:30098/communal-facilities-pages/',
},
],
lifeCycles: {