<a name="menu" href="/doc">返回主目录</a>
<!-- 1. [创建模板](#createTemplate) -->
1. [编辑模板](#editTemplateContent)
<!-- 1. [修改模板启用状态](#updateSwitchStatus) -->
1. [获取模板信息](#findOneByCode)
<!-- 1. [模板列表查询](#findAndCountAll) -->
<!-- 1. [编辑模板TDK](#editTemplateTdk) -->
1. [获取图片列表](#getImgList)
1. [添加图片](#createImginfo)
1. [获取表单列表](#getFormList)
1. [获取文件上传配置信息](#getOssConfig)
1. [根据链接参数获取模板链接信息](#getTemplateAndLinkInfo)

## **<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"
}

```
## **<a name="getImgList"> 获取图片列表</a>**
[返回到目录](#menu)
##### URL
[/api/action/templateconfig/springBoard]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType：getImgList

``` javascript
{
    "actionType": "getImgList",
    "actionBody": {
        "pageInfo": {
            "pageNo": 1,
            "pageSize": 2
        }
    }
}

```

#### 返回结果
```javascript
{
    "status": 0,
    "msg": "success",
    "data": {
        "results": {
            "count": 6,
            "rows": [
                {
                    "id": 87,
                    "code": "IMG202008111003ltqKE",
                    "name": "123",
                    "company_id": 10,
                    "pic_url": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_1477159711138453920201110345396.png",
                    "created_at": "2020-08-11T02:03:17.000Z",
                    "updated_at": "2020-08-11T02:03:17.000Z",
                    "deleted_at": null,
                    "version": 0
                },
                {
                    "id": 86,
                    "code": "IMG202008110930yQail",
                    "name": "asd",
                    "company_id": 10,
                    "pic_url": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_3437159710937925020201192939250small.jpg",
                    "created_at": "2020-08-11T01:30:32.000Z",
                    "updated_at": "2020-08-11T01:30:32.000Z",
                    "deleted_at": null,
                    "version": 0
                }
            ]
        },
        "aggresult": {}
    },
    "requestId": "760d29df6d594a9984e1d660bdcdc997"
}

```
## **<a name="createImginfo"> 添加图片</a>**
[返回到目录](#menu)
##### URL
[/api/action/templateconfig/springBoard]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType：createImginfo

``` javascript
{
    "actionType": "createImginfo",
    "actionBody": {
        "imginfo": {
            "name": "hahah",
            "pic_url": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_1137159702950007820201011182078huluwa.jpg",
            "pic_size": "200K"
        }
    }
}

```

#### 返回结果
```javascript
{
    "status": 0,
    "msg": "success",
    "data": {
        "version": 0,
        "id": 99,
        "name": "hahah",
        "pic_url": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_1137159702950007820201011182078huluwa.jpg",
        "pic_size": "200K",
        "code": "IMG2020081111456rOkp",
        "company_id": 10,
        "updated_at": "2020-08-11T03:45:11.319Z",
        "created_at": "2020-08-11T03:45:11.319Z"
    },
    "requestId": "7b8ff19fb7e84758b029391e9195c44c"
}

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

``` javascript
{
    "actionType":"getFormList",
    "actionBody":{
        "pageInfo":{
            "pageNo":1,
            "pageSize":10
        }
    }
}

```

#### 返回结果
```javascript
{
    "status": 0,
    "msg": "操作成功",
    "data": {
        "results": {
            "count": 5,
            "rows": [
                {
                    "id": 5,
                    "code": "FM202008111118aCRMw4",
                    "name": "3",
                    "form_items": "手机号、单选按钮",
                    "form_describe": "4",
                    "notes": null,
                    "user_id": null,
                    "user_name": "jytest6",
                    "company_id": 10,
                    "record_num": null,
                    "created_at": "2020-08-11T03:18:59.000Z",
                    "updated_at": "2020-08-11T03:20:08.000Z",
                    "deleted_at": null,
                    "version": 0
                },
                {
                    "id": 4,
                    "code": "FM202008111117FRpd3P",
                    "name": "2",
                    "form_items": null,
                    "form_describe": "2",
                    "notes": null,
                    "user_id": 1,
                    "user_name": "jytest6",
                    "company_id": 11,
                    "record_num": null,
                    "created_at": "2020-08-11T03:17:42.000Z",
                    "updated_at": "2020-08-11T03:17:42.000Z",
                    "deleted_at": null,
                    "version": 0
                },
                {
                    "id": 1,
                    "code": "00001",
                    "name": "1",
                    "form_items": "单选按钮、手机号",
                    "form_describe": "1",
                    "notes": "test",
                    "user_id": 1,
                    "user_name": "zhangsan",
                    "company_id": 10,
                    "record_num": 2,
                    "created_at": "2020-08-07T15:59:56.000Z",
                    "updated_at": "2020-08-11T03:10:50.000Z",
                    "deleted_at": null,
                    "version": null
                },
                {
                    "id": 3,
                    "code": "00001",
                    "name": "1",
                    "form_items": "1",
                    "form_describe": "1",
                    "notes": "test3",
                    "user_id": 1,
                    "user_name": "1",
                    "company_id": 11,
                    "record_num": null,
                    "created_at": "2020-08-07T15:59:56.000Z",
                    "updated_at": "2020-08-07T15:59:58.000Z",
                    "deleted_at": null,
                    "version": null
                },
                {
                    "id": 2,
                    "code": null,
                    "name": "sssssss",
                    "form_items": "手机号",
                    "form_describe": "ss",
                    "notes": "tset2",
                    "user_id": null,
                    "user_name": null,
                    "company_id": 10,
                    "record_num": 3,
                    "created_at": "2020-08-07T10:42:27.000Z",
                    "updated_at": "2020-08-11T03:10:13.000Z",
                    "deleted_at": null,
                    "version": 0
                }
            ]
        },
        "aggresult": {}
    },
    "bizmsg": "empty",
    "requestId": "7029b432952a4463ae99b0f560e0eefb"
}
```

## **<a name="getOssConfig"> 获取文件上传配置信息</a>**
[返回到目录](#menu)
##### URL
[/api/meta/oss/getOssConfig]
#### 参数 无


#### 返回结果
```javascript
{
    "status": 0,
    "msg": "操作成功",
    "data": {
        "OSSAccessKeyId": "LTAI4GC5tSKvqsH2hMqj6pvd",
        "policy": "eyJleHBpcmF0aW9uIjoiMjExOS0xMi0zMVQxNjowMDowMC4wMDBaIiwiY29uZGl0aW9ucyI6W1siY29udGVudC1sZW5ndGgtcmFuZ2UiLDAsMTA0ODU3NjAwMF0sWyJzdGFydHMtd2l0aCIsIiRrZXkiLCJ6YyJdXX0=",
        "Signature": "o4vlPnpfUFGJQy3Xq/mq23PQMbc=",
        "Bucket": "gsb-zc",
        "success_action_status": 201,
        "url": "https://gsb-zc.oss-cn-beijing.aliyuncs.com"
    },
    "bizmsg": "empty",
    "requestId": "546d54916c81498183d7cddfb4503221"
}

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

``` javascript
{
    "actionType": "getTemplateAndLinkInfo",
    "actionBody": {
        "channel_code": 1,
        "business_type_code": 1,
        "lauch_type_code": 1,
        "marketing_subject_code": 1,
        "else_channel_param": "test",
        "template_id": 10,
        "device":"pc"
    }
}

```

#### 返回结果
```javascript
{
    "status": 0,
    "msg": "success",
    "data": {
        "templateinfo": {
            "id": 10,
            "code": "MT202008071548EDJGHs",
            "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": "{\"list\":[{\"id\":1,\"title\":\"横幅\",\"type\":\"banner\",\"acraoList\":[{\"type\":\"banner\",\"list\":[{\"id\":0,\"url\":\"https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3650631927,187148042&fm=26&gp=0.jpg\",\"href\":\"\",\"title\":\"1231231\",\"text\":\"123123\"}],\"text_style\":{\"width\":\"100%\",\"height\":\"100%\",\"alignItems\":\"center\",\"padding\":\"70px 90px\"},\"style\":{\"width\":\"1000\",\"height\":\"300\"},\"display_time\":\"1.5\",\"switching_speed\":\"1\",\"id\":0}]},{\"id\":2,\"title\":\"文本\",\"type\":\"text\",\"acraoList\":[{\"id\":1,\"type\":\"text\",\"inner_text\":\"<p class=\\\"ql-align-center\\\">12313123123123123123</p><p class=\\\"ql-align-center\\\"><br></p><p class=\\\"ql-align-center\\\">123123aaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p>\"}]}]}",
            "form_id": null,
            "notes": null,
            "user_id": "hRGcxf2yGHauggUNwWRqjSvf9xqF9LFO",
            "user_name": "jytest6",
            "company_id": 10,
            "created_at": "2020-08-07T07:48:13.000Z",
            "updated_at": "2020-08-10T11:20:13.000Z",
            "deleted_at": null,
            "version": 0
        },
        "linkinfo": {
            "id": 1,
            "code": "001",
            "name": "001",
            "delivery_word": "测试投放",
            "else_channel_param": "test",
            "template_id": 10,
            "channel_name": "1",
            "business_type_name": "1",
            "lauch_type_name": "1",
            "marketing_subject_name": "1",
            "channel_code": "1",
            "business_type_code": "1",
            "lauch_type_code": "1",
            "marketing_subject_code": "1",
            "is_enabled": 1,
            "link_url_pc": null,
            "link_url_mobile": null,
            "notes": null,
            "user_id": "1",
            "user_name": "1",
            "company_id": 10,
            "created_at": "2020-08-08T11:27:13.000Z",
            "updated_at": null,
            "deleted_at": null,
            "version": null
        }
    },
    "requestId": "c190bb6177ce4c8ba018ce5aecda31c0"
}

```
