# 超话小程序 **Repository Path**: huitailang2021/hypertalk-mini-program ## Basic Information - **Project Name**: 超话小程序 - **Description**: 使用PHP后台操作MYSQL数据库,应用端是uniapp小程序,实现关注、发帖、登录、即时聊天等等功能 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2023-04-25 - **Last Updated**: 2025-02-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # **超话API文档** ## **发送验证码** - ##### **接口功能** 登录注册绑定账号发送验证码 ##### **URL** https://ceshi.chaohua-sxx.cn/api/v1/user/sendcode **支持格式** JSON **HTTP请求方式** POST ##### 请求参数 | **参数** | **必选** | **类型** | 说明 | | -------- | -------- | -------- | ------ | | phone | true | int | 手机号 | ##### 接口示例 地址:https://ceshi.chaohua-sxx.cn/api/v1/user/sendcode ``` { "msg": "验证码:5001", "errorCode": 30005 } ``` ## **手机验证码登录** - **接口功能** 手机验证码登录 **URL** https://ceshi.chaohua-sxx.cn/api/v1/user/phonelogin **支持格式** JSON **HTTP请求方式** POST ##### 请求参数 | **参数** | **必选** | **类型** | 说明 | | -------- | -------- | -------- | ------ | | phone | true | int | 手机号 | | code | true | int | 验证码 | ##### 接口示例 地址:https://ceshi.chaohua-sxx.cn/api/v1/user/phonelogin ``` { "msg": "登录成功", "data": { "id": 15, "username": "13450772009", "userpic": "http://img0.imgtn.bdimg.com/it/u=533012005,1605503981&fm=26&gp=0.jpg", "password": false, "phone": "13450772009", "email": null, "status": 1, "create_time": 1558078514, "logintype": "phone", "token": "a33b95dc078100e8d36360b25416ec519082b9b1", "userinfo": { "id": 6, "user_id": 15, "age": 0, "sex": 0, "qg": 0, "job": "IT", "path": "广东广州", "birthday": "1990-11-11" } } } ``` ## **昵称/邮箱/手机号 密码登录** - **接口功能** 昵称/邮箱/手机号 密码登录 **URL** https://ceshi.chaohua-sxx.cn/api/v1/user/login **支持格式** JSON **HTTP请求方式** POST ##### 请求参数 | **参数** | **必选** | **类型** | 说明 | | -------- | -------- | -------- | ---------------- | | username | true | int | 昵称/邮箱/手机号 | | password | true | string | 密码 | ##### 接口示例 地址:https://ceshi.chaohua-sxx.cn/api/v1/user/login ``` { "msg": "登录成功", "data": { "id": 15, "username": "13450772009", "userpic": "http://img0.imgtn.bdimg.com/it/u=533012005,1605503981&fm=26&gp=0.jpg", "password": false, "phone": "13450772009", "email": null, "status": 1, "create_time": 1558078514, "logintype": "phone", "token": "a33b95dc078100e8d36360b25416ec519082b9b1", "userinfo": { "id": 6, "user_id": 15, "age": 0, "sex": 0, "qg": 0, "job": "IT", "path": "广东广州", "birthday": "1990-11-11" } } } ``` ## **第三方登录** - ##### **接口功能** 第三方登录 #### **URL** [https://ceshi.chaohua-sxx.cn/api/v1](https://ceshi.chaohua-sxx.cn/api/v1/user/otherlogin) ------ **支持格式** JSON **HTTP请求方式** POST ##### 请求参数 | **参数** | **必选** | **类型** | 说明 | | ---------- | -------- | -------- | ------------ | | provider | true | string | 第三方供应商 | | openid | true | string | openid | | expires_in | true | int | 失效时间 | | nickName | true | string | 昵称 | | avatarUrl | true | string | 头像 | ##### 接口示例 地址:https://ceshi.chaohua-sxx.cn/api/v1/user/otherlogin ``` // 第三方登录(未绑定手机号) { "msg": "登录成功", "data": { "id": 7, "type": "weixin", "openid": "oU0Yytz7ielo7Xw00LMgZsPeSDkQ", "user_id": 0, "nickname": "微信昵称", "avatarurl": "http://thirdwx.qlogo.cn/mmopen/vi_32/WiaWkkJjnG4WhI2KERDGPanF9GlNM3SWDTibibKEuHru1Jrd4pfGwialjn5tTCVLvEOq8RnZ8QmqkxyNAYXtuuGcBg/132", "logintype": "weixin", "token": "499b073624aefd42e61f7ff3f410a494e0eb1323", } } { "msg": "登录成功", "data": { "id": 7, "type": "weixin", "openid": "oU0Yytz7ielo7Xw00LMgZsPeSDkQ", "user_id": 17, "nickname": "微信昵称", "avatarurl": "http://thirdwx.qlogo.cn/mmopen/vi_32/WiaWkkJjnG4WhI2KERDGPanF9GlNM3SWDTibibKEuHru1Jrd4pfGwialjn5tTCVLvEOq8RnZ8QmqkxyNAYXtuuGcBg/132", "logintype": "weixin", "token": "81e61b691390b98e715927051dff4f9a21839ff8", "user": { "id": 17, "username": "13450772011", "userpic": "https://krplus-pic.b0.upaiyun.com/avatar/201812/28095646/fde0v5pcswzft2s8!120", "phone": "13450772011", "email": null, "status": 1, "create_time": "2019-05-17 17:14:59", "userinfo": { "id": 7, "user_id": 17, "age": 0, "sex": 0, "qg": 0, "job": "IT", "path": "广东广州", "birthday": "1990-11-11" } } } } ``` ## **退出登录** - ##### **接口功能** 退出登录 **URL** https://ceshi.chaohua-sxx.cn/api/v1/user/logout **支持格式** JSON **HTTP请求方式** POST ##### 请求参数 | **参数** | **必选** | **类型** | 说明 | | -------- | -------- | -------- | ----- | | token | true | string | token | ##### 接口示例 地址:https://ceshi.chaohua-sxx.cn/api/v1/user/logout{ ``` { "msg": "退出成功", "data": [] } ``` ## **获取文章所有分类** - ##### **接口功能** 获取文章所有分类 **URL** https://ceshi.chaohua-sxx.cn/api/v1/postclass **支持格式** JSON **HTTP请求方式** GET ##### 请求参数 无 ##### 接口示例 地址:https://ceshi.chaohua-sxx.cn/api/v1/postclass{ ``` { "msg": "获取成功", "data": { "list": [{ "id": 1, "classname": "关注" }, { "id": 2, "classname": "推荐" }, { "id": 3, "classname": "体育" }, { "id": 4, "classname": "热点" }, { "id": 5, "classname": "财经" }, { "id": 6, "classname": "娱乐" }] } } ``` ## **获取所有话题分类** - **接口功能** 获取所有话题分类 **URL** https://ceshi.chaohua-sxx.cn/api/v1/topicclass **支持格式** JSON **HTTP请求方式** GET ##### 请求参数 无 ##### 接口示例 地址:https://ceshi.chaohua-sxx.cn/api/v1/topicclass ``` { "msg": "获取成功", "data": { "list": [ { "id": 1, "classname": "关注" }, { "id": 2, "classname": "推荐" }, { "id": 3, "classname": "体育" }, { "id": 4, "classname": "热点" }, { "id": 5, "classname": "财经" }, { "id": 6, "classname": "娱乐" } ] } } ``` ## **获取热门话题** - **接口功能** 获取热门话题 **URL** https://ceshi.chaohua-sxx.cn/api/v1/hottopic **支持格式** JSON **HTTP请求方式** GET ##### 请求参数 无 ##### 接口示例: 地址:https://ceshi.chaohua-sxx.cn/api/v1/hottopic ``` { "msg": "获取成功", "data": { "list": [ { "id": 1, "title": "话题名称哈哈哈", "titlepic": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/topicpic/1.jpeg", "desc": "话题描述", "type": 1, "create_time": null, "topic_class_id": 1, "post_count": 4, "todaypost_count": 0 }, { "id": 2, "title": "话题名称", "titlepic": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/topicpic/1.jpeg", "desc": "话题描述", "type": 1, "create_time": null, "topic_class_id": 1, "post_count": 2, "todaypost_count": 0 }, { "id": 3, "title": "话题名称哈哈哈", "titlepic": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/topicpic/1.jpeg", "desc": "话题描述", "type": 1, "create_time": null, "topic_class_id": 1, "post_count": 0, "todaypost_count": 0 }, { "id": 4, "title": "话题名称哈哈哈", "titlepic": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/topicpic/1.jpeg", "desc": "话题描述", "type": 1, "create_time": null, "topic_class_id": 1, "post_count": 1, "todaypost_count": 0 }, { "id": 5, "title": "话题名称哈哈哈", "titlepic": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/topicpic/1.jpeg", "desc": "话题描述", "type": 1, "create_time": null, "topic_class_id": 1, "post_count": 0, "todaypost_count": 0 }, { "id": 6, "title": "话题名称哈哈哈", "titlepic": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/topicpic/1.jpeg", "desc": "话题描述", "type": 1, "create_time": null, "topic_class_id": 1, "post_count": 0, "todaypost_count": 0 }, { "id": 7, "title": "话题名称哈哈哈", "titlepic": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/topicpic/1.jpeg", "desc": "话题描述", "type": 1, "create_time": null, "topic_class_id": 1, "post_count": 0, "todaypost_count": 0 } ] } } ``` ## **获取指定话题分类下的话题列表** - **接口功能** 获取指定话题分类下的话题列表 **URL** https://ceshi.chaohua-sxx.cn/api/v1/topicclass/:id/topic/:page **支持格式** JSON **HTTP请求方式** GET ##### 请求参数 | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | ---------- | | id | true | int | 话题分类id | | page | true | int | 页码 | ##### 接口示例 地址:https://ceshi.chaohua-sxx.cn/api/v1/topicclass/1/topic/1{ ``` { "msg": "获取成功", "data": { "list": [ { "id": 1, "title": "话题名称哈哈哈", "titlepic": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/topicpic/1.jpeg", "desc": "话题描述", "type": 1, "create_time": null, "topic_class_id": 1, "post_count": 4, "todaypost_count": 0 }, { "id": 2, "title": "话题名称", "titlepic": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/topicpic/1.jpeg", "desc": "话题描述", "type": 1, "create_time": null, "topic_class_id": 1, "post_count": 2, "todaypost_count": 0 }, { "id": 3, "title": "话题名称哈哈哈", "titlepic": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/topicpic/1.jpeg", "desc": "话题描述", "type": 1, "create_time": null, "topic_class_id": 1, "post_count": 0, "todaypost_count": 0 }, { "id": 4, "title": "话题名称哈哈哈", "titlepic": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/topicpic/1.jpeg", "desc": "话题描述", "type": 1, "create_time": null, "topic_class_id": 1, "post_count": 1, "todaypost_count": 0 }, { "id": 5, "title": "话题名称哈哈哈", "titlepic": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/topicpic/1.jpeg", "desc": "话题描述", "type": 1, "create_time": null, "topic_class_id": 1, "post_count": 0, "todaypost_count": 0 }, { "id": 6, "title": "话题名称哈哈哈", "titlepic": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/topicpic/1.jpeg", "desc": "话题描述", "type": 1, "create_time": null, "topic_class_id": 1, "post_count": 0, "todaypost_count": 0 }, { "id": 7, "title": "话题名称哈哈哈", "titlepic": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/topicpic/1.jpeg", "desc": "话题描述", "type": 1, "create_time": null, "topic_class_id": 1, "post_count": 0, "todaypost_count": 0 } ] } } ``` ## **上传多图** - **接口功能** 上传多图 **URL** https://ceshi.chaohua-sxx.cn/api/v1/image/uploadmore **支持格式** JSON **HTTP请求方式** POST **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **请求参数** | **参数** | **必选** | **类型** | **说明** | | --------- | -------- | -------- | -------- | | imglist[] | true | array | 图片 | ##### 接口示例 地址:https://ceshi.chaohua-sxx.cn/api/v1/image/uploadmore{ ``` { "msg": "上传成功", "data": { "list": [ { "url": "http://api.qiushibk.com//uploads/20190618/5167aa01438581d81a82a98d1d9803f6.png", "user_id": 14, "create_time": 1560867044, "update_time": 1560867044, "id": "28" } ] } } ``` ## **发布文章** - **接口功能** 发布文章 **URL** https://ceshi.chaohua-sxx.cn/api/v1/post/create **支持格式** JSON **HTTP请求方式** POST **HEADERS** | **参数** | **必选** | **类型** | **说明** | | ------------ | -------- | -------- | ---------------- | | token | true | string | token | | Content-Type | true | string | application/json | **请求参数** ``` { "imglist": [ { "id": "19" }, { "id": "20" } ], "text": "12132", "isopen": 1, "topic_id": 1, "post_class_id": 1 } ``` **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/post/create ``` { "msg": "发布成功", "data": { "detail": { "id": 21, "user_id": 14, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "未知", "type": 0, "create_time": 1560867282, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "user": { "id": 14, "username": "123456", "userpic": null, "userinfo": { "id": 5, "user_id": 14, "age": 0, "sex": 2, "qg": 0, "job": null, "path": null, "birthday": null } }, "images": [], "share": null } } } ``` ## **获取文章详情** - **接口功能** 获取文章详情 **URL** https://ceshi.chaohua-sxx.cn/api/v1/post/:id **支持格式** JSON **HTTP请求方式** GET **请求参数** **无** **接口示例** 地址:[https://ceshi.chaohua-sxx.cn/api/v1/post/1](https://ceshi.chaohua-sxx.cn/api/v1/post/2) ``` { "msg": "获取成功", "data": { "detail": { "id": 2, "user_id": 7, "title": "测试2", "titlepic": "", "content": "uni-app 是一个使用 Vue.js 开发跨平台应用的前端框架,开发者编写一套代码,可编译到iOS、Android、H5、小程序等多个平台。", "sharenum": 0, "path": "广东佛山", "type": 0, "create_time": 1557581053, "post_class_id": 1, "share_id": 1, "isopen": 1, "status": 1, "user": { "id": 7, "username": "zcmcss", "userpic": null, "userinfo": { "id": 1, "user_id": 7, "age": 0, "sex": 2, "qg": 0, "job": null, "path": null, "birthday": null } }, "images": [ { "url": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/datapic/4.jpg", "pivot": { "id": 4, "post_id": 2, "image_id": 4, "create_time": null } }, { "url": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/datapic/5.jpg", "pivot": { "id": 5, "post_id": 2, "image_id": 5, "create_time": null } } ], "share": { "id": 1, "user_id": 12, "title": "最前线 | 微信调整公众号分成比例,收入不设上限留住好内容", "titlepic": "", "content": "uni-app 是一个使用 Vue.js 开发跨平台应用的前端框架,开发者编写一套代码,可编译到iOS、Android、H5、小程序等多个平台。", "sharenum": 0, "path": "广东深圳", "type": 0, "create_time": 1559297892, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1 } } } } ``` ## **获取指定话题下的文章列表** - **接口功能** 获取指定话题下的文章列表 **URL** https://ceshi.chaohua-sxx.cn/api/v1/topic/:id/post/:page **支持格式** JSON **HTTP请求方式** GET **请求参数** **无** **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/topic/1/post/1 ``` { "msg": "获取成功", "data": { "list": [ { "id": 1, "user_id": 12, "title": "最前线 | 微信调整公众号分成比例,收入不设上限留住好内容", "titlepic": "", "content": "uni-app 是一个使用 Vue.js 开发跨平台应用的前端框架,开发者编写一套代码,可编译到iOS、Android、H5、小程序等多个平台。", "sharenum": 0, "path": "广东深圳", "type": 0, "create_time": 1559297892, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 5, "user": { "id": 12, "username": "测试1", "userpic": "http://www.qiushibk.com/uploads/20190503/7201f83cbc5b84c728471eddde3e88ec.png", "fens": [] }, "images": [ { "url": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/datapic/1.jpg", "pivot": { "id": 1, "post_id": 1, "image_id": 1, "create_time": null } }, { "url": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/datapic/2.jpg", "pivot": { "id": 2, "post_id": 1, "image_id": 2, "create_time": null } }, { "url": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/datapic/3.jpg", "pivot": { "id": 3, "post_id": 1, "image_id": 3, "create_time": null } } ], "share": null, "support": [] }, { "id": 2, "user_id": 7, "title": "测试2", "titlepic": "", "content": "uni-app 是一个使用 Vue.js 开发跨平台应用的前端框架,开发者编写一套代码,可编译到iOS、Android、H5、小程序等多个平台。", "sharenum": 0, "path": "广东佛山", "type": 0, "create_time": 1557581053, "post_class_id": 1, "share_id": 1, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 7, "username": "zcmcss", "userpic": null, "fens": [] }, "images": [ { "url": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/datapic/4.jpg", "pivot": { "id": 4, "post_id": 2, "image_id": 4, "create_time": null } }, { "url": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/datapic/5.jpg", "pivot": { "id": 5, "post_id": 2, "image_id": 5, "create_time": null } } ], "share": { "id": 1, "user_id": 12, "title": "最前线 | 微信调整公众号分成比例,收入不设上限留住好内容", "titlepic": "", "content": "uni-app 是一个使用 Vue.js 开发跨平台应用的前端框架,开发者编写一套代码,可编译到iOS、Android、H5、小程序等多个平台。", "sharenum": 0, "path": "广东深圳", "type": 0, "create_time": 1559297892, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1 }, "support": [] }, { "id": 20, "user_id": 14, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "未知", "type": 0, "create_time": 1560063272, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 14, "username": "123456", "userpic": null, "fens": [] }, "images": [], "share": null, "support": [] }, { "id": 21, "user_id": 14, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "未知", "type": 0, "create_time": 1560867282, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 14, "username": "123456", "userpic": null, "fens": [] }, "images": [], "share": null, "support": [] } ] } } ``` ## **指定文章分类下的文章列表** - **接口功能** 指定文章分类下的文章列表 **URL** https://ceshi.chaohua-sxx.cn/api/v1/postclass/:id/post/:page **支持格式** JSON **HTTP请求方式** GET **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | false | string | | **请求参数** **无** **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/postclass/1/post/2 ``` { "msg": "获取成功", "data": { "list": [ { "id": 13, "user_id": 13, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "未知", "type": 0, "create_time": 1559543916, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 1, "comment_count": 0, "user": { "id": 13, "username": "昵称", "userpic": "http://api.qiushibk.com//uploads/20190603/cdba6fddff192734328a780e56b00681.png", "fens": [] }, "images": [], "share": null, "support": [] }, { "id": 14, "user_id": 14, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "未知", "type": 0, "create_time": 1560004398, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 14, "username": "123456", "userpic": null, "fens": [] }, "images": [], "share": null, "support": [] }, { "id": 15, "user_id": 14, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "未知", "type": 0, "create_time": 1560062852, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 14, "username": "123456", "userpic": null, "fens": [] }, "images": [], "share": null, "support": [] }, { "id": 16, "user_id": 14, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "未知", "type": 0, "create_time": 1560062934, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 14, "username": "123456", "userpic": null, "fens": [] }, "images": [], "share": null, "support": [] }, { "id": 17, "user_id": 14, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "未知", "type": 0, "create_time": 1560063040, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 14, "username": "123456", "userpic": null, "fens": [] }, "images": [], "share": null, "support": [] }, { "id": 18, "user_id": 14, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "未知", "type": 0, "create_time": 1560063128, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 14, "username": "123456", "userpic": null, "fens": [] }, "images": [], "share": null, "support": [] }, { "id": 19, "user_id": 14, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "未知", "type": 0, "create_time": 1560063173, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 14, "username": "123456", "userpic": null, "fens": [] }, "images": [], "share": null, "support": [] }, { "id": 20, "user_id": 14, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "未知", "type": 0, "create_time": 1560063272, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 14, "username": "123456", "userpic": null, "fens": [] }, "images": [], "share": null, "support": [] }, { "id": 21, "user_id": 14, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "未知", "type": 0, "create_time": 1560867282, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 14, "username": "123456", "userpic": null, "fens": [] }, "images": [], "share": null, "support": [] } ] } } ``` ## **指定用户下的文章列表** - ##### **接口功能** 指定用户下的文章列表 **URL** https://ceshi.chaohua-sxx.cn/api/v1/user/:id/post/:page **支持格式** JSON **HTTP请求方式** GET **请求参数** **无** **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/user/15/post/1 ``` {"msg": "获取成功","data": {"list": [] } } ``` ## **指定用户下的所有文章列表** - **接口功能** 指定用户下的所有文章列表 **URL** https://ceshi.chaohua-sxx.cn/api/v1/user/post/:page **支持格式** JSON **HTTP请求方式** GET **HEADERS** | **参数** | **必选** | **类型** | **说明** | | ------------ | -------- | -------- | ---------------- | | token | true | string | token | | Content-Type | true | string | application/json | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/user/post/1 ## **搜索话题** - **接口功能** 搜索话题 **URL** https://ceshi.chaohua-sxx.cn/api/v1/search/topic **支持格式** JSON **HTTP请求方式** POST **请求参数** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | keyword | true | int | 关键词 | | page | true | int | 页码 | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/search/topic ``` { "msg": "获取成功", "data": { "list": [ { "id": 1, "title": "话题名称哈哈哈", "titlepic": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/topicpic/1.jpeg", "desc": "话题描述", "type": 1, "create_time": null, "topic_class_id": 1, "post_count": 4, "todaypost_count": 1 }, { "id": 2, "title": "话题名称", "titlepic": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/topicpic/1.jpeg", "desc": "话题描述", "type": 1, "create_time": null, "topic_class_id": 1, "post_count": 0, "todaypost_count": 0 } ] } } ``` ## **搜索文章** - **接口功能** 搜索文章 **URL** https://ceshi.chaohua-sxx.cn/api/v1/search/post **支持格式** JSON **HTTP请求方式** POST **请求参数** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | keyword | true | int | 关键词 | | page | true | int | 页码 | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/search/post ``` { "msg": "获取成功", "data": { "list": [ { "id": 3, "user_id": 12, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "广东-广州-白云11", "type": 0, "create_time": 1557581053, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 12, "username": "测试1", "userpic": "http://www.qiushibk.com/uploads/20190503/7201f83cbc5b84c728471eddde3e88ec.png", "fens": [] }, "images": [ { "url": "http://api.qiushibk.com//uploads/20190503/827850ec0c58089b7081119d86f5cb65.png", "pivot": { "id": 6, "post_id": 3, "image_id": 19, "create_time": null } }, { "url": "http://api.qiushibk.com//uploads/20190503/2e1619e6da0b7bcd1bb102096cb0c781.png", "pivot": { "id": 7, "post_id": 3, "image_id": 20, "create_time": null } } ], "share": null, "support": [] }, { "id": 4, "user_id": 12, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "广东-广州-白云11", "type": 0, "create_time": 1557581053, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 12, "username": "测试1", "userpic": "http://www.qiushibk.com/uploads/20190503/7201f83cbc5b84c728471eddde3e88ec.png", "fens": [] }, "images": [ { "url": "http://api.qiushibk.com//uploads/20190503/827850ec0c58089b7081119d86f5cb65.png", "pivot": { "id": 8, "post_id": 4, "image_id": 19, "create_time": 0 } }, { "url": "http://api.qiushibk.com//uploads/20190503/2e1619e6da0b7bcd1bb102096cb0c781.png", "pivot": { "id": 9, "post_id": 4, "image_id": 20, "create_time": 0 } } ], "share": null, "support": [] }, { "id": 5, "user_id": 12, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "广东-广州-白云11", "type": 0, "create_time": 1557581053, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 12, "username": "测试1", "userpic": "http://www.qiushibk.com/uploads/20190503/7201f83cbc5b84c728471eddde3e88ec.png", "fens": [] }, "images": [ { "url": "http://api.qiushibk.com//uploads/20190503/827850ec0c58089b7081119d86f5cb65.png", "pivot": { "id": 10, "post_id": 5, "image_id": 19, "create_time": 1556872203 } }, { "url": "http://api.qiushibk.com//uploads/20190503/2e1619e6da0b7bcd1bb102096cb0c781.png", "pivot": { "id": 11, "post_id": 5, "image_id": 20, "create_time": 1556872203 } } ], "share": null, "support": [] }, { "id": 8, "user_id": 12, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "广东-广州-白云11", "type": 0, "create_time": 1557581053, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 12, "username": "测试1", "userpic": "http://www.qiushibk.com/uploads/20190503/7201f83cbc5b84c728471eddde3e88ec.png", "fens": [] }, "images": [ { "url": "http://api.qiushibk.com//uploads/20190503/2e1619e6da0b7bcd1bb102096cb0c781.png", "pivot": { "id": 12, "post_id": 8, "image_id": 20, "create_time": 1556872774 } } ], "share": null, "support": [] }, { "id": 9, "user_id": 12, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "广东-广州-白云11", "type": 0, "create_time": 1557581053, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 12, "username": "测试1", "userpic": "http://www.qiushibk.com/uploads/20190503/7201f83cbc5b84c728471eddde3e88ec.png", "fens": [] }, "images": [ { "url": "http://api.qiushibk.com//uploads/20190503/2e1619e6da0b7bcd1bb102096cb0c781.png", "pivot": { "id": 13, "post_id": 9, "image_id": 20, "create_time": 1556872856 } } ], "share": null, "support": [] }, { "id": 10, "user_id": 14, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "未知", "type": 0, "create_time": 1557581053, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 14, "username": "123456", "userpic": null, "fens": [] }, "images": [], "share": null, "support": [] }, { "id": 11, "user_id": 14, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "未知", "type": 0, "create_time": 1557581053, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 14, "username": "123456", "userpic": null, "fens": [] }, "images": [], "share": null, "support": [] }, { "id": 12, "user_id": 13, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "未知", "type": 0, "create_time": 1557581053, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 13, "username": "昵称", "userpic": "http://api.qiushibk.com//uploads/20190603/cdba6fddff192734328a780e56b00681.png", "fens": [] }, "images": [], "share": null, "support": [] }, { "id": 13, "user_id": 13, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "未知", "type": 0, "create_time": 1559543916, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 1, "comment_count": 0, "user": { "id": 13, "username": "昵称", "userpic": "http://api.qiushibk.com//uploads/20190603/cdba6fddff192734328a780e56b00681.png", "fens": [] }, "images": [], "share": null, "support": [] }, { "id": 14, "user_id": 14, "title": "12132", "titlepic": "", "content": "12132", "sharenum": 0, "path": "未知", "type": 0, "create_time": 1560004398, "post_class_id": 1, "share_id": 0, "isopen": 1, "status": 1, "ding_count": 0, "cai_count": 0, "comment_count": 0, "user": { "id": 14, "username": "123456", "userpic": null, "fens": [] }, "images": [], "share": null, "support": [] } ] } } ``` ## **搜索用户** - **接口功能** 搜索用户 **URL** https://ceshi.chaohua-sxx.cn/api/v1/search/user **支持格式** JSON **HTTP请求方式** POST **请求参数** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | keyword | true | int | 关键词 | | page | true | int | 页码 | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/search/user ``` { "msg": "获取成功", "data": { "list": [ { "id": 12, "username": "测试1", "userpic": "http://www.qiushibk.com/uploads/20190503/7201f83cbc5b84c728471eddde3e88ec.png", "phone": "13450772007", "email": "1236@qq.com", "status": 1, "create_time": 1556431201, "userinfo": { "id": 2, "user_id": 12, "age": 0, "sex": 1, "qg": 1, "job": "IT", "path": "广东-广州-白云11", "birthday": "1997-11-10" } } ] } } ``` ## **获取广告列表** - **接口功能** 搜索用户 **URL** https://ceshi.chaohua-sxx.cn/api/v1/adsense/:type **支持格式** JSON **HTTP请求方式** GET **请求参数** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | ------------ | | type | true | int | 广告类型 0/1 | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/adsense/1 ``` { "msg": "获取成功", "data": { "list": [ { "id": 4, "src": "https://tangzhe123-com.oss-cn-shenzhen.aliyuncs.com/Appstatic/qsbk/demo/demo20.jpg", "url": "#", "type": 1, "create_time": null } ] } } ``` ## **绑定手机号** - **接口功能** 绑定手机号 **URL** https://ceshi.chaohua-sxx.cn/api/v1/user/bindphone **支持格式** JSON **HTTP请求方式** POST **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **请求参数** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | phone | true | int | 手机号 | | code | true | int | 验证码 | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/user/bindphone ## **绑定邮箱** - ##### **接口功能** 绑定邮箱 **URL** https://ceshi.chaohua-sxx.cn/api/v1/user/bindemail **支持格式** JSON **HTTP请求方式** POST **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **请求参数** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | email | true | string | 邮箱 | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/user/bindemail ## **绑定第三方** - **接口功能** 绑定第三方 **URL** https://ceshi.chaohua-sxx.cn/api/v1/user/bindother **支持格式** JSON **HTTP请求方式** POST **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **请求参数** | **参数** | **必选** | **类型** | **说明** | | --------- | -------- | -------- | ------------ | | provider | true | string | 第三方供应商 | | openid | true | string | openid | | nickName | true | string | 昵称 | | avatarUrl | true | string | 头像 | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/user/bindother ## **用户顶踩** - **接口功能** 用户顶踩 **URL** https://ceshi.chaohua-sxx.cn/api/v1/support **支持格式** JSON **HTTP请求方式** POST **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **请求参数** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | --------- | | post_id | true | int | 文章id | | type | true | int | 0 顶 1 踩 | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/support ## **用户评论** - **接口功能** 用户评论 **URL** https://ceshi.chaohua-sxx.cn/api/v1/post/comment **支持格式** JSON **HTTP请求方式** POST **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **请求参数** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------------------- | | fid | true | int | 回复id 默认0顶级评论 | | data | true | string | 内容 | | post_id | true | int | 文章id | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/post/comment ## **获取文章评论列表** - **接口功能** 获取文章评论列表 **URL** https://ceshi.chaohua-sxx.cn/api/v1/post/:id/comment **支持格式** JSON **HTTP请求方式** GET **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/post/2/comment ## **修改头像** - **接口功能** 修改头像 **URL** https://ceshi.chaohua-sxx.cn/api/v1/edituserpic **支持格式** JSON **HTTP请求方式** POST **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **请求参数** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | userpic | true | file | 用户头像 | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/edituserpic ## **修改资料** - **接口功能** 修改资料 **URL** https://ceshi.chaohua-sxx.cn/api/v1/edituserinfo **支持格式** JSON **HTTP请求方式** POST **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **请求参数** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | name | true | string | 昵称 | | sex | true | int | 性别 | | qg | true | int | 情感 | | job | true | string | 工作 | | birthday | true | string | 生日 | | path | true | string | 地址 | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/edituserinfo ## **修改密码** - **接口功能** 修改密码 **URL** https://ceshi.chaohua-sxx.cn/api/v1/repassword **支持格式** JSON **HTTP请求方式** POST **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **请求参数** | **参数** | **必选** | **类型** | **说明** | | ------------- | -------- | -------- | -------- | | oldpassword | false | string | 原密码 | | newpassword | true | string | 新密码 | | renewpassword | true | string | 确认密码 | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/repassword ## **加入黑名单** - **接口功能** 加入黑名单 **URL** https://ceshi.chaohua-sxx.cn/api/v1/addblack **支持格式** JSON **HTTP请求方式** POST **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **请求参数** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | id | true | int | 拉黑id | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/addblack ## **移除黑名单** - **接口功能** 移除黑名单 **URL** https://ceshi.chaohua-sxx.cn/api/v1/removeblack **支持格式** JSON **HTTP请求方式** POST **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **请求参数** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | phone | true | int | 手机号 | | id | true | int | 拉黑id | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/removeblack ## **关注用户** - **接口功能** 关注用户 **URL** https://ceshi.chaohua-sxx.cn/api/v1/follow **支持格式** JSON **HTTP请求方式** POST **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **请求参数** | **参数** | **必选** | **类型** | **说明** | | --------- | -------- | -------- | ---------- | | follow_id | true | int | 关注用户id | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/follow ## **取消关注** - **接口功能** 取消关注 **URL** https://ceshi.chaohua-sxx.cn/api/v1/unfollow **支持格式** JSON **HTTP请求方式** POST **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **请求参数** | **参数** | **必选** | **类型** | **说明** | | --------- | -------- | -------- | -------------- | | follow_id | true | int | 取消关注用户id | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/unfollow ## **互关列表** - **接口功能** 互关列表 **URL** https://ceshi.chaohua-sxx.cn/api/v1/friends/:page **支持格式** JSON **HTTP请求方式** GET **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/friends/1 ## **粉丝列表** - **接口功能** 粉丝列表 **URL** https://ceshi.chaohua-sxx.cn/api/v1/fens/:page **支持格式** JSON **HTTP请求方式** GET **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/fens/1 ## **关注列表** - **接口功能** 关注列表 **URL** https://ceshi.chaohua-sxx.cn/api/v1/follows/:page **支持格式** JSON **HTTP请求方式** GET **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/follows/1 ## **用户反馈** - **接口功能** 用户反馈 **URL** https://ceshi.chaohua-sxx.cn/api/v1/feedback **支持格式** JSON **HTTP请求方式** POST **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **请求参数** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | data | true | int | 反馈信息 | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/feedback ## **获取用户反馈列表** - **接口功能** 获取用户反馈列表 **URL** https://ceshi.chaohua-sxx.cn/api/v1/feedbacklist/:page **支持格式** JSON **HTTP请求方式** GET **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **请求参数** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | page | true | int | 页码 | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/feedbacklist/1 ## **检测更新** - **接口功能** 检测更新 **URL** https://ceshi.chaohua-sxx.cn/api/v1/update **支持格式** JSON **HTTP请求方式** POST **请求参数** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | ver | true | int | 版本号 | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/update ## **获取消息队列** - **接口功能** 获取消息队列 **URL** https://ceshi.chaohua-sxx.cn/api/v1/chat/get **支持格式** JSON **HTTP请求方式** POST **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/chat/get ## **发送消息** - **接口功能** 发送消息 **URL** https://ceshi.chaohua-sxx.cn/api/v1/chat/send **支持格式** JSON **HTTP请求方式** POST **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **请求参数** | **参数** | **必选** | **类型** | **说明** | | ------------- | -------- | -------- | -------------------- | | to_id | true | int | 接收id | | from_userpic | true | string | 发送人昵称 | | from_username | true | string | 发送人头像 | | type | true | string | 发送类型,仅支持text | | data | true | string | 内容 | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/chat/send ## **统计用户相关数据** - **接口功能** 统计用户相关数据 **URL** https://ceshi.chaohua-sxx.cn/api/v1/user/getcounts/:id **支持格式** JSON **HTTP请求方式** GET **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **请求参数** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | id | false | int | 用户id | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/user/getcounts/12 ``` { "msg": "获取成功", "data": { "post_count": 6, "comments_count": 3, "today_posts_count": 0, "withfollow_count": 2, "withfen_count": 2, "total_ding_count": 0, "friend_count": 2 } } ``` ## **获取当前用户第三方登录绑定情况** - **接口功能** 获取当前用户第三方登录绑定情况 **URL** https://ceshi.chaohua-sxx.cn/api/v1/user/getuserbind **支持格式** JSON **HTTP请求方式** GET **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | false | string | token | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/getuserbind ``` { "msg": "获取成功", "data": { "weixin": { "id": 7, "nickname": "鸣人" } } } ``` ## **获取我关注的人的公开文章列表** - **接口功能** 获取我关注的人的公开文章列表 **URL** https://ceshi.chaohua-sxx.cn/api/v1/followpost/:page **支持格式** JSON **HTTP请求方式** GET **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | false | string | token | **请求参数** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | page | true | int | 页码 | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/followpost/1 ## **获取用户详细信息** - **接口功能** 获取用户详细信息 **URL** https://ceshi.chaohua-sxx.cn/api/v1/getuserinfo **支持格式** JSON **HTTP请求方式** POST **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | false | string | token | **请求** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | user_id | true | int | 用户id | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/user/getcounts/12 ``` { "msg": "获取成功", "data": { "post_count": 2, "comments_count": 2, "today_posts_count": 0, "withfollow_count": 2, "withfen_count": 48, "total_ding_count": 2, "friend_count": 0 } } ``` ## **聊天用户绑定上线** - **接口功能** 聊天用户绑定上线 **URL** https://ceshi.chaohua-sxx.cn/api/v1/chat/bind **支持格式** JSON **HTTP请求方式** POST **HEADERS** | **参数** | **必选** | **类型** | **说明** | | -------- | -------- | -------- | -------- | | token | true | string | token | **请求** | **参数** | **必选** | **类型** | **说明** | | --------- | -------- | -------- | ------------ | | type | true | string | 类型:bind | | client_id | true | string | 当前客户端id | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/chat/bind ``` { "msg": "绑定成功", "data": { "type": "bind", "status": true } } ``` ## **微信小程序登录** - **接口功能** 聊天用户绑定上线 **URL** https://ceshi.chaohua-sxx.cn/api/v1/wxlogin **支持格式** JSON **HTTP请求方式** POST **请求参数** | **参数** | **必选** | **类型** | **说明** | | --------- | -------- | -------- | -------- | | code | true | string | code | | nickName | true | string | 昵称 | | avatarUrl | true | string | 头像 | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/wxlogin ## **支付宝小程序登录** - **接口功能** 支付宝小程序登录 **URL** https://ceshi.chaohua-sxx.cn/api/v1/alilogin **支持格式** JSON **HTTP请求方式** POST **请求参数** | **参数** | **必选** | **类型** | **说明** | | --------- | -------- | -------- | -------- | | code | true | string | code | | nickName | true | string | 昵称 | | avatarUrl | true | string | 头像 | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/alilogin ## **用户名注册账号** - **接口功能** 用户名注册 **URL** https://ceshi.chaohua-sxx.cn/api/v1/user/reg **支持格式** JSON **HTTP请求方式** POST **请求参数** | **参数** | **必选** | **类型** | **说明** | | ---------- | -------- | -------- | -------- | | username | true | string | 账号 | | password | true | string | 密码 | | repassword | true | string | 确认密码 | **接口示例** 地址:https://ceshi.chaohua-sxx.cn/api/v1/user/reg ``` { "msg": "注册成功", "data": { "username": "zcmcss3", "password": true, "create_time": 1604847504, "update_time": 1604847504, "id": "539", "logintype": "username", "token": "2e4c1cdfef6c46d18f0f83b6d7863cff12c57073", "userinfo": { "id": 529, "user_id": 539, "age": 0, "sex": 2, "qg": 0, "job": null, "path": null, "birthday": null }, "email": false } } ```