atv-dee-alisms
v1.0.0
Published
A ali sms service for dee framework
Downloads
2
Readme
Dee AliSMS Service
A ali sms service for dee framework
Usage
Dee服务使用
import * as DeeAliSMS from "atv-dee-alisms";
Dee({
services: {
sms: {
initialize: DeeAliSMS.init,
args: <DeeAliSMS.Args>{
accessKeyId: config.accessKeyId,
accessKeySecret: config.accessKeySecret,
defaultSignName: config.signName, // 默认签名
templates: {
login: {
templateCode: "SMS_171193819",
// templateContent: "测试短信 ${code}" // 模板可选参数,添加此参数自动校验
},
}
}
}
}
});
srvs.sms.login("16607620200", { code: "1234" });
创建对象
import { AliSMS } from "atv-dee-alisms";
const sms = new AliSMS({
accessKeyId: config.accessKeyId,
accessKeySecret: config.accessKeySecret,
signName: config.signName,
templateCode: "SMS_169515120"
})
返回发送结果
/** 发送结果返回对象
* Message: string;
RequestId: string;
BizId: string;
Code: string; OK=发送成功
* /