Giter VIP home page Giter VIP logo

vuemall's Introduction

学习项目----移动商城

从零开始搭建一个移动电商系统 包括首页展示,类别展示,购物功能,注册登录,积分系统,签到制作,查找页面,后台接口设置,权限管理。

技术栈包

Vue+Vuex+Router+Vant+Node+Koa2+Mongoose+MongoDB

运行方式

# open project
cd VueMall

# install dependencies
npm install

# run
 node run dev

更新记录

  1. 2018/05/16 开坑
  2. 2018/05/18 了解Vant, 页面布局
  3. 2018/05/21 easy-mock的模拟数据和axios数据访问

历程

1. 2018/05/16

开坑,动手这个项目, 搭建环境。 本项目是用 vue + koa2 开发所以我用的vue的脚手架Vue-cli。

2. 2018/05/18

安装Vant,了解Vant的基本操作。一下是注意事项:

  1. 在下载了Vant后,不建议全局,而使用 babel-plugin-import 安装。用那个模块装那个模块,这个会减少打包的大小,首页加载的时候会快一些。

  2. Vant中 swipe lazy 懒加载的bug 。在使用线上图片中网速过慢,图片默认高度太高导致页面错位,需要在外部的盒子中设置最大高度

ps:VScode中 Vue VSCode Snippets插件挺好用的

3. 2018/05/21

  1. easy-mock是比较好用的一个图形化的网站,我们完全可以使用他来模拟我们的Mock数据。 网址:https://www.easy-mock.com/

2.在created的声明周期里取得数据

created() {
    axios({
      url:"https://www.easy-mock.com/mock/5b022292676d1a45fe4e957b/VueMall/index",
      method: "get"
    })
      .then(req => {
        //请求成功后返回的参数
        console.log(req);
      })
      .catch(err => {
        //请求失败 报错
        console.log(err);
      });
  }

革命未成功 同志需努力

vuemall's People

Contributors

treey-yao avatar

Watchers

James Cloos 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.