Giter VIP home page Giter VIP logo

v-shopping's Introduction

Vue-E-Business

基于Vue3的购物商城平台

技术栈

Vue3 + Pinia + Element Plus + Vite + axios

项目亮点

  1. 图片懒加载指令进行封装,通过调用该指令,延迟加载页面上的图片,避免了一次性加载所有图片的性能消耗,有效地减少了页面的初始加载时间,并提升了用户体验。
  2. 通用业务组件封装,优化了项目的代码复用性和开发效率,提高了代码的可维护性和可扩展性,减少了重复编写相似功能的代码——这些组件具有通用的功能和样式,并且可以在不同的业务场景中重复使用。
  3. 为了解决解决路由缓存问题,利用onBeforeRouteUpdate钩子函数,从而避免了重复的数据请求和组件渲染。
  4. 利用Pinia解决重复请求问题,采用Pinia的stateactions来管理请求数据,通过缓存机制不仅避免了不必要的网络请求,还确保了数据的同步和一致。
  5. 结合Pinia和pinia-plugin-persistedstate插件实现了数据持久化。通过插件使所有store的状态将自动保存到本地存储中。在页面重新加载时,pinia会从本地存储中恢复之前保存的状态,确保数据的持久性和一致性。

项目功能

  • 商品模块 —— 展示商品以及详细信息

  • 购物车模块 —— 展示当前所购买的产品信息(商品数量增减、加入清空商品)

  • 个人中心模块 —— 展示个人资料以及订单信息、用户

  • 结算支付模块

v-shopping's People

Contributors

moyunzero avatar

Watchers

 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.