bem-captcha
v3.0.0
Published
captcha generator
Downloads
12
Readme
var captcha = yield Captcha.get(config);
config
redisHost: redis服务地址, 默认是localhost
redisPort: redis服务端口, 默认是6379
length: 生成的验证码长度, 默认是6
test: 是否是测试,若为true,则不真实地发送短信。默认是false
* getCaptcha(key) {}
* verifyCaptcha(key,captcha) {}
/**
* template: 【公司名】您的验证码是%s。如非本人操作,请忽略本短信
*/
* sendCaptchaBySms(phone, template) {}