lrf před 10 měsíci
rodič
revize
ed115cc201
2 změnil soubory, kde provedl 0 přidání a 37 odebrání
  1. 0 9
      README.md
  2. 0 28
      src/middleware/checkOnePointLogin.middleware.ts

+ 0 - 9
README.md

@@ -4,12 +4,3 @@
 * 1.不需要登录就可以使用的接口: 请求函数的方法注解参数添加 description: 'ignore'即可
 
 ## controller 中 controllerCode 为 前端菜单管理中 route_name(路由名称的编码) 
-
-
-## 未完成:
-- 1.数据流加密:
-    1.生成密钥对
-    2.前端对 随机字符串 进行公钥加密作为header中某字段. 再使用某字段 进行 将公钥加密的 随机字符串带到请求中
-    3.使用 未加密 的随机字符串 对 数据进行加密, 然后作为参数发送
-- 2.配置文件外置共用
-- 3.数据分级(需要与业务绑定)

+ 0 - 28
src/middleware/checkOnePointLogin.middleware.ts

@@ -1,28 +0,0 @@
-import { IMiddleware, Inject, MidwayWebRouterService } from '@midwayjs/core';
-import { Middleware } from '@midwayjs/decorator';
-import { NextFunction, Context } from '@midwayjs/koa';
-import { LoginService } from '../service/login.service';
-
-@Middleware()
-export class CheckOnePointLoginMiddleware implements IMiddleware<Context, NextFunction> {
-  @Inject()
-  webRouterService: MidwayWebRouterService;
-  resolve() {
-    return async (ctx: Context, next: NextFunction) => {
-      const routeInfo = await this.webRouterService.getMatchedRouterInfo(ctx.path, ctx.method);
-      if(!routeInfo) {
-        await next()
-        return
-      }
-      const desc = routeInfo.description;
-      // if (desc !== 'ignore') {
-      //   const loginService = await ctx.requestContext.getAsync(LoginService);
-      //   await loginService.onePointCheck();
-      // }
-      await next();
-    };
-  }
-  static getName(): string {
-    return 'checkOnePonitLogin';
-  }
-}