Browse Source

修改接口登录code值

laiguoran 4 years ago
parent
commit
216fdfbb62
2 changed files with 2 additions and 2 deletions
  1. 1 1
      app/controller/login_controller.js
  2. 1 1
      app/middleware/api2other_check.js

+ 1 - 1
app/controller/login_controller.js

@@ -233,7 +233,7 @@ module.exports = app => {
 
             try {
                 loginType = parseInt(loginType);
-                const data = await ctx.service.project.getProjectByCode(ctx.request.body.code.toString().trim());
+                const data = await ctx.service.project.getProjectByCode(ctx.request.body.projectCode.toString().trim());
                 if (data === null) {
                     throw '不存在项目数据';
                 }

+ 1 - 1
app/middleware/api2other_check.js

@@ -17,7 +17,7 @@ module.exports = options => {
             if (maintainData.status === maintainConst.status.ongoing) {
                 throw '系统维护中~';
             }
-            const code = this.query.code || this.request.body.code;
+            const code = this.query.projectCode || this.request.body.projectCode;
             const sign = this.query.sign || this.request.body.sign;
             const time = this.query.time || this.request.body.time;
             if (!code || !sign || !time) {