🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## 会员中心(User) ## 个人中心\[index\]【需登录】 个人中心 ### 请求URL http://www.yoursite.com/addons/cms/api.user/index ### 请求方法 GET ### 返回值 ~~~scss { "code": 1, "msg": "", "time": "1616752557", "data": { "userInfo": { "id": 1, "username": "admin", "nickname": "admin", "mobile": "13888888888", "avatar": "", "level": 5, "vip": 7, "gender": 0, "bio": "个性签名", "money": "839.52", "score": 1970, "token": "227e6c54-ffbb-46c0-8856-85dd52f59fe6", "user_id": 1, "createtime": 1616752140, "expiretime": 1619344140, "expires_in": 2591582, "vipInfo": { "name": "特殊会员", "level": 7, "expiredate": "2021-09-15 11:17:15", "remainseconds": 14923277, "image": "/uploads/2021/20210317/78f8266d4df2ad81eb42da2ca14f8208.png", "rightdata": [ { "text": "免费阅读", "intro": "读免费阅读", "image": "/uploads/2021/20210317/78f8266d4df2ad81eb42da2ca14f8208.png" }, { "text": "全站浏览", "intro": "全站浏览全站浏览全站浏览全站浏览全站浏览全站浏览", "image": "/uploads/2021/20210317/78f8266d4df2ad81eb42da2ca14f8208.png" }, { "text": "高级登录", "intro": "高级登录高级登录高级登录高级登录高级登录", "image": "/uploads/2021/20210317/78f8266d4df2ad81eb42da2ca14f8208.png" }, { "text": "测试测试", "intro": "测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试", "image": "/uploads/2021/20210317/78f8266d4df2ad81eb42da2ca14f8208.png" } ] }, "is_install_vip": true, "is_install_signin": true } } } ~~~ ## 修改个人资料\[profile\]【需登录】 修改个人资料 ### 请求URL http://www.yoursite.com/addons/cms/api.user/profile ### 请求方法 POST ### 请求参数 | Body参数名 | 类型 | 必需 | 描述 | 示例 e.g. | | --- | --- | --- | --- | --- | | username | string | 是 | 用户名 | admin | | nickname | string | 是 | 昵称 | 昵称 | | bio | string | 是 | 事件名称 | 个性签名 | | avatar | string | 否 | 事件名称 | /uploads/2021/20210317/78f8266d4df2ad81eb42da2ca14f8208.png | ### 返回值 ~~~json { "code": 1, "msg": "修改成功!", "time": "1616638965", "data": null } ~~~ ## 保存头像\[avatar\]【需登录】 保存头像 ### 请求URL http://www.yoursite.com/addons/cms/api.user/avatar ### 请求方法 POST ### 请求参数 | Body参数名 | 类型 | 必需 | 描述 | 示例 e.g. | | --- | --- | --- | --- | --- | | avatar | string | 否 | 事件名称 | /uploads/2021/20210317/78f8266d4df2ad81eb42da2ca14f8208.png | ### 返回值 ~~~json { "code": 1, "msg": "修改成功!", "time": "1616638965", "data": null } ~~~ ## 注销登录\[logout\]【需登录】 注销登录 ### 请求URL http://www.yoursite.com/addons/cms/api.user/logout ### 请求方法 GET ### 返回值 ~~~json { "code": 1, "msg": "退出成功", "time": "1616638965", "data": null } ~~~ ## 获取公众号分享配置\[getSigned\]【免登录】 获取公众号分享配置 ### 请求URL http://www.yoursite.com/addons/cms/api.user/getSigned ### 请求方法 GET ### 请求参数 | Body参数名 | 类型 | 必需 | 描述 | 示例 e.g. | | --- | --- | --- | --- | --- | | url | string | 是 | 当前页面url | http://www.fa.com/addons/cms/index ### 返回值 ~~~css { "code": 1, "msg": "", "time": "1616753101", "data": { "appId": "wx9sdfdfasdfsdfsaf8ff", "nonceStr": "tVybKMgmTca7FIEJ", "timestamp": 1616753101, "url": "http://www.fa.com/addons/cms/index", "signature": "a8sdfacsdf5076eerwer56sdfsdf6d", "rawString": "jsapi_ticket=&noncestr=tVybKMgmTca7FIEJ&timestamp=1616753101&url=http://www.fa.com/addons/cms/index", "jsticket": "" } } ~~~