后台:json上传

This commit is contained in:
luying
2021-05-12 18:56:47 +08:00
parent 2fc5017af8
commit 148a11edab
102 changed files with 1675 additions and 1117 deletions
@@ -226,10 +226,25 @@ export class EntryHandler {
// console.error('set rid for session service failed! error is : %j', err.stack);
// }
// });
session.on('closed', this.onUserLeave.bind(this));
session.on('closed', this.onGmUserLeave.bind(this));
// put user into channel
return resResult(STATUS.SUCCESS);
return resResult(STATUS.SUCCESS, {
serverType: this.app.get('serverName')
});
}
/**
* User log out handler
*
* @param {Object} app current application
* @param {Object} session current session object
*
*/
async onGmUserLeave(session: FrontendSession, reason: string) {
if (!session || !session.uid) {
return;
}
}
/**
@@ -1,6 +1,7 @@
import { Application, ChannelService, FrontendSession, pinus, RemoterClass } from 'pinus';
import { STATUS } from '../../../consts/statusCode';
import { resResult } from '../../../pubUtils/util';
import { reloadResources } from '../../../pubUtils/data';
export default function (app: Application) {
return new ConnectorRemote(app);
}
@@ -34,4 +35,11 @@ export class ConnectorRemote {
this.channelService.pushMessageByUids(route, resResult(STATUS.SUCCESS, {mails:data}), uids);
}
}
/**
* 重载json资源
*/
public async reloadResources() {
reloadResources();
}
}