用户登录
接口调用请求说明
http请求方式: GET(请使用https协议)
http://localhost:8080/Pro_ssh/user/user_login.action
请求参数
参数 | 说明 |
---|---|
uname | (必填) 用户名 |
upwd | (必填)用户密码 |
返回错误登录JSON包
{
code:0
msg: "用户或者密码错误"
result: {
uname: "sa",
pwd: "sa"
}
返回正确登录JSON包
{
code:1
msg: "登录成功"
result: {
uname: "zs",
pwd: "123"
}
返回的值
参数 | 说明 |
---|---|
code | 在此0 为登录失败 1为登录成功 |
msg | 为登录时返回的消息提示 |
树形菜单
http请求方式: POST(请使用https协议)
http://localhost:8080/sshdemo/vue/treeNodeAction.action
{
"msg": "操作成功",
"result": [
{
"treeNodeId": 1,
"treeNodeName": "系统管理",
"treeNodeType": 1,
"url": null,
"position": 1,
"icon": "el-icon-setting",
"children": [
{
"treeNodeId": 2,
"treeNodeName": "用户管理",
"treeNodeType": 2,
"url": "/sys/VuexPage1",
"position": 2,
"icon": "el-icon-user",
"children": []
},
{
"treeNodeId": 3,
"treeNodeName": "角色管理",
"treeNodeType": 2,
"url": "/sys/VuexPage2",
"position": 3,
"icon": "",
"children": []
},
{
"treeNodeId": 4,
"treeNodeName": "密码修改",
"treeNodeType": 2,
"url": null,
"position": 4,
"icon": null,
"children": []
}
]
},
{
"treeNodeId": 5,
"treeNodeName": "论坛管理",
"treeNodeType": 1,
"url": null,
"position": 5,
"icon": "el-icon-reading",
"children": [
{
"treeNodeId": 6,
"treeNodeName": "文章管理",
"treeNodeType": 2,
"url": "/sys/Articles",
"position": 6,
"icon": null,
"children": []
}
]
}
],
"code": 1
}
返回参数
参数 | 说明 |
---|---|
code | 1为成功 0则为失败 |
msg | 消息提示 |
result | 返回树形菜单的集合 |
文章查询
接口调用请求说明
http请求方式: GET(请使用https协议)
http://localhost:8080/Pro_ssh/user/user_login.action
请求参数
参数 | 说明 |
---|---|
title | (必填) 查所有和模糊查 |
page | (不 必填) 查询的页数 |
rows | (不 必填) 查询的行数 |
返回参数
参数 | 说明 |
---|---|
id | 文章id |
title | 文章标题 |
body | 文章内容 |
返回JSON包
{
title: '',
/* 携带分页的参数 */
page: 1,
rows: 10
},
增加文章
http请求方式: GET(请使用https协议)
http://localhost:8080/Pro_ssh/vue/articleAction_add.action
请求参数
参数 | 说明 |
---|---|
id | (不必须数据库自动增长)文章id |
title | (必须)文章标题 |
body | (必须)文章内容 |
返回正确登录JSON包
{"msg":"新增成功","result":[],"code":1}
返回错误登录JSON包
{"msg":"新增失败","result":[],"code":0}
返回字段
参数 | 说明 |
---|---|
msg | 1为增加成功 0则为失败 |
code | 文章内容 |
文章修改
http请求方式: GET(请使用https协议)
http://localhost:8080/Pro_ssh/vue/articleAction_edit.action
请求参数
id | 文章id (必填) |
---|---|
title | 文章标题(必填) |
body | 文章内容(必填) |
返回正确登录JSON包
{"msg":"修改成功","code":1}
返回正确错误包
{"msg":"修改失败","code":0}
返回字段
code | 1为修改成功 0则为失败 |
---|---|
msg | 消息提示 |
删除文章
http请求方式: GET(请使用https协议)
http://localhost:8080/Pro_ssh/vue/articleAction_del.action
请求参数
id | 文章id (必填) |
---|
返回正确删除JSON包
{"msg":"删除成功","code":1}
返回删除错误JSON包
{"msg":"删除失败","code":0}
返回字段
code | 1为删除成功 0则为失败 |
---|---|
msg | 消息提示 |