liuyu 4 years ago
parent
commit
a706be005a
1 changed files with 2 additions and 3 deletions
  1. 2 3
      app/controller/weixin.js

+ 2 - 3
app/controller/weixin.js

@@ -143,13 +143,12 @@ class WeixinController extends Controller {
             },
             dataType: 'json',
           });
-          let user_;
-
+          const user_ = {};
           if (dockuser.status === 200) {
             if (dockuser.data.errcode === 0) {
               const vd = dockuser.data.res;
               console.log(vd);
-              if (vd !== null) {
+              if (vd) {
                 user_.id = vd.id;
                 user_.name = vd.adminuser;
                 user_.role = vd.role;