用户登录

接口调用请求说明

http请求方式: POST(请使用https协议)
https://localhost:8080/项目命名/vue/userAction_login.action
参数 是否必须 参数说明
uname 用户名
pwd 用户密码

返回说明

正确时返回JSON数据包:

登录成功:

{
	code: 1
	msg: "登录成功"
	result: {
		uname: "zs",
	    pwd: "123"
	}

登录失败:

{
	code:0
	msg: "用户或者密码错误"
	result: {
		uname: "sa",
	    pwd: "sa"
	}

用户名和密码为空

{
	code:0
	msg: "用户或者密码为空"
	result: {
		uname: "",
	    pwd: ""
	}

树形菜单

接口调用请求说明

http请求方式: POST(请使用https协议)
http://localhost:8080/sshdemo/vue/treeNodeAction.action

返回说明

正确时返回JSON数据包:

{
	"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 状态 :0为失败  1为成功
msg 消息提示
result 查询树形菜单后返回的集合

查询文章

接口调用请求说明

http请求方式: POST(请使用https协议)
http://localhost:8080/sshdemo/vue/articleAction_list.action
参数 是否必须 参数说明
page 不必须 页数,默认为1
rows 不必须 行数,默认为10
title 不必须 根据文章标题查询用到

正确时返回JSON数据包

{
	"result":[{"id":1,"title":"vue教程","body":"vue是一个很牛逼的框架"],
	"pageBean":{
		"page":2,
		"rows":1,
		"total":0,
	}
}

result结果集

参数 说明
id 文章id
title 文章标题
body 文章内容

 

增加文章

接口调用请求说明

http请求方式: POST(请使用https协议)
http://localhost:8080/sshdemo/vue/articleAction_add.action
参数 是否必须 参数说明
id 不必须 文章id
title 不必须 文章标题
body 不必须 文章内容
     

正确时返回JSON数据包

{"msg":"新增成功","result":[],"code":1}

错误时返回JSON数据包

{"msg":"新增失败","result":[],"code":0}

参数 说明
code 状态码:0为失败,1为成功
msg 消息提示

修改文章


接口调用说明

http请求方式: POST(请使用https协议)
http://localhost:8080/sshdemo/vue/articleAction_edit.action
参数 是否必须 参数说明
id 必须 文章id
title 必须 文章标题
body 必须 文章内容

正确时返回JSON数据包

{"msg":"修改成功","code":1}

错误时返回JSON数据包

{"msg":"修改失败","code":0}

参数 说明
code 状态码:0为失败,1为成功
msg 消息提示

文章删除

接口调用请求说明

正确时返回JSON数据包

{"msg":"删除成功","code":1}

二,错误时返回JSON数据包

{"msg":"删除失败","code":0}
参数 说明
code 状态码:0为失败,1为成功
msg 消息提示

 

 

 

 

 

Logo

前往低代码交流专区

更多推荐