提交 51d2ef82 编写于 作者: 雪洛's avatar 雪洛

docs: update uniCloud sms

上级 12217e4d
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
|参数名 |类型 |必填 |说明 | |参数名 |类型 |必填 |说明 |
|:-: |:-: |:-: |:-: | |:-: |:-: |:-: |:-: |
|appid |String |是 |DCloud appid,可以在项目manifest.json内看到 | |appid |String |是 |DCloud appid,可以在项目manifest.json内看到 |
|smsKey |String |是 |调用短信接口的密钥key,从 dev.dcloud.net.cn/uniSms 后台获取 | |smsKey |String |是 |`HBuilderX 3.91`及之后的版本可不填此参数,调用短信接口的密钥key,从 dev.dcloud.net.cn/uniSms 后台获取 |
|smsSecret |String |是 |调用短信接口的密钥secret,从 dev.dcloud.net.cn/uniSms 后台获取 | |smsSecret |String |是 |`HBuilderX 3.91`及之后的版本可不填此参数,调用短信接口的密钥secret,从 dev.dcloud.net.cn/uniSms 后台获取 |
|phone |String |和phoneList二选一|发送目标手机号,暂仅支持中国大陆手机号 | |phone |String |和phoneList二选一|发送目标手机号,暂仅支持中国大陆手机号 |
|phoneList |Array |和phone二选一 |发送目标手机号,暂仅支持中国大陆手机号,最多50个手机号码,`HBuilderX 3.3.0`起支持 | |phoneList |Array |和phone二选一 |发送目标手机号,暂仅支持中国大陆手机号,最多50个手机号码,`HBuilderX 3.3.0`起支持 |
|templateId |String |是 |模版Id,短信内容为固定模板,详见下方说明(应用开发阶段,可以使用 DCloud 提供的测试模板) | |templateId |String |是 |模版Id,短信内容为固定模板,详见下方说明(应用开发阶段,可以使用 DCloud 提供的测试模板) |
...@@ -122,8 +122,6 @@ exports.main = async (event, context) => { ...@@ -122,8 +122,6 @@ exports.main = async (event, context) => {
try { try {
const res = await uniCloud.sendSms({ const res = await uniCloud.sendSms({
appid: '__UNI__xxxxxxx', appid: '__UNI__xxxxxxx',
smsKey: '****************',
smsSecret: '****************',
phone: '188********', phone: '188********',
templateId: '100**', // 请替换为自己申请的模板id templateId: '100**', // 请替换为自己申请的模板id
data: { data: {
...@@ -151,8 +149,6 @@ exports.main = async (event, context) => { ...@@ -151,8 +149,6 @@ exports.main = async (event, context) => {
try { try {
const res = await uniCloud.sendSms({ const res = await uniCloud.sendSms({
appid: '__UNI__xxxxxxx', appid: '__UNI__xxxxxxx',
smsKey: '****************',
smsSecret: '****************',
phoneList: ['188********', '138********'], phoneList: ['188********', '138********'],
templateId: '100**', // 请替换为自己申请的模板id templateId: '100**', // 请替换为自己申请的模板id
data: { data: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册