router.post(‘/signup’, async (ctx) => {
console.log(“我进来注册了”);
const {username, password, email, code} = ctx.request.body;
//
// if (code) {
// const saveCode = await Store.hget(nodemail:${username}
, ‘code’)
// const saveExpire = await Store.hget(nodemail:${username}
, ‘expire’)
// if (code === saveCode) {
// if (new Date().getTime() - saveExpire > 0) 《大厂前端面试题解析+Web核心总结学习笔记+企业项目实战源码+最新高清讲解视频》无偿开源 徽信搜索公众号【编程进阶路】 {
// ctx.body = {
// code: -1,
// msg: ‘验证码已过期,请重新尝试’
// }
// return false
// }
// } else {
// ctx.body = {
// code: -1,
// msg: ‘请填写正确的验证码’
// }
// }
// } else {
// ctx.body = {
// code: -1,
// msg: ‘请填写验证码’