mirror of
https://github.com/cool-team-official/cool-admin-midway-packages.git
synced 2025-12-11 13:52:50 +00:00
Compare commits
2 Commits
61e613bd4a
...
d7721758a5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7721758a5 | ||
|
|
bb52aea406 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cool-midway/core",
|
"name": "@cool-midway/core",
|
||||||
"version": "8.0.5",
|
"version": "8.0.7",
|
||||||
"description": "cool-admin midway core",
|
"description": "cool-admin midway core",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "index.d.ts",
|
"typings": "index.d.ts",
|
||||||
|
|||||||
@ -87,8 +87,18 @@ export class CoolConfiguration implements ILifeCycle {
|
|||||||
// 实体与路径
|
// 实体与路径
|
||||||
const eps: CoolEps = await container.getAsync(CoolEps);
|
const eps: CoolEps = await container.getAsync(CoolEps);
|
||||||
eps.init();
|
eps.init();
|
||||||
|
await this.eventInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 事件初始化
|
||||||
|
*/
|
||||||
|
async eventInit() {
|
||||||
this.coolEventManager.emit('onServerReady');
|
this.coolEventManager.emit('onServerReady');
|
||||||
this.coolEventManager.globalEmit('onServerReadyOnce', true);
|
const env = this.app.getEnv();
|
||||||
// location.clean();
|
const isMainProcess = process.env.NODE_APP_INSTANCE == '0';
|
||||||
|
if (env == 'local' || isMainProcess) {
|
||||||
|
this.coolEventManager.globalEmit('onServerReadyOnce', true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user