mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2025-12-17 05:52:50 +00:00
111
This commit is contained in:
parent
ac8b7c62fc
commit
5adf508361
@ -9,7 +9,7 @@ export default (appInfo: EggAppInfo) => {
|
|||||||
config.keys = appInfo.name + '_1611125891022_7317';
|
config.keys = appInfo.name + '_1611125891022_7317';
|
||||||
|
|
||||||
// add your config here
|
// add your config here
|
||||||
config.middleware = ['reportMiddleware'];
|
config.middleware = [];
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -20,6 +20,7 @@ export class ContainerLifeCycle implements ILifeCycle {
|
|||||||
app: Application;
|
app: Application;
|
||||||
|
|
||||||
async onReady(container?: IMidwayContainer): Promise<void> {
|
async onReady(container?: IMidwayContainer): Promise<void> {
|
||||||
|
//this.app.use(await this.app.generateMiddleware('reportMiddleware'));
|
||||||
// 格式化时间
|
// 格式化时间
|
||||||
Date.prototype.toJSON = function () {
|
Date.prototype.toJSON = function () {
|
||||||
return moment(this).format('YYYY-MM-DD HH:mm:ss');
|
return moment(this).format('YYYY-MM-DD HH:mm:ss');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user