<a name="menu" href="/doc">返回主目录</a>
1. [创建模板](#createTemplate)
1. [编辑模板](#editTemplateContent)
1. [修改模板启用状态](#updateSwitchStatus)
1. [获取模板信息](#findOneByCode)
1. [模板列表查询](#findAndCountAll)
1. [编辑模板TDK](#editTemplateTdk)


## **<a name="createTemplate"> 创建模板</a>**
[返回到目录](#menu)
##### URL
[/api/action/template/springBoard]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType：createTemplate

``` javascript
{
    "actionType":"createTemplate",
    "actionBody":{
        "template_content":{}
    }
}    
```

#### 返回结果
```javascript
{
    "status": 0,
    "msg": "success",
    "data": {
        "version": 0,
        "id": 8,
        "template_content": {},
        "code": "MT202008071137lsUEvo",
        "name": "营销模板",
        "company_id": null,
        "is_enabled": 0,
        "updated_at": "2020-08-07T03:37:06.463Z",
        "created_at": "2020-08-07T03:37:06.463Z"
    },
    "requestId": "de0f3ec095ba4a7b96a197493735b670"
}

```
## **<a name="editTemplateContent"> 编辑模板</a>**
[返回到目录](#menu)
##### URL
[/api/action/template/springBoard]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType：editTemplateContent

``` javascript
{
    "actionType":"editTemplateContent",
    "actionBody":{
        "code":"MT202008070923Q71RQ5",
        "template_content":{"aaa":1234}

    }
}

```

#### 返回结果
```javascript
{
    "status": 0,
    "msg": "success",
    "requestId": "c4658cf6f2f74c23aeee4f821c2476d6"
}

```
## **<a name="updateSwitchStatus"> 修改模板启用状态</a>**
[返回到目录](#menu)
##### URL
[/api/action/template/springBoard]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType：updateSwitchStatus

``` javascript
{
    "actionType":"updateSwitchStatus",
    "actionBody":{
        "code":"MT202008070923Q71RQ5",
        "is_enabled":1

    }
}

```

#### 返回结果
```javascript
{
    "status": 0,
    "msg": "success",
    "requestId": "ea997b55b8ef4f2a9e9389e57077e630"
}

```
## **<a name="findOneByCode"> 获取模板信息</a>**
[返回到目录](#menu)
##### URL
[/api/action/template/springBoard]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType：findOneByCode

``` javascript
{
    "actionType":"findOneByCode",
    "actionBody":{
        "code":"MT202008070923Q71RQ5"

    }
}

```

#### 返回结果
```javascript
{
    "status": 0,
    "msg": "success",
    "data": {
        "id": 5,
        "code": "MT202008070923Q71RQ5",
        "name": "营销模板",
        "title": "鸟啼2",
        "keyword": "关键词2",
        "describe": "描述2",
        "pic_url": "https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_picUrl371415960733478082020630.jpg",
        "is_enabled": 1,
        "template_content": "{\"aaa\":1234}",
        "form_id": null,
        "notes": null,
        "user_id": null,
        "user_name": null,
        "company_id": null,
        "created_at": "2020-08-07T01:24:22.000Z",
        "updated_at": "2020-08-07T03:26:39.000Z",
        "deleted_at": null,
        "version": 0
    },
    "requestId": "38f332552bae47e4b6ad1fb2c4cc4eaa"
}

```
## **<a name="findAndCountAll"> 模板列表查询</a>**
[返回到目录](#menu)
##### URL
[/api/action/template/springBoard]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType：findAndCountAll

``` javascript
{
    "actionType":"findAndCountAll",
    "actionBody":{
        "pageInfo":{
            "pageNo":1,
            "pageSize":10
        },
        "search":{
            "is_enabled":""
        }
    }
}

```

#### 返回结果
```javascript
{
    "status": 0,
    "msg": "success",
    "data": {
        "results": {
            "count": 8,
            "rows": [
                {
                    "id": 8,
                    "code": "MT202008071137lsUEvo",
                    "name": "营销模板",
                    "title": null,
                    "keyword": null,
                    "describe": null,
                    "pic_url": null,
                    "is_enabled": 0,
                    "template_content": "{}",
                    "form_id": null,
                    "notes": null,
                    "user_id": null,
                    "user_name": null,
                    "company_id": null,
                    "created_at": "2020-08-07T03:37:06.000Z",
                    "updated_at": "2020-08-07T03:37:06.000Z",
                    "deleted_at": null,
                    "version": 0
                },
                {
                    "id": 7,
                    "code": "MT202008071136DGoQ5s",
                    "name": "营销模板",
                    "title": null,
                    "keyword": null,
                    "describe": null,
                    "pic_url": null,
                    "is_enabled": 0,
                    "template_content": "{}",
                    "form_id": null,
                    "notes": null,
                    "user_id": null,
                    "user_name": null,
                    "company_id": null,
                    "created_at": "2020-08-07T03:36:16.000Z",
                    "updated_at": "2020-08-07T03:36:16.000Z",
                    "deleted_at": null,
                    "version": 0
                }
            ]
        },
        "aggresult": {}
    },
    "requestId": "3a88164f9b9d445bb1fad8ec271cd79f"
}

```
## **<a name="editTemplateTdk"> 编辑模板TDK</a>**
[返回到目录](#menu)
##### URL
[/api/action/template/springBoard]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType：editTemplateTdk

``` javascript
{
    "actionType":"editTemplateTdk",
    "actionBody":{
        "code":"MT202008070923Q71RQ5",
        "title":"鸟啼2",
        "keyword":"关键词2",
        "pic_url":"https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_picUrl371415960733478082020630.jpg",
        "describe":"描述2"

    }
}

```

#### 返回结果
```javascript
{
    "status": 0,
    "msg": "success",
    "requestId": "13126433a9e044c58912d0f00f5a33c5"
}

```
