recherche

Maison  >  Questions et réponses  >  le corps du texte

schema.pre('save', cb){..}不起作用

就是想用bcryptjs做个加密

结果数据里面还是返回未加密的密码

新手不是很懂啊

wKioL1gquUnA2iquAADM6BeOegg095.png-wh_651x-s_3494154119.png

wKioL1gquUnA2iquAADM6BeOegg095.png-wh_651x-s_3494154119.png

高洛峰高洛峰3017 Il y a quelques jours849

répondre à tous(1)je répondrai

  • 三叔

    三叔2016-11-16 13:33:52

    <p>你把next()移动到this.password = bash;后面</p>

    répondre
    0
  • Annulerrépondre