Koa+Taro搭建CMS

登录功能

使用 POST 请求

用户认证

注册功能

验证码

1
2
3
4
5
6
7
8
9
10
const svgCaptcha = require('svg-captcha');

// 生成验证码
const captcha = svgCaptcha.create();

router.get('/signup', async (ctx, next) => {
ctx.status = 200;
ctx.type = 'svg';
ctx.body = captcha.data;
})

dashboard