多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC] #帖子列表 +++ get:{url}index.php/Home/Appraise/index *int:page#页码 <<< success { "code": "200", "msg": "success", "data": [ { "id": "1", "user_id": "1", "nickname": "余轮子", // 用户名 "portrait": "http://localhost/work/sjkj/public/upload/portrait/{C0B80A0B-1ED2-4EF5-9DBE-121213554}.jpg", // 头像 "title": "赞弹1", "content": "竟然不给我打招呼,", // 部分内容 "is_like": "1", // 0 赞,1 弹 "is_anonymous": "0", // 0 公开,1 匿名 "like_num": "0", // 赞数 "oppose_num": "0", // 弹数 "comment_num": "0", // 评论数 "create_time": "1474621158" }, { "id": "3", "user_id": "", "nickname": "匿名", "portrait": "", "title": "物业不给力1", "content": "好轮子重复造1", "is_like": "1", "is_anonymous": "1", "like_num": "0", "oppose_num": "0", "comment_num": "0", "create_time": "1474854545" } ] } +++ #帖子详情 +++ get:{url}index.php/Home/Appraise/show *int:id#友赞友弹id <<< success { "code": "200", "msg": "success", "data": { "images": [ "http://localhost/work/sjkj/public/upload/appraise/C1C92EE6-7A44-835A-22E6-B76743D4713A.jpg", "http://localhost/work/sjkj/public/upload/appraise/1F0D1BAE-084A-F144-77ED-D757E2149ABE.jpg", "http://localhost/work/sjkj/public/upload/appraise/1F0D1BAE-084A-F144-77ED-D757E2149ABE.jpg" ], "content": "9月15日凌晨三点零五分,第十四号超强台风“莫兰蒂”在厦门翔安登陆,花园鹭岛满目疮痍:超90%绿化面积受损、60多万株树木倒伏、水电系统遭受重创、多片区积水严重。面对严峻险情,厦门万科各项目迅速统筹、周密计划准备、预防福家园。", // 完整内容 "read_num": "20" // 查看数 } } +++ #评论列表 +++ get:{url}index.php/Home/Appraise/getComments *int:p_id#友赞友弹id *int:page#页码 <<< success { "code": "200", "msg": "success", "data": [ { "id": "1", //评论id "user_id": "18", "nickname": "雷猴", //评论的用户名 "portrait": null, //头像 "sex": "2", //性别 1男,2女 "content": "评论打招呼", "is_anonymous": "0", //是否匿名 "create_time": "1474862240", "reply": [ //回复 { "id": "2", "from_user_id": "1", "from_user": "轮子哥", //回复者 "from_is_anonymous": "0", //是否匿名 "to_user_id": "18", "to_user": "雷猴", //被回复者 "to_is_anonymous": "0", "content": "回复评论打招呼" }, { "id": "3", "from_user_id": "", "from_user": "匿名", "from_is_anonymous": "1", "to_user_id": "1", "to_user": "轮子哥", "to_is_anonymous": "0", "content": "回复回复评论打招呼" } ] } ] } +++ #回复列表 +++ get:{url}index.php/Home/Appraise/getReply *int:c_id#评论的id *int:page#页码 <<< success { "code": "200", "msg": "success", "data": [ { "id": "2", "from_user_id": "1", "from_user": "轮子哥", "from_is_anonymous": "0", "to_user_id": "18", "to_user": "雷猴", "to_is_anonymous": "0", "content": "回复评论打招呼" }, { "id": "3", "from_user_id": "", "from_user": "匿名", "from_is_anonymous": "1", "to_user_id": "1", "to_user": "轮子哥", "to_is_anonymous": "0", "content": "回复回复评论打招呼" } ] } +++ #我的帖子 +++ get:{url}index.php/Home/Appraise/mine *int:page#页码 <<< success { "code": "200", "msg": "success", "data": [ { "id": "1", "user_id": "1", "nickname": "轮子哥", "portrait": "http://localhost/work/sjkj/public/upload/a", "title": "赞弹1", "content": "竟然不给我打招呼1", "is_like": "1", "is_anonymous": "0", "like_num": "0", "oppose_num": "1", "comment_num": "3", "read_num": "0", "create_time": "1474621158", "images": [ "http://localhost/work/sjkj/public/upload/appraise/{C0B80A0B-1ED2-4EF5-9DBE-761BBA934612}.jpg", "http://localhost/work/sjkj/public/upload/appraise/{FAC52779-2C30-4A9A-83D4-4DEFFD61A410}.gif" ] } ] } +++ #与我相关 +++ get:{url}index.php/Home/Appraise/mention *int:page#页码 <<< success { "code": "200", "msg": "success", "data": [ { //对评论的回复 "id": "7", "comment_is_anonymous": "1", //回复是否匿名 "user_id": "", "nickname": "匿名", "portrait": "", "appraise_id": "2", //帖子id "appraise_is_anonymous": "0", "appraise_user": "雷猴", //发贴人 "appraise": "物业不给力1", //帖子标题 "is_like": "1", //0 赞,1 弹 "content": "2对1对2评论回复", "create_time": "1474881408", "reply": [ { "id": "6", "from_is_anonymous": "1", "from_user_id": "", "from_user": "匿名", "to_is_anonymous": null, "to_user_id": null, "to_user": null, "content": "1对2评论" } ] }, { //对回复的回复 "id": "3", "comment_is_anonymous": "1", "user_id": "", "nickname": "匿名", "portrait": "", "appriase_id": "1", "appraise_is_anonymous": "0", "appraise_user": "轮子哥", "appraise": "赞弹1", "is_like": "1", "content": "回复回复评论打招呼", "create_time": "1474862345", "reply": [ { "id": "1", "from_is_anonymous": "0", "from_user_id": "18", "from_user": "雷猴", "to_is_anonymous": null, "to_user_id": null, "to_user": null, "content": "评论打招呼" }, { "id": "2", "from_is_anonymous": "0", "from_user_id": "1", "from_user": "轮子哥", "to_is_anonymous": "0", "to_user_id": "18", "to_user": "雷猴", "content": "回复评论打招呼" } ] }, { //帖子的评论 "id": "1", "comment_is_anonymous": "0", "user_id": "18", "nickname": "雷猴", "portrait": null, "appriase_id": "1", "appraise_is_anonymous": "0", "appraise_user": "轮子哥", "appraise": "赞弹1", "is_like": "1", "content": "评论打招呼", "create_time": "1474862240" } ] } +++ #发布帖子 +++ post:{url}index.php/Home/Appraise/store *is_like#0 赞,1 弹 *title#标题 *content#内容 image:images#图片,多张图片则以数组形式上传 *is_anonymous#是否匿名(0 公开,1 匿名) <<< success { "code": "200", "msg": "success", "data": { "id": "2" } } <<< error { "code": "500", "msg": "错误信息", "data": [] } +++ #删除帖子 +++ get:{url}index.php/Home/Appraise/destroy *int:p_id#友赞友弹id <<< success { "code": "200", "msg": "success", "data": [] } <<< error { "code": "500", "msg": "错误信息", "data": [] } +++ #发布评论 +++ post:{url}index.php/Home/Appraise/storeAnswer *int:p_id#友赞友弹id *content#评论内容 *is_anonymous#是否匿名(0 公开,1 匿名) <<< success { "code": "200", "msg": "success", "data": { "id": "3" } } <<< error { "code": "500", "msg": "错误信息", "data": [] } +++ #发布回复 +++ post:{url}index.php/Home/Appraise/storeAnswer *int:p_id#友赞友弹id *int:comment_id#评论id *int:parent_id#被回复的id(若被回复的是评论,则传comment_id) *content#评论内容 *is_anonymous#是否匿名(0 公开,1 匿名) <<< success { "code": "200", "msg": "success", "data": { "id": "3" } } <<< error { "code": "500", "msg": "错误信息", "data": [] } +++ #点赞 or 弹 +++ post:{url}index.php/Home/Appraise/storeOpinion *int:p_id#友赞友弹id *int:type# 0 赞,1 弹 <<< success { "code": "200", "msg": "success", "data": [] } <<< error { "code": "500", "msg": "已经弹了", "data": [] } +++ #取消点赞 or 弹 +++ post:{url}index.php/Home/Appraise/destroyOpinion *int:p_id#友赞友弹id *int:type# 0 赞,1 弹 <<< success { "code": "200", "msg": "success", "data": [] } <<< error { "code": "500", "msg": "您还没弹", "data": [] } +++ #帖子浏览数 加1 +++ post:{url}index.php/Home/Appraise/read *int:p_id#友赞友弹id <<< success { "code": "200", "msg": "success", "data": [] } <<< error { "code": "500", "msg": "p_id required", "data": [] } +++