1.0.0 • Published 2 years ago

turbo-lksms v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

企业信使短信发送

import { random } from 'lodash';
import { LkSms } from 'turbo-lksms';


const lk = new LkSms({
    userId: '1',
    appId: '1234565',
    password: '123456',
    sign: '测试签名'
})

lk.overageQuery().then(res => {
    console.log(`余量查询:`, res)
}).catch(e => {
    console.error(e)
})

lk.setReceiver('1861234****')
    .setMessageContent(`你的验证码是:${random()},10分钟内有效`)
    .send()
    .then(res => {
        console.log(`发送结果:`, res)
    }).catch(e => {
        console.error(e)
    })