sendSms 的 vendor 参数使用默认值 envar.SMS.vendor

This commit is contained in:
陆柯 2022-04-03 19:25:16 +08:00
parent 81b563e4c4
commit 1feda80633

View File

@ -18,7 +18,9 @@ module.exports = {
return await util.promisify(my.smtpTransporter.sendMail).call(my.smtpTransporter, messageObject)
},
async sendSms ({ phone, vendor,
async sendSms ({
phone,
vendor = my.envar?.SMS?.vendor || wo?.envar?.SMS?.vendor,
msg, // for vendor==='DXTON'
msgParam, msgTemplate, // for ['ALIYUN','UNICLOUD'].includes(vendor)
signName, // for vendor==='ALIYUN', 'TENCENT'