Code Monkey home page Code Monkey logo

server's Introduction

后端接口业务相关说明

用户模块

  • 用户管理添加(/user/reg)
    • 0-> 超级管理员;1-> 普通管理员;超级管理员不允许随意注册;
    • 系统初始化时会默认创建一个 admin/admin 超级管理员账号;
  • 用户管理删除(/user/delete)
  • 用户管理修改(/user/update)
    • 用户头像修改时,物理删除原来的图片;
  • 单个用户信息查询(/user/info)
  • 所有用户列表查询(/user/list)

菜单模块

  • category � 菜单分类
    • 添加 (/category/add)
    • 删除(当前分类下没有菜单才可以删除)(/category/delete)
    • 修改(/category/update)
    • 查询 (/category/query)
  • menu 菜单
    • 添加 (必须关联菜单分类)(/menu/add)
    • 删除(/menu/delete)
    • 修改(/menu/update)
    • 查询(/menu/allList)
    • 根据cid查询(/menu/getListByCid)

API 返回数据说明

// 401  用户未登录
// 1  成功
// 0  业务处理错误
// -1 参数错误(缺少必填参数)
// -2 服务器错误

{
  "code": 1,
  "data": {
    "message": "欢迎进入xxx系统. 当前时间: Sun, 27 Jan 2019 07:25:23 GMT."
  },
  "msg": "请求成功"
}

接口文档更新

文档使用http://apidocjs.com/根据接口代码注释规范自动生成文档,生成、更新方式如下:

// 安装命令行工具
npm install apidoc -g

// 运行更新命令
npm run doc

// 生成完成后启动服务,访问 http://127.0.0.1:3030/apidoc/ 可查看文档
npm run dev

server's People

Contributors

xiaoqiang366 avatar

Stargazers

张海峰 avatar

Watchers

James Cloos avatar 张海峰 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.