后台:跑马灯

This commit is contained in:
luying
2021-07-07 16:45:57 +08:00
parent a1aabfdd42
commit f45dd06621
6 changed files with 80 additions and 35 deletions
@@ -168,7 +168,18 @@ export class GmHandler {
const { code } = msg;
let systimerServers = this.app.getServersByType('systimer');
for(let { id } of systimerServers) {
await this.app.rpc.systimer.systimerRemote.setMarquee.toServer(id, code);
let result = await this.app.rpc.systimer.systimerRemote.setMarquee.toServer(id, code);
if(!result) return resResult(STATUS.GM_MARQUEE_ERR);
}
return resResult(STATUS.SUCCESS);
}
async cancelMarquee(msg: { code: string }, session: BackendSession) {
const { code } = msg;
let systimerServers = this.app.getServersByType('systimer');
for(let { id } of systimerServers) {
let result = await this.app.rpc.systimer.systimerRemote.cancelMarquee.toServer(id, code);
if(!result) return resResult(STATUS.GM_MARQUEE_CANCEL_ERR);
}
return resResult(STATUS.SUCCESS);
}