Code Monkey home page Code Monkey logo

vue2-shop's Introduction

vue2-shop

A shop developed with Vue2 + Vue-router + Axios + Vuex + Node + Express + MongoDB + Webpack http://vue2shop.songfens.club/

Run Setup

注意:先启动MongoDB

# cd server
# npm i (商城服务端依赖安装)
# node bin/www (启动服务端)

# cd .. (切到项目根目录)
# npm i (Vue项目依赖安装)
# npm start (Vue商城启动)

## Build Setup

``` bash
# project init(项目初始化)
vue init webpack vue-shop

# install dependencies(安装依赖)
npm install

# serve with hot reload at localhost:8080(试运行)
npm run dev

# build for production with minification(项目构建)
npm run build

# build for production and view the bundle analyzer report(打包分析报告)
npm run build --report

For a detailed explanation on how things work, check out the guide and docs for vue-loader. more info, contact with [email protected]

全栈商城项目实战

Vue2商城需求分析及框架搭建,商品列表实现

商品列表模块实现的两种方式

商城后台框架搭建与商品列表滚动分页

业务功能开发(一)(分页查询及登录拦截)

业务功能开发(二)(购物车)

业务功能开发(三)(购物车及收货详情)

业务功能开发(四)(订单处理)

Vue项目打包优化及部署上线+课程总结

vue2-shop's People

Contributors

tianjiefe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vue2-shop's Issues

项目运行问题

你好 我想请问下 我按照你写的方式去启动项目,项目启动以后,我的数据库本地并没有新建数据库,但是会输出数据库连接成功,是我电脑问题吗,还是我操作出了问题?

Cart.vue页面 editCart方法

this.$store.commit("updateCartCount",flag=="add"?1:-1);
axios.post("/users/cartEdit",{
productId:item.productId,
productNum:item.productNum,
checked:item.checked
}).then((response)=>{
let res = response.data;
if(res.status=="0"){
if(flag == "add"){
this.$store.commit("updateCartCount",1);
}else if(flag == "minu"){
this.$store.commit("updateCartCount",-1);
}
}
})

`npm run start` 项目启动报错

  • 已经将 server 和 vue2-shop 中的 packages.json 都 install 完毕,并且 server 项目也连接数据库成功。

  • 启动 vue2-shop 时 npm run start 报了以下错误,看意思是说 *.vue 文件有问题,可是 down 下来之后就没动过那些代码,不明白具体怎么回事。

 ERROR  Failed to compile with 7 errors                                                                                                                                                                                          10:07:46


 error  in ./src/views/Cart.vue

Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin, refer to https://github.com/webpack/extract-text-webpack-plugin for the usage example
    at Object.pitch (D:\study\vue\vue2-shop\node_modules\extract-text-webpack-plugin\dist\loader.js:57:11)

 @ ./src/views/Cart.vue 2:2-385
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./src/views/Address.vue

Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin, refer to https://github.com/webpack/extract-text-webpack-plugin for the usage example
    at Object.pitch (D:\study\vue\vue2-shop\node_modules\extract-text-webpack-plugin\dist\loader.js:57:11)

// .....

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.