获取短信模板
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\SmsTemplateModel::smsTemplateList |
| 所属业务 | 消息通知 |
| 来源模块/系统 | 短信模板管理 |
功能说明
获取短信模板
调用示例
$name = '示例名称';
$result = (new \app\common\model\SmsTemplateModel())->smsTemplateList($name);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
name | string | 是 | — | required | 短信接口标识名称 |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
list | array | 短信模板 |
list[].id | string | 短信模板ID |
list[].template_id | string | 短信接口模板ID |
list[].type | string | 模板类型(0大陆,1国际) |
list[].sms_name | string | 接口标识名称 |
list[].title | string | 模板标题 |
list[].content | string | 模版内容 |
list[].notes | string | 备注 |
list[].status | string | 状态(0未提交审核,1审核中,2通过审核,3未通过审核) |
正常返回
{
"list": [
{
"id": "string",
"template_id": "1",
"type": "string",
"sms_name": "示例名称",
"title": "示例名称",
"content": "string",
"notes": "示例说明",
"status": "1"
}
]
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |