Giter Club home page Giter Club logo

jd-shopping-mall-server's Introduction

JD-shopping-mall-server

一款高仿京东商城的安卓项目的后台系统,目前采用 typescript + node + egg(koa2) + typeORM

Api接口:

baseUrl : xxxx

  1. 注册:

method : post

url : /user/register

入参:
{
    "phone" : 17645168888,
    "password" : "qwe123"
}
出参:
{
    "code" : 0,
    "msg" : "success",
    "data" : {}
}

  1. 登录

method : post

url : /user/login

入参:
{
    "phone" : 17645168888,
    "password" : "qwe123"
}
出参:
{
    "code" : 0,
    "msg" : "success",
    "data" : {
      "userInfo" : {
          "img" : "xxx",
          "name" : "xxx",
          "token" : "xxx"
      }
    }
}

  1. 获取首页数据

method : get

url : /home/index

入参:
{

}
出参:
{
    "code" : 0,
    "msg" : "success",
    "data" : {
      "goods" : [
          {
             "id": 1,
             "name": "书1",
             "price": 100,
             "count": 199,
             "type": 1,
             "describe": "书"
          },
          {},
          {}    
      ]
    }
}

  1. 获取商品详情

method : get

url : ``/goods/details`

入参:

query: ?goodId=2

出参:
{
    "code": 0,
    "msg": "",
    "data": {
        "details": {
            "id": 2,
            "name": "书2",
            "price": 100,
            "count": 199,
            "type": 1,
            "describe": "书"
        }
    }
}

  1. 分类页面数据展示

method : get

url : /sort/index

入参:
{

}
出参:
{
    "code" : 0,
    "msg" : "success",
    "data" : {
      "goods" : [
          {
            "name" : "xxx",
            "price" : 100,
            "count" : 100,
            "describe" : "",
            "type" : 1
            },
          {},
          {}    
      ]
    }
}

  1. 购物车列表

method : get

url : /shopping/index

入参:
{

}

query : ?userId=1

出参:
{
    "code": 0,
    "msg": "",
    "data": {
        "goods": [
            {
                "id": 1,
                "userId": 1,
                "goodsId": 1,
                "count": 2,
                "goodsDetails": {
                    "id": 1,
                    "name": "书1",
                    "price": 100,
                    "count": 199,
                    "type": 1,
                    "describe": "书"
                }
            },
            {},
            {}
        ]
    }
}

  1. 加入购物车

method : post

url : /shopping/add

入参:
{
  "goods": [
    {
      "name" : "xxx",
      "price" : 100,
      "count" : 100,
      "describe" : "",
      "type" : 1 //1.添加 2.删除
    },
    {},
    {}    
  ]
}
出参:
{
    "code" : 0,
    "msg" : "success",
    "data" : {}
}

  1. 从购物车删除

method : post

url : /shopping/delete

入参:
{
  "id" : 12345
}
出参:
{
    "code" : 0,
    "msg" : "success",
    "data" : {}
}

  1. 结算购物车

method : post

url : /shopping/pay

入参:
{
    "id" : 1
}
出参:
{
    "code" : 0,
    "msg" : "success",
    "data" : {}
}

jd-shopping-mall-server's People

Contributors

linsir6 avatar

Stargazers

DY avatar JimiTiao avatar Dong H. Kim avatar  avatar 气泡水咕噜噜 avatar Augest avatar eran avatar jokun avatar GuoAn avatar 程序员蓝鲸 avatar yingjie avatar  avatar sunday2146 avatar  avatar Arthur Darkstone avatar hornhuang avatar 欧元 avatar 学医救不了队友 avatar Samuel Deng avatar null avatar jasonLaw1015 avatar bugfucker avatar Mapo avatar I anticipate. avatar  avatar

Watchers

James Cloos avatar  avatar  avatar I anticipate. 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.