📜  环回 UserModel.setter.password 覆盖 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:59.955000             🧑  作者: Mango

代码示例1
UserModel.setter.password = function(plain) {
    //var salt = bcrypt.genSaltSync(this.constructor.settings.saltWorkFactor || SALT_WORK_FACTOR);
    //this.$password = bcrypt.hashSync(plain, salt);
    this.$password = plain;
};