Browse Source

fix: (项目管理) 验证账号密码语法问题报错

lanjianrong 1 year ago
parent
commit
1464ae0abc
1 changed files with 4 additions and 1 deletions
  1. 4 1
      app/controller/login_controller.js

+ 4 - 1
app/controller/login_controller.js

@@ -598,7 +598,10 @@ module.exports = app => {
             msg: '',
           };
           try {
-            const { code, account, password} = ctx?.data || {}
+            if (!ctx.data) {
+              throw '参数有误';
+            }
+            const { code, account, password} = ctx.data;
             if (!code || !account || !password) {
               throw '参数有误';
             }