Making the address

Front-end address: github.com/FZliweilian…

Server address: github.com/FZliweilian…

Runtime environment

CentOS 7.3
node 8.11.0
npm 5.6.0
MongoDB 3.2.7
Copy the code

The main function

Shopping cart bound mobile user login Add goods Recommended goods List coupons Address management Upload picture…

Interface list:

management

Name Method Default Description
/v1/admin/delUser get auto Delete user
/v1/admin/delItem get auto Delete the goods
/v1/admin/addItem post auto Add the goods
/v1/admin/addClass post auto Add the classification
/v1/admin/delClass get auto Delete the classification
/v1/admin/addClass post auto Add the classification
/v1/admin/addCoupon post auto Add coupons
/v1/admin/couponList get auto All coupons
/v1/admin/uploadBanner post auto Upload the banner

Home page

Name Method Default Description
/v1/home/bannerList get auto To get the banner
/v1/home/getHotList get auto Get a list of recommendations
/v1/home/getList get auto To obtain a list of
/v1/home/getItem get auto For more details

The order

Name Method Default Description
/v1/order/set post auto Create the order
/v1/order/get post auto Get order details
/v1/order/list get auto The order list
/v1/order/update post auto Update the order

WeChat

Name Method Default Description
/v1/wx/getUser get auto Obtain wechat user information

The user

Name Method Default Description
/v1/user/bindMobile post auto Bind mobile phone number
/v1/user/addCity post auto Add the address
/v1/user/editCity post auto Update address
/v1/user/defaultCity post auto Setting the Default address
/v1/user/cityList get auto Address list
/v1/user/getCoupon post auto Get a coupon
/v1/user/couponList get auto Get the benefits of owning

general

Name Method Default Description
/v1/public/getClassList get auto Get category list

The shopping cart

Name Method Default Description
/v1/order/addCart post auto Add to shopping cart
/v1/order/cartList get auto Shopping cart list
/v1/order/delIetm post auto Delete the goods
/v1/order/editCart post auto Edit shopping cart

Boot method

node app.js
Copy the code

instructions

1. It is the first time for me to use Node to do a complete project. If there is any unreasonable place, please leave a message or Issues and the author will fix it as soon as possible

2. This project is suitable for beginners or partners who are ready to learn Node by themselves. I also started writing node with zero foundation

3, if it is helpful to you, please give the author a “star” to give support