小编ita*_*ish的帖子

React Native - ios设备无法连接到调试器?

我收到的错误是: Connection to http://localhost:8081/debugger-proxy?role=client timed out. Are you running node proxy? If you are running on the device, check if you have the right IP address in RCTWebSocketExecutor.m

我已经尝试从localhost更改为我的计算机的IP地址,如其他stackoverflow帖子中所述,但它似乎仍然没有工作.

xcode ios react-native

5
推荐指数
0
解决办法
899
查看次数

Sequelize实例方法不起作用?

我正在尝试使用关键字访问存储在用户实例中的密码this,但它不起作用?

这是我打电话时的代码.

Users.find({where: {$or: [{ email: email} ,{ username: username }]}})
  .then(user => {
    if (!user) return res.status(401).send(new errors.Unauthorized('Email/Username or Password Not Found!'));

    user.authenticate(password, (err, match) => {
      if (err) return res.status(401).send(err);
      res.send(user);
    });
  })
  .catch(err => res.send(err));
Run Code Online (Sandbox Code Playgroud)

这是我的实例方法的代码.

    instanceMethods :{
      authenticate: (password, cb) => {
        return bcrypt.compare(password, this.password, (err, match) => {
          if (err) return cb(new errors.Unauthorized());
          return cb(null, match);
        });
      }
    }
Run Code Online (Sandbox Code Playgroud)

javascript postgresql orm this sequelize.js

1
推荐指数
1
解决办法
464
查看次数

标签 统计

ios ×1

javascript ×1

orm ×1

postgresql ×1

react-native ×1

sequelize.js ×1

this ×1

xcode ×1