zoukankan      html  css  js  c++  java
  • 后台接口文档

    SPA项目后台接口文档

    用户登录

    接口调用请求说明

    http请求方式: POST(请使用https协议)
    https://xxx.xxx.xxx:8080/项目命名/vue/userAction_login.action

                         参数

    是否必须

    说明

    uname

    用户名

    pwd

    密码

    登录成功返回JSON数据包:

    {
        "msg":"登录成功",
        "result":{
            "uname":"用户名",
            "pwd":"密码"
        },
        "code":1
    }

    用户或者密码为空返回JSON数据包:

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

    用户或者密码错误返回JSON数据包:

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

    参数

    说明

    msg

    提示消息

    result

    返回登录时的用户名和密码

    code

    状态码 0:登录失败 1:登录成功

    用户注册

    接口调用请求说明

    http请求方式: POST(请使用https协议)
    https://xxx.xxx.xxx:8080/项目命名/vue/userAction_reg.action

    参数

    是否必须

    说明

    uname

    用户名

    pwd

    密码

    注册返回JSON数据包:

    {
        "msg":"用户注册成功",
        "code":1
    }

    用户注册失败返回JSON数据包:

    {
        "msg":"用户注册失败",
        "code":0
    }

    参数

    说明

    msg

    提示消息

    code

    状态码 0:失败 1:成功

    树形菜单

    接口调用请求说明

    http请求方式: GET(请使用https协议)
    https://xxx.xxx.xxx:8080/项目命名/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
    }

    参数

    说明

    msg

    消息提示

    result

    树形菜单结果集

    code

    请求状态码 1:成功 2:失败

    Result树形菜单结果集

    参数

    说明

    treeNodeId

    菜单id

    treeNodeName

    菜单名

    treeNodeType

    菜单类型 1:父菜单2:跳转菜单

    url

    路由地址

    icon

    菜单图标

    children

    子菜单集,如果没有则为一个空json数组

    CRUD

    文章查询

    接口调用请求说明

    http请求方式: GET(请使用https协议)
    https://xxx.xxx.xxx:8080/项目命名/vue/articleAction_list.action

    参数

    是否必须

    说明

    page

    当前页码,默认为1

    rows

    一页展示多少条数据,默认为10

    title

    按文章标题查询

    返回json数据包说明

    {
        "result":[{"id":1,"title":"文章标题","body":"文章内容"],
        "pageBean":{
            "page":1,
            "rows":10,
            "total":100,
        }
    }

    result结果集

    参数

    说明

    id

    文章id

    title

    文章标题

    body

    文章内容

    pageBean 分页对象说明

    参数

    说明

    page

    当前页码

    rows

    一页展示多少条数据

    total

    总共有多少条数据

    文章添加

    接口调用请求说明

    http请求方式: GET(请使用https协议)
    https://xxx.xxx.xxx:8080/项目命名/vue/articleAction_add.action

    参数

    是否必须

    说明

    title

    文章标题

    Body

    文章内容

    添加成功返回JSON数据包:

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

    添加失败返回JSON数据包:

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

    参数

    说明

    msg

    提示消息

    code

    状态码 0:失败 1:成功

    文章修改

    接口调用请求说明

    http请求方式: GET(请使用https协议)
    https://xxx.xxx.xxx:8080/项目命名/vue/articleAction_edit.action

    参数

    是否必须

    说明

    id

    文章id

    title

    文章标题

    body

    文章内容

    修改成功返回JSON数据包:

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

    修改失败返回JSON数据包:

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

    参数

    说明

    msg

    提示消息

    code

    状态码 0:失败 1:成功

    文章删除

    接口调用请求说明

    http请求方式: GET(请使用https协议)
    https://xxx.xxx.xxx:8080/项目命名/vue/articleAction_del.action

    参数

    是否必须

    说明

    id

    文章id


    删除成功返回JSON数据包:

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

    删除失败返回JSON数据包:

    {"msg":"删除失败","code":0}

    参数

    说明

    msg

    提示消息

    code

    状态码 0:失败 1:成功

  • 相关阅读:
    FTPClient使用中的问题--获取当前工作目录为null
    MGR安装
    脚本在Shell可以执行成功,放到crontab里执行失败
    使用Python通过SMTP发送邮件
    MySQL Router
    事务管理(ACID)
    mysqldump使用
    MySQL InnoDB Cluster
    Linux LVM逻辑卷配置过程详解(创建、扩展、缩减、删除、卸载、快照创建)
    centos命令行控制电脑发出滴滴声
  • 原文地址:https://www.cnblogs.com/liuwenwu9527/p/11360155.html
Copyright © 2011-2022 走看看