API_All

# LOGIN ## 登录 #### 简要描述: >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 } } ``` # ## 登录 -> 查询个人信息 #### 简要描述: >s提交接口流程,通过cookie下的ID查询个人信息 #### 请求URL >d http://localhost/index.php?c=user&a=check&time=1585624658780 #### 请求方式 >i cookie #### 参数 | 参数名 | 必选 | 类型 | 说明 | | -- | -- | -- | - | >i #### 输入示例 ``` URL = “” ``` >s #### 成功返回示例 ``` { "success":true, "code":200, "msg":"操作成功", "obj":{ "id":8,//用户ID "loginName":"admin@qq.com",//用户登录名 "xd":99,//秀豆 "role":0, "sex":0, "phone":"",//手机 "tel":"",//电话 "qq":"",//QQ "headImg":"syspic/img/a80a999bcc8a51b57748b063169116be.png",//头像 "idNum":null, "idPhoto":null, "regTime":1425093623000,//注册时间 "extType":0, "property":"null", "companyId":null, "deptName":null, "deptId":0, "checkEmail":"1",//邮箱是否验证0,1 "name":"", "email":"admin@qq.com",//用户邮箱 "type":1, "status":1, "relType":null, "companyTplId":null, "roleIdList":[ 0 ] }, "map":null, "list":null } ``` # ## 登录 -> 场景列表 #### 简要描述: >s提交接口流程,通过传递参数获取页数和显示数量,然后通过cookie查询场景列表 #### 请求URL >d http://localhost/index.php?c=scene&a=my&time=1585624658838 #### 请求方式 >i POST + cookie #### 参数 | 参数名 | 必选 | 类型 | 说明 | | -- | -- | -- | - | |showData|是|string|可空| |pageNo|是|int|默认第一页| |pageSize|是|int|每页显示数量| |user|是|string|可空| |name|是|string|可空| |groupId|是|string|可空| >i #### 输入示例 ``` data: { "showData": , "pageNo": 1, "pageSize":12, "user": "name": "groupId": } ``` >s #### 成功返回示例 ``` { "success":true, "code":200, "msg":"success", "obj":null, "map":{ "count":1, "pageNo":1, "pageSize":12 }, "list":[//场景列表 { "id":8831301, "name":"测试呢", "createUser":"8", "createTime":1423645519000, "type":103, "pageMode":0, "cover":"syspic/pageimg/yq0KA1U5okeAP0h0AABVbvK4o2k266.png", "image":{ "bgAudio":{ "url":"syspic/mp3/yq0KA1U5oheAY-9hACxE-P1yTgg082.mp3", "type":"3" }, "imgSrc":"syspic/pageimg/yq0KA1U5okeAP0h0AABVbvK4o2k266.png", "hideEqAd":0, "isAdvancedUser":0 }, "isTpl":0, "isPromotion":0, "status":1, "openLimit":0, "submitLimit":0, "startDate":null, "endDate":null, "accessCode":null, "thirdCode":null, "updateTime":null, "publishTime":1585279978, "applyTemplate":0, "applyPromotion":0, "sourceId":1225273, "code":"U110327GGSQ9A", "description":"test描述", "sort":0, "pageCount":0, "dataCount":0, "showCount":1, "userLoginName":null, "userName":null } ] } ``` # ## 登录 -> 行业列表 #### 简要描述: >s提交接口流程,查询行业列表 #### 请求URL >d http://localhost/index.php?c=statics&a=typelistb #### 请求方式 >i cookie #### 参数 | 参数名 | 必选 | 类型 | 说明 | | -- | -- | -- | - | >i #### 输入示例 ``` ``` >s #### 成功返回示例 ``` { "success":true, "code":200, "msg":"操作成功", "obj":null, "map":null, "list":[ { "id":13, "name":"行业", "type":"101", "sort":1, "status":1, "remark":null }, { "id":14, "name":"企业", "type":"103", "sort":2, "status":1, "remark":null }, { "id":15, "name":"风格", "type":"105", "sort":3, "status":1, "remark":null }, { "id":16, "name":"个人", "type":"102", "sort":4, "status":1, "remark":null }, { "id":17, "name":"节日", "type":"104", "sort":5, "status":1, "remark":null } ] } ``` # ## 登录 -> 查询场景信息 #### 简要描述: >s提交接口流程,通过cookie查询 #### 请求URL >d http://localhost/index.php?c=scenedata&a=statSum #### 请求方式 >i COOKIE #### 参数 | 参数名 | 必选 | 类型 | 说明 | | -- | -- | -- | - | >i #### 输入示例 ``` ``` >s #### 成功返回示例 ``` { "success":true, "code":200, "msg":"操作成功", "obj":{ "total":1,//场景总计 "dt":0,//收集数据 "open":1,// "pv":1//场景展示 }, "map":null, "list":null } ``` # ## 登录 -> banner #### 简要描述: >s提交接口流程,查询广告位图片信息 #### 请求URL >d http://localhost/index.php?c=ad&a=banners&pageCode=ad_001&userType=1 #### 请求方式 >i GET #### 参数 | 参数名 | 必选 | 类型 | 说明 | | -- | -- | -- | - | |pageCode|是|string|类别,不同场景类别不一样| |userType|是|string|| >i #### 输入示例 ``` ``` >s #### 成功返回示例 ``` { "success":true, "code":200, "msg":"操作成功", "obj":null, "map":null, "list":[ { "id":602, "path":"/Uploads/ad/2015-08-11/yq0KXlXli-CAFkDEAAAy2NZGwU0132.png", "title":"免费升级企业账号,尊享更多专属权限", "url":"/#/usercenter/privilege", "target":"_blank", "pageCode":"ad_001", "sort":"4", "status":1 }, { "id":1202, "path":"/Uploads/ad/2015-08-11/yq0KZVXli72AN9YOAAAuF_hxNCs656.png", "title":"用秀点去易企秀尾页,点此购买", "url":"/#/usercenter/xd", "target":"_blank", "pageCode":"ad_001", "sort":"3", "status":1 } ] } ``` # ## 登录 -> 消息列表 #### 简要描述: >s提交接口流程,查询消息队列,根据队列获取角标并显示 #### 请求URL >d http://localhost/index.php?c=statics&a=msgList&pageNo=1&pageSize=4&unread=true&time=1585633496970 #### 请求方式 >i GET #### 参数 | 参数名 | 必选 | 类型 | 说明 | | -- | -- | -- | - | >i #### 输入示例 ``` ``` >s #### 成功返回示例 ``` { "success":true, "code":200, "msg":"操作成功", "obj":null, "map":{ "count":2, "pageNo":1, "pageSize":2 }, "list":[ { "id":7, "type":2, "bizType":2, "toUser":null, "toEmail":null, "fromUser":null, "sendTime":1585558428000, "title":"biaoti", "content":"neirong", "status":2, "ext":null, "roleIdList":null }, { "id":6, "type":2, "bizType":1, "toUser":null, "toEmail":null, "fromUser":null, "sendTime":1585558049000, "title":"test", "content":"test\", "status":2, "ext":null, "roleIdList":null } ] } ``` # ## 查询秀豆 #### 简要描述: >s提交接口流程,获取用户cookie #### 请求URL >d http://localhost/index.php?c=user&a=xd&time=1585702055844 #### 请求方式 >i *COOKIE #### 参数 | 参数名 | 必选 | 类型 | 说明 | | -- | -- | -- | - | >i #### 输入示例 ``` ``` >s #### 成功返回示例 ``` { "success":true, "code":200, "msg":"操作成功", "obj":99,//秀豆余额 "map":"", "list":null } ``` # ## 管理分组 #### 简要描述: >s提交接口流程,get请求 #### 请求URL >d http://localhost/index.php?c=scene&a=getMyGroup&param=8&time=1585702056102 #### 请求方式 >i GET #### 参数 | 参数名 | 必选 | 类型 | 说明 | | -- | -- | -- | - | |param|是|int|参数的是用户ID| >i #### 输入示例 ``` ``` >s #### 成功返回示例 ``` { "success":true, "code":200, "msg":"操作成功", "obj":null, "map":null, "list":[ { "id":"656604", "groupName":"分组1", "userID":8 }, { "id":"656603", "groupName":"test分组", "userID":8 } ] } ``` # ## 分组修改 #### 简要描述: >s 数据表(tag) #### 请求URL >d http://localhost/index.php?c=scene&a=updateGroup&time=1586480984694 #### 请求方式 >i POST #### 参数 | 参数名 | 必选 | 类型 | 说明 | | -- | -- | -- | - | |id|是|int|分组ID| |name|是|String|修改后的名称| >i #### 输入示例 ``` ``` >s #### 成功返回示例 ``` { // "success":true, "code":200, "msg":"操作成功", "obj":null, "map":null, "list":null } ``` # ## 分组删除 #### 简要描述: >s 数据表(tag)(scene)需要把scene表的groupid_int更新为0,然后在执行删除分组操作 #### 请求URL >d http://localhost/index.php?c=scene&a=deleteGroup&id=656603&time=1586481471606 #### 请求方式 >i GET #### 参数 | 参数名 | 必选 | 类型 | 说明 | | -- | -- | -- | - | |id|是|int|分组ID| >i #### 输入示例 ``` ``` >s #### 成功返回示例 ``` { // "success":true, "code":200, "msg":"操作成功", "obj":null, "map":null, "list":null } ``` # ## 切换分组 #### 简要描述: >s 就是调用管理分组接口,增加 参数:groupId #### 请求URL >d #### 请求方式 >i GET #### 参数 | 参数名 | 必选 | 类型 | 说明 | | -- | -- | -- | - | |id|是|int|分组ID| >i #### 输入示例 ``` ``` >s #### 成功返回示例 ``` ``` # ## 删除场景 #### 简要描述: >s 表(scene)执行要考虑到更新场景信息,更新场景,最后前端要调用场景列表接口 #### 请求URL >d http://localhost/index.php?c=scene&a=delscene&id=8831314//通过查询GET参数ID,scene表更新delete_id字段为1 http://localhost/index.php?c=scenedata&a=statSum//更新查询场景信息 #### 请求方式 >i GET #### 参数 | 参数名 | 必选 | 类型 | 说明 | | -- | -- | -- | - | |id|是|int|分组ID| >i #### 输入示例 ``` ``` >s #### 成功返回示例 ``` { //删除操作返回 "success":true, "code":200, "msg":"success", "obj":null, "map":null, "list":null }, { //更新场景信息返回结果 "success":true, "code":200, "msg":"操作成功", "obj":{ "total":4,//场景总计 "dt":0,收集数据 "open":4, "pv":12//场景展示 }, "map":null, "list":null } ``` #