@cfygaoyang
2018-02-06T08:21:59.000000Z
字数 9625
阅读 473
sds
GET /api/web/get_token?account=18888888888&verify_code=123456
GET /api/web/get_token?account=18888888888&password=123456
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
account | 字符串 | 是 | 手机或邮箱 |
verify_code | 字符串 | 是 | 验证码 |
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
account | 字符串 | 是 | 手机或邮箱 |
password | 字符串 | 是 | 密码 |
* 请求回调
{
"message":{
"token_expire_in":604800,
"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoidG9rZW4iLCJ1c2VyX2lkIjoxLCJ0b2tlbl90aW1lIjoxNTA4NDY3NDAyfQ.ps7dPdN6-16ip5f4-fgfBZ5ye9Qu6oH9ADjz0iH1nvs",
"refresh_token_expire_in":1209600,
"refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaF90b2tlbiIsInVzZXJfaWQiOjEsInRva2VuX3RpbWUiOjE1MDkwNzIyMDJ9.1r6PRGStReI1YFUrgggCovF5DAiS9gWMBY8DXOi2zPs"
},
"code":0
}
参数 | 类型 | 说明 |
---|---|---|
token_expire_in | 整形 | token有效时间(秒) |
token | 字符串 | token |
refresh_token_expire_in | 整形 | refresh_token有效时间(秒) |
refresh_token | 字符串 | refresh_token |
PUT /api/web/reset_token
{
"refresh_token": "1234567890"
}
{
"message":{
"token_expire_in":604800,
"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoidG9rZW4iLCJ1c2VyX2lkIjoxLCJ0b2tlbl90aW1lIjoxNTA4NDY3NDAyfQ.ps7dPdN6-16ip5f4-fgfBZ5ye9Qu6oH9ADjz0iH1nvs",
"refresh_token_expire_in":1209600,
"refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaF90b2tlbiIsInVzZXJfaWQiOjEsInRva2VuX3RpbWUiOjE1MDkwNzIyMDJ9.1r6PRGStReI1YFUrgggCovF5DAiS9gWMBY8DXOi2zPs"
},
"code":0
}
参数 | 类型 | 说明 |
---|---|---|
token_expire_in | 整形 | token有效时间(秒) |
token | 字符串 | token |
refresh_token_expire_in | 整形 | refresh_token有效时间(秒) |
refresh_token | 字符串 | refresh_token |
GET /api/get_verify_code?account=18888888888
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
account | 字符串 | 是 | 手机或邮箱 |
{
"code": 0,
"message": {
"verify_code": "123456"
}
}
PUT /web/reset_password
{
"Authorization" :"1234567890qwertyuio"
}
{
"admin_password": "1234567890"
}
{
"code": 0,
"message": "reset_password success"
}
GET /web/user
{
"Authorization" :"1234567890qwertyuio"
}
{
"message": {
"id": 1,
"admin_telephone": "18656660930",
"admin_password": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXNzd29yZCI6IjEyMzQ1NiJ9.tj8r8ucscDj-q9IxWzMKSE8-HbJI2qOhqk8Nzh8RR_s",
"admin_username": "菊花",
"admin_email": "",
"admin_permission": 0,
"app_id": "71d04c96-512d-4041-b916-858333ef663e",
"created_at": "2018-01-09T11:13:02.734000",
"updated_at": "2018-01-09T12:01:51.469000"
},
"code": 0
}
PUT /web/user
{
"Authorization" :"1234567890qwertyuio"
}
{
"admin_username": "菊花"
}
{
"message": {
"id": 1,
"admin_telephone": "18656660930",
"admin_password": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXNzd29yZCI6IjEyMzQ1NiJ9.tj8r8ucscDj-q9IxWzMKSE8-HbJI2qOhqk8Nzh8RR_s",
"admin_username": "菊花",
"admin_email": "",
"admin_permission": 0,
"app_id": "71d04c96-512d-4041-b916-858333ef663e",
"created_at": "2018-01-09T11:13:02.734000",
"updated_at": "2018-01-09T12:01:51.469000"
},
"code": 0
}
GET /web/appuser?page={page}&user_telephone={user_telephone}&user_name={user_name}
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
user_telephone | 字符串 | 否 | 手机号 |
user_name | 字符串 | 否 | 用户名 |
page | 整数 | 否 | 页数 |
备注:user_telephone优先级大于user_name,不填则搜索全部用户
{
"Authorization" :"1234567890qwertyuio"
}
{
"message": {
"total": 2,
"data": [
... ...
],
"pages": 1,
"page_size": 20,
"current_page": 1
},
"code": 0
}
POST /web/appuser
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
user_telephone | 字符串 | 是 | 手机号 |
user_password | 字符串 | 是 | 密码 |
user_name | 字符串 | 否 | 用户名 |
user_sex | 字符串 | 否 | 性别 0:女 1:男 |
user_birthday | 字符串 | 否 | 生日 |
user_city | 字符串 | 否 | 城市 |
* 请求Header
{
"Authorization" :"1234567890qwertyuio"
}
{
"message": {
"user_sex": 0,
"user_id": 3,
"user_name": "13000000000",
"created_at": "2018-01-09T15:40:31.397",
"app_id": "71d04c96-512d-4041-b916-858333ef663e",
"updated_at": "2018-01-09T15:40:31.397",
"user_city": "",
"b.user_id": 3,
"b.updated_at": "2018-01-09T15:40:31.411",
"b.created_at": "2018-01-09T15:40:31.410",
"user_email": "",
"user_birthday": "",
"user_avatar": "",
"b.app_id": "71d04c96-512d-4041-b916-858333ef663e",
"user_message_id": 3,
"user_password": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXNzd29yZCI6IjEyMzQ1NiJ9.tj8r8ucscDj-q9IxWzMKSE8-HbJI2qOhqk8Nzh8RR_s",
"user_telephone": "13000000000"
},
"code": 0
}
PUT /web/appuser/{user_id}
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
user_id | 整数 | 是 | 用户ID |
user_name | 字符串 | 否 | 用户名 |
user_sex | 字符串 | 否 | 性别 0:女 1:男 |
user_birthday | 字符串 | 否 | 生日 |
user_city | 字符串 | 否 | 城市 |
user_password | 字符串 | 否 | 修改密码 6-16位 |
* 请求Header
{
"Authorization" :"1234567890qwertyuio"
}
{
"user_sex":0,
"user_name":"王五",
"user_birthday":"2015-12-1",
"user_city": "shanghai"
}
{
"message": {
"user_sex": 0,
"user_id": 5,
"user_name": "王五",
"created_at": "2018-01-09T16:18:11.194",
"app_id": "71d04c96-512d-4041-b916-858333ef663e",
"updated_at": "2018-01-09T16:18:11.194",
"user_city": "shanghai",
"b.user_id": 5,
"b.updated_at": "2018-01-09T16:23:03.032",
"b.created_at": "2018-01-09T16:18:11.256",
"user_email": "",
"user_birthday": "2015-12-1",
"user_avatar": "",
"b.app_id": "71d04c96-512d-4041-b916-858333ef663e",
"user_message_id": 7,
"user_password": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXNzd29yZCI6IjEyMzQ1NiJ9.tj8r8ucscDj-q9IxWzMKSE8-HbJI2qOhqk8Nzh8RR_s",
"user_telephone": "13000000001"
},
"code": 0
}
DELETE /web/appuser/{user_id}
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
user_id | 整数 | 是 | 用户ID |
* 请求Header
{
"Authorization" :"1234567890qwertyuio"
}
{
"message": "success",
"code": 0
}
GET /web/feedback?page={PAGE}
{
"Authorization" :"1234567890qwertyuio"
}
{
"message": {
"total": 1,
"data": [反馈信息列表],
"pages": 1,
"page_size": 20,
"current_page": 1
},
"code": 0
}
GET /web/feedback/{pk}
{
"Authorization" :"1234567890qwertyuio"
}
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
pk | 整形 | 是 | 反馈主键 feedback_id |
{
"code": 0,
"message": {反馈信息}
}
PUT /web/feedback/{pk}
{
"Authorization" :"1234567890qwertyuio"
}
{
"feedback_title": "标题",
"feedback_content": "描述",
"user_id": 1
}
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
feedback_title | 字符串 | 是 | 反馈标题 |
feedback_content | 字符串 | 是 | 反馈描述 |
user_id | 整型 | 是 | 反馈该信息的用户ID |
* 请求回调
{
"code": 0,
"message": {反馈信息}
}
DELETE /web/feedback/{pk}
{
"Authorization" :"1234567890qwertyuio"
}
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
pk | 整形 | 是 | 反馈主键 feedback_id |
{
"code": 0,
"message": "success"
}
GET /web/feedback_reply/{pk}?page={PAGE}
{
"Authorization" :"1234567890qwertyuio"
}
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
pk | 整形 | 是 | 反馈信息主键 feedback_id |
{
"message": {
"total": 1,
"data": [回复信息列表],
"pages": 1,
"page_size": 20,
"current_page": 1
},
"code": 0
}
POST /web/feedback_reply/{pk}
{
"Authorization" :"1234567890qwertyuio"
}
{
"reply_content": "回复内容",
"feedback_status" : 1
}
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
pk | 整形 | 是 | 反馈信息主键 feedback_id |
reply_content | 字符串 | 是 | 回复内容 |
feedback_status | 整形 | 是 | 反馈状态;0待处理1处理中2已关闭 |
* 请求回调
{
"code": 0,
"message": {回复信息}
}
DELETE /web/feedback_reply/{pk}
{
"Authorization" :"1234567890qwertyuio"
}
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
pk | 整形 | 是 | 反馈信息主键 reply_id |
* 请求回调
{
"code": 0,
"message": "success"
}
POST /web/faq
{
"Authorization" :"1234567890qwertyuio"
}
{
"faq_type": "类型",
"faq_title": "标题",
"faq_content": "描述"
}
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
faq_type | 字符串 | 否 | 类型 |
faq_title | 字符串 | 否 | 标题 |
faq_content | 字符串 | 否 | 描述 |
{
"message": {
"faq_id": 1,
"faq_type": "a",
"faq_title": "aaaa",
"faq_content": "bbbb"
},
"code": 0
}
GET /web/faq?app_id={app_id}
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
app_id | 字符串 | 是 | 厂商app_id |
{
"message": {
"total": 2,
"data": [
{
"faq_id":1,
"app_id": xxx-xxx-xxx,
"created_at": "2017-11-06T09:45:38.299864",
"updated_at": "2017-11-06T09:45:38.300084",
"faq_type": "faq类型1",
"faq_title": "faq标题1",
"faq_content": "faq内容1"
}
],
"pages":1,
"pages_size":20,
"current_page":1
},
"code": 0
}
GET /web/faq/{faq_id}
{
"Authorization" :"1234567890qwertyuio"
}
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
faq_id | 整形 | 是 | 主键 faq_id |
{
"message": {
"faq_id": 1,
"faq_type": "a",
"faq_title": "aaaa",
"faq_content": "bbbb"
},
"code": 0
}
PUT /web/faq/{faq_id}
{
"Authorization" :"1234567890qwertyuio"
}
{
"faq_type": "类型",
"faq_title": "标题",
"faq_content": "描述"
}
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
faq_type | 字符串 | 否 | FAQ类型 |
faq_title | 字符串 | 否 | FAQ标题 |
faq_content | 字符串 | 否 | FAQ描述 |
{
"message": {
"faq_id": 1,
"faq_title": "aaaa",
"faq_content": "ccccc"
},
"code": 0
}
DELETE /web/faq/{faq_id}
{
"Authorization" :"1234567890qwertyuio"
}
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
faq_id | 整形 | 是 | 主键 faq_id |
{
"message": "success",
"code": 0
}
GET /scroll
{
"message": {
"total": 1,
"data": [
{
"scroll_id": 2,
"app_id": "3758749b-4a05-492f-b737-08d0c142e3dc",
"created_at": "2018-01-22T11:07:24.834000",
"updated_at": "2018-01-22T11:07:32.258000",
"scroll_picture": "http://img.zcool.cn/community/018d4e554967920000019ae9df1533.jpg@900w_1l_2o_100sh.jpg",
"scroll_order": 1,
"scroll_jump": "http://baidu.com"
}
],
"pages": 1,
"page_size": 20,
"current_page": 1
},
"code": 0
}
GET /scroll/{scroll_id}
{
"Authorization" : {admin_token}
}
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
scroll_id | 整形 | 是 | 主键 scroll_id |
* 请求回调
{
"message": {
"scroll_id": 2,
"app_id": "3758749b-4a05-492f-b737-08d0c142e3dc",
"created_at": "2018-01-22T11:07:24.834000",
"updated_at": "2018-01-22T11:07:32.258000",
"scroll_picture": "http://img.zcool.cn/community/018d4e554967920000019ae9df1533.jpg@900w_1l_2o_100sh.jpg",
"scroll_order": 1,
"scroll_jump": "http://baidu.com"
},
"code": 0
}
POST /web/scroll
{
"Authorization" : {admin_token}
}
{
"scroll_picture": "http://img.zcool.cn/community/018d4e554967920000019ae9df1533.jpg@900w_1l_2o_100sh.jpg",
"scroll_order": 0,
"scroll_jump": "http://baidu.com"
}
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
scroll_picture | 字符串 | 是 | 图片url |
scroll_order | 整数 | 否 | 轮播顺序, 缺省为0 |
scroll_jump | 字符串 | 否 | 跳转地址 |
{
"message": {
"scroll_id": 2,
"app_id": "3758749b-4a05-492f-b737-08d0c142e3dc",
"created_at": "2018-01-22T11:07:24.834000",
"updated_at": "2018-01-22T11:07:24.834000",
"scroll_picture": "http://img.zcool.cn/community/018d4e554967920000019ae9df1533.jpg@900w_1l_2o_100sh.jpg",
"scroll_order": 0,
"scroll_jump": "http://baidu.com"
},
"code": 0
}
PUT /web/scroll/{scroll_id}
{
"Authorization" : {admin_token}
}
{
"scroll_picture": "http://img.zcool.cn/community/018d4e554967920000019ae9df1533.jpg@900w_1l_2o_100sh.jpg",
"scroll_order": 1,
"scroll_jump": "http://baidu.com"
}
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
scroll_picture | 字符串 | 否 | FAQ类型 |
scroll_order | 字符串 | 否 | FAQ标题 |
scroll_jump | 字符串 | 否 | FAQ描述 |
{
"message": {
"scroll_id": 2,
"app_id": "3758749b-4a05-492f-b737-08d0c142e3dc",
"created_at": "2018-01-22T11:07:24.834000",
"updated_at": "2018-01-22T11:31:59.757000",
"scroll_picture": "http://img.zcool.cn/community/018d4e554967920000019ae9df1533.jpg@900w_1l_2o_100sh.jpg",
"scroll_order": 1,
"scroll_jump": "http://baidu.com"
},
"code": 0
}
DELETE /web/scroll/{scroll_id}
{
"Authorization" : {admin_token}
}
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
scroll_id | 整型 | 是 | 主键 scroll_id |
{
"message": "success",
"code": 0
}