web-server 注册、登录、获取服务器列表;game-server token 校验

This commit is contained in:
liangtongchuan
2020-08-19 14:40:11 +08:00
parent 0458817b51
commit 940879016f
32 changed files with 1144 additions and 38 deletions

View File

@@ -3,11 +3,13 @@
import 'egg';
import ExportAccount from '../../../app/controller/account';
import ExportGame from '../../../app/controller/game';
import ExportHome from '../../../app/controller/home';
declare module 'egg' {
interface IController {
account: ExportAccount;
game: ExportGame;
home: ExportHome;
}
}

View File

@@ -0,0 +1,13 @@
// This file is created by egg-ts-helper@1.25.8
// Do not modify this file!!!!!!!!!
import 'egg';
import ExportParmsDecode from '../../../app/middleware/parmsDecode';
import ExportTokenParser from '../../../app/middleware/tokenParser';
declare module 'egg' {
interface IMiddleware {
parmsDecode: typeof ExportParmsDecode;
tokenParser: typeof ExportTokenParser;
}
}

View File

@@ -6,12 +6,16 @@ type AnyClass = new (...args: any[]) => any;
type AnyFunc<T = any> = (...args: any[]) => T;
type CanExportFunc = AnyFunc<Promise<any>> | AnyFunc<IterableIterator<any>>;
type AutoInstanceType<T, U = T extends CanExportFunc ? T : T extends AnyFunc ? ReturnType<T> : T> = U extends AnyClass ? InstanceType<U> : U;
import ExportAuth from '../../../app/service/Auth';
import ExportTest from '../../../app/service/Test';
import ExportTurboCore from '../../../app/service/TurboCore';
import ExportUtils from '../../../app/service/Utils';
declare module 'egg' {
interface IService {
auth: AutoInstanceType<typeof ExportAuth>;
test: AutoInstanceType<typeof ExportTest>;
turboCore: AutoInstanceType<typeof ExportTurboCore>;
utils: AutoInstanceType<typeof ExportUtils>;
}
}