瀏覽代碼

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

lanjianrong 1 年之前
父節點
當前提交
1464ae0abc
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      app/controller/login_controller.js

+ 4 - 1
app/controller/login_controller.js

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