Giter Site home page Giter Site logo

yanceyofficial / taobao-shopping-cart Goto Github PK

View Code? Open in Web Editor NEW
34.0 1.0 10.0 2.5 MB

A shopping cart by Vue.js

Home Page: https://shopping-cart.yancey.app/

License: MIT License

JavaScript 2.88% HTML 78.66% Vue 10.62% SCSS 0.89% CSS 1.10% TypeScript 5.84%
shopping-cart-h5 vue

taobao-shopping-cart's Introduction

Vue 练手 仿手淘 H5 购物车

Screenshot

仿手淘H5购物车

Introduction

以前写的一个购物车的练习工程. 数据都是来自手淘的真实数据. 可访问线上链接体验.

Usage

### Project setup

yarn install

### Compiles and hot-reloads for development

yarn run serve

### Compiles and minifies for production

yarn run build

关于测试数据,可以进入src/assets/mock/data.js中修改,然后把 console 的数据复制到 public/data.json中即可。但是要保证storeIdskuId的唯一性。

Features

  • 展示购物车数量, 每个商铺的商品, 总价等

  • 点击左边的 radio 可以将商品加入到下单计算

  • 点击 + 或 - 可以增加或减少数量

  • 左滑展示删除按钮, 可以删除商品

  • 展示 sku picker

Tips

电商有两个概念,一个是 SPU(Standard Product Unit),另一个是 SKU(Stock Keeping Unit)。

其中 SPU 就是一个独立商品,比如 iPhone Xs,比如 MacBook Pro.

而 SKU 是一个独立商品的类型组合单元,拿 iPhone Xs 为例,假设这款手机有两种属性,分别 是颜色容量存储,假设有黑、白、金三种颜色,16G 和 64G两种容量存储,这意味着 iPhone Xs 有六种组合方式,这六种组合方式会有不同的价格,不同的货存量,变态点儿还有不同的促销方式

组件测试

使用 Cypress 进行组件测试.

cpress

License

Shopping-Cart-H5 is MIT licensed.

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.