0.0.0 • Published 4 years ago

cdpsmsihuyi v0.0.0

Weekly downloads
-
License
GPL-2
Repository
-
Last release
4 years ago

CdpSmsIhuyi

iHuyi 106 SMS sender for node.js.

Install

$ npm install CdpSmsIhuyi
//npm install xmldom
//npm install spidex
//npm install md5

Usage

var CdpSmsIhuyi = require("CdpSmsIhuyi");
var appId = "your_account";
var appKey = "your_password";
var password = "redis_password";
var config={
    appId:'appid',
    appKey:'appkey',
    password:'redis密码',
    port:6379,
    host:'127.0.0.1'
}
var cdp=new CdpSmsIhuyi(config);
//发送验证码
cdp.sendVerificationCode('182********',function(res){
    console.log(res); //{code:2,msg: '提交成功',smsid: '15768292842434373070',sign: 'aabbcc'}
})
//验证验证码是否正确
cdp.codeIsTrue('000000','aabbcc').then(res=>{
    console.log(res)
}).catch(err=>{
    console.log(err)
})