wyt_sms_ali
v1.0.0
Published
阿里云短信通知常用方法的封装
Downloads
3
Readme
如何使用
- 安装依赖
yarn add wyt_sms_ali
- 相关引入:
import { AliSmsClientSingle, ISignleSms, IValidata } from 'wyt_sms_ali'
- 简单示例:
const obj: ISignleSms = { signName: "短信签名", templateCode: "短信模板code", phoneNumbers: "手机号码", templateParam: "模板变量组成的对象的JSON字符串", }; // 所有方法都定义在AliSmsClientSingle类中 const single = AliSmsClientSingle.getInstance("你的阿里云accessKeyId","你的阿里云accessKeySecret"); const result = await single.sendSingleSms(obj);