Giter Site home page Giter Site logo

marstlbad / pdd-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fu-x/pdd-server

0.0 0.0 0.0 6.56 MB

pdd移动端商城项目开发-后端服务器 本项目是基于Vue.js+express+MySql的全栈项目

JavaScript 97.80% CSS 0.59% HTML 1.62%

pdd-server's Introduction

pdd移动端商城项目开发-后端服务器

本项目是基于Vue.js+express+MySQL的全栈项目

前端项目地址

项目演示地址 本项目为移动端项目,pc端演示请在开发者模式中调至移动设备模式

Build Setup

# 安装依赖
npm install

# 打开MySQL数据库相关服务
# 导入数据库`pdd`
# 启动服务器
npm start

项目构建

使用Express应用生成器

第三方模块

  1. express-session: 使用session存储登录用户ID判断用户是否已经登陆,以及存储图形验证码信息,判断用户提交验证码是否正确。
  2. body-parser: 获取用户POST提交的数据。
  3. mysql: 连接MySQL数据库。
  4. svg-captcha: 生成图形验证码。

配置接口

api 请求方式 参数 说明
/api/homecasual get 首页轮播图数据
/api/homenav get 首页导航数据
/api/homeshoplist get 首页商品列表数据
/api/searchgoods get 搜索分类列表数据
/api/recommendshoplist get 推荐商品列表数据
/api/captcha get 图形验证码数据
/api/usercode get phone 手机验证码数据
/api/logincode post phone, code 手机验证码登录
/api/loginpwd post username, password, captcha 账号密码登录
/api/islogin get 判断是否已经登录
/api/logout get 退出登陆
/api/alterinfo post id, name, sex, address, birthday, signature 更改个人信息
/api/addcart post goods_id, goods_name, thumb_url, price, number 添加商品到购物车
/api/cart get 获取购物车商品数据
/api/alertcart post {cartgoods} 修改购物车商品数据
/api/ post oldCipher, newCipher 修改密码

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.