创建模板

# 场景模板 ## 创建 #### 简要描述: >s提交接口流程,创建场景信息保存到数据库 #### 请求URL >d http://localhost/index.php?c=scene&a=create # ## 查询模板标签 #### 简要描述: >s提交接口流程,获取《tag -> bizType》标签类型的ID #### 请求URL >d http://localhost/index.phpc=statics&a=tagList&type=1&bizType=11001&time=1585707066199 #### 请求方式 >i GET #### 参数 | 参数名 | 必选 | 类型 | 说明 | | -- | -- | -- | - | |type|是|int|| |bizType|是|int|标签类型ID:用途:11001,功能:11002,风格:11003| >i #### 输入示例 ``` ``` >s #### 成功返回示例 ``` { //用途11001 "success":true, "code":200, "msg":"操作成功", "obj":null, "map":null, "list":[ { "id":1140, "name":"招聘", "bizType":11001, "type":1, "lang":null, "groupId":10 }, { "id":1141, "name":"简历", "bizType":11001, "type":1, "lang":null, "groupId":10 }, { "id":1142, "name":"表格", "bizType":11001, "type":1, "lang":null, "groupId":10 }, { "id":1143, "name":"照片", "bizType":11001, "type":1, "lang":null, "groupId":10 }, { "id":1144, "name":"节日", "bizType":11001, "type":1, "lang":null, "groupId":10 }, { "id":1145, "name":"商品", "bizType":11001, "type":1, "lang":null, "groupId":10 }, { "id":1160, "name":"介绍", "bizType":11001, "type":1, "lang":null, "groupId":10 }, { "id":1161, "name":"图文", "bizType":11001, "type":1, "lang":null, "groupId":10 }, { "id":1162, "name":"名片", "bizType":11001, "type":1, "lang":null, "groupId":10 } ] }, { //功能11002 "success":true, "code":200, "msg":"操作成功", "obj":null, "map":null, "list":[ { "id":1147, "name":"背景", "bizType":11002, "type":1, "lang":null, "groupId":10 }, { "id":1148, "name":"图集", "bizType":11002, "type":1, "lang":null, "groupId":10 }, { "id":1149, "name":"表单", "bizType":11002, "type":1, "lang":null, "groupId":10 }, { "id":1150, "name":"互动", "bizType":11002, "type":1, "lang":null, "groupId":10 }, { "id":1151, "name":"特效", "bizType":11002, "type":1, "lang":null, "groupId":10 }, { "id":1152, "name":"事件", "bizType":11002, "type":1, "lang":null, "groupId":10 }, { "id":1153, "name":"特殊", "bizType":11002, "type":1, "lang":null, "groupId":10 } ] }, { //风格11003 "success":true, "code":200, "msg":"操作成功", "obj":null, "map":null, "list":[ { "id":1154, "name":"纯色", "bizType":11003, "type":1, "lang":null, "groupId":10 }, { "id":1155, "name":"黑白", "bizType":11003, "type":1, "lang":null, "groupId":10 }, { "id":1156, "name":"绚丽", "bizType":11003, "type":1, "lang":null, "groupId":10 }, { "id":1157, "name":"怀旧", "bizType":11003, "type":1, "lang":null, "groupId":10 }, { "id":1158, "name":"现代", "bizType":11003, "type":1, "lang":null, "groupId":10 }, { "id":1163, "name":"小清新", "bizType":11003, "type":1, "lang":null, "groupId":10 }, { "id":1164, "name":"扁平化", "bizType":11003, "type":1, "lang":null, "groupId":10 }, { "id":1165, "name":"中国风", "bizType":11003, "type":1, "lang":null, "groupId":10 }, { "id":1166, "name":"欧美风", "bizType":11003, "type":1, "lang":null, "groupId":10 } ] } ``` # ## 查询模板 #### 简要描述: >s提交接口流程,如果是搜索:则需要POST参数添加name:关键字 #### 请求URL >d http://localhost/index.php?c=scene&a=syspagetpl #### 请求方式 >i POST #### 参数 | 参数名 | 必选 | 类型 | 说明 | | -- | -- | -- | - | |pageSize|是|int|列表数量| |pageNo|是|string|页数| |name|否|string|搜索关键字,如果是搜索行为,必须添加本字段| >i #### 输入示例 ``` ``` >s #### 成功返回示例 ``` { "success":true, "code":200, "msg":"success", "obj":null, "map":{ "count":283, "pageNo":1, "pageSize":21 }, "list":[ { "id":673, "sceneId":1, "num":1, "name":"联系关注地址电话邮箱", "properties":{ "thumbSrc":"syspic/page/yq0KA1UmYGuAcaDnAAIVT9knwQg378.png" }, "elements":null, "scene":null }, { "id":672, "sceneId":1, "num":1, "name":"关注我们", "properties":{ "thumbSrc":"syspic/page/yq0KA1T_8oyAVTk8AAGNiVXx7YU474.png" }, "elements":null, "scene":null }, { "id":671, "sceneId":1, "num":1, "name":"图集小清新", "properties":{ "thumbSrc":"syspic/page/yq0KZVXUYACAdhcbAAKaKeR6rNg479.png" }, "elements":null, "scene":null }, { "id":670, "sceneId":1, "num":1, "name":"图文", "properties":{ "thumbSrc":"syspic/page/yq0KEVVgEYCAOc5BAADJEScBxE8699.png" }, "elements":null, "scene":null }, { "id":669, "sceneId":1, "num":1, "name":"图文", "properties":{ "thumbSrc":"syspic/page/yq0KEVVgGDOAbsMTAABpRE9TlVg940.png" }, "elements":null, "scene":null }, { "id":668, "sceneId":1, "num":1, "name":"图文", "properties":{ "thumbSrc":"syspic/page/yq0KEVVgHZCAAaBhAACOO3Moruo602.png" }, "elements":null, "scene":null }, { "id":667, "sceneId":1, "num":1, "name":"怀旧文艺图文", "properties":{ "thumbSrc":"syspic/page/yq0KEVVj1YuALvrjAAS-24KqsHU581.png" }, "elements":null, "scene":null }, { "id":666, "sceneId":1, "num":1, "name":"概要目录", "properties":{ "thumbSrc":"syspic/page/yq0KEVV2RViAJeU-AACnjtxfI5w035.png" }, "elements":null, "scene":null }, { "id":665, "sceneId":1, "num":1, "name":"中国风文艺图文", "properties":{ "thumbSrc":"syspic/page/yq0KEVV33zeAFXKjAANOnrqvk-Q196.png" }, "elements":null, "scene":null }, { "id":664, "sceneId":1, "num":1, "name":"怀旧文艺图文", "properties":{ "thumbSrc":"syspic/page/yq0KEVV6VHaASVTwAAQ06gjZrbk194.png" }, "elements":null, "scene":null }, { "id":663, "sceneId":1, "num":1, "name":"文艺怀旧图文", "properties":{ "thumbSrc":"syspic/page/yq0KEVV7yfmATFK2AAA75iaUj-E911.png" }, "elements":null, "scene":null }, { "id":662, "sceneId":1, "num":1, "name":"图片图集", "properties":{ "thumbSrc":"syspic/page/yq0KEVV_vu2AfAqzAABHozJjHEI878.png" }, "elements":null, "scene":null }, { "id":661, "sceneId":1, "num":1, "name":"情侣头像", "properties":{ "thumbSrc":"syspic/page/yq0KEVWCbdyAaw_qAAQcRTLTqIc850.png" }, "elements":null, "scene":null }, { "id":660, "sceneId":1, "num":1, "name":"图文图集", "properties":{ "thumbSrc":"syspic/page/yq0KA1UCfq2ALrQLAAJk51Eh1EA628.png" }, "elements":null, "scene":null }, { "id":659, "sceneId":1, "num":1, "name":"中国风文艺文字", "properties":{ "thumbSrc":"syspic/page/yq0KA1TSCguAHHeXAAHrunI6Bhs252.png" }, "elements":null, "scene":null }, { "id":658, "sceneId":1, "num":1, "name":"游戏人物介绍倚天屠龙记", "properties":{ "thumbSrc":"syspic/page/yq0KA1Sr48iAJX4mAAKmNdbB8zc125.png" }, "elements":null, "scene":null }, { "id":657, "sceneId":1, "num":1, "name":"苹果图文", "properties":{ "thumbSrc":"syspic/page/yq0KA1Sr48KAWc96AAOH-sV0hEU091.png" }, "elements":null, "scene":null }, { "id":656, "sceneId":1, "num":1, "name":"元旦新年快乐", "properties":{ "thumbSrc":"syspic/page/yq0KA1UCiNSAcbAFAAPFoQPfPZY856.png" }, "elements":null, "scene":null }, { "id":655, "sceneId":1, "num":1, "name":"月亮月圆文艺", "properties":{ "thumbSrc":"syspic/page/yq0KA1TDZMKAO58gAAMnZ7Vys-g369.png" }, "elements":null, "scene":null }, { "id":654, "sceneId":1, "num":1, "name":"视频播放器图文怀旧文艺", "properties":{ "thumbSrc":"syspic/page/yq0KXVYfkdGAbm3BAAR2Mj_OhkE461.png" }, "elements":null, "scene":null }, { "id":653, "sceneId":1, "num":1, "name":"旅游价格预订", "properties":{ "thumbSrc":"syspic/page/yq0KA1UCh3qAUlFsAARaC8iyrNc273.png" }, "elements":null, "scene":null } ] } ``` # ## 查询创建的场景信息 #### 简要描述: >s提交接口流程 #### 请求URL >d http://localhost/index.php?c=scene&a=detail&id=8831310 #### 请求方式 >i GET #### 参数 | 参数名 | 必选 | 类型 | 说明 | | -- | -- | -- | - | >i #### 输入示例 ``` ``` >s #### 成功返回示例 ``` { "success":true, "code":200, "msg":"success", "obj":{ "id":8831310, "name":"", "createUser":"8", "createTime":"1585707066000", "type":101, "pageMode":2, "eqcode":"", "cover":"default_thum.jpg", "image":{ "imgSrc":"default_thum.jpg", "isAdvancedUser":0, "lastPageId":0, "hideEqAd":0 }, "isTpl":0, "isPromotion":0, "isShow":0, "status":1, "tagId":0, "openLimit":0, "submitLimit":0, "startDate":null, "endDate":null, "accessCode":null, "loadingLogo":null, "thirdCode":null, "updateTime":"2020-04-01 10:11:06", "publishTime":null, "price":0, "applyTemplate":0, "applyPromotion":0, "sourceId":null, "code":"U1104NG28VU", "description":"", "sort":0, "bgAudio":{ "url":"", "type":"3" }, "pageCount":0, "dataCount":0, "showCount":0, "userLoginName":null, "userName":null }, "map":null, "list":null } ``` # ## 我的模板 #### 简要描述: >s提交接口流程,根据参数id查询我的模板列表,然后在查询第一页的参数 #### 请求URL >d http://localhost/index.php?c=scene&a=pagelist&id=8831310&date=1585711002960 #### 请求方式 >i POST #### 参数 | 参数名 | 必选 | 类型 | 说明 | | -- | -- | -- | - | >i #### 输入示例 ``` ``` >s #### 成功返回示例 ``` { "success":true, "code":200, "msg":"success", "obj":null, "map":null, "list":[ { "id":24776, "sceneId":8831310, "num":1, "name":"", "properties":null, "elements":null, "scene":null }, { "id":24777, "sceneId":8831310, "num":2, "name":"", "properties":null, "elements":null, "scene":null } ] } ``` # ## 登录 #### 简要描述: >s提交接口流程,登录成功后保存用户名ID到session和cookie #### 请求URL >d http://localhost/index.php?c=user&a=login #### 请求方式 >i POST #### 参数 | 参数名 | 必选 | 类型 | 说明 | | -- | -- | -- | - | |username|是|string| 用户名| |password|是|string|密码| >i #### 输入示例 ``` data: { "username": "admin@qq.com", "password": "admin" } ``` >s #### 成功返回示例 ``` { "success": true, "code": 200, "msg": "success", "obj": null, "map": null, "list": null } ``` >d #### 失败返回示例 ``` { "success": false, "code": 1, "msg": "账号不存在或者已经被禁用", "map": { "isValidateCodeLogin": false } }, { "success": false, "code": 2, "msg": "密码错误", "map": { "isValidateCodeLogin": false } } ``` #