Vue2.0仿饿了么webapp单页面应用

Vue2.0仿饿了么webapp单页面应用


声明: 代码源于 黄轶老师在慕课网上的教学视频,我自己用vue2.0重写了该项目,喜欢的同学可以去支持老师的课程:http://coding.imooc.com/class/74.html


演示地址:https://colinscales.github.io/scale

演示.png


## 依赖工具:vue-cli   webpack   axios    vue-router    stylus    express     better-scroll


安装:

1、安装  node:http://nodejs.cn/download/ 

      安装  git:https://git-scm.com/downloads

2、从我的仓库克隆代码:

$ git clone https://github.com/ColinScales/shell

3、安装vue脚手架工具vue-cli:

$npm install vue-cli -g

4、进入代码根目录安装依赖:

$ npm install --save-dev

5、运行命令:

$ npm run dev

打开浏览器查看运行效果

6、发布代码:

$ npm run build

发布完代码后会生成dist目录,保存着项目的所有可运行的代码。

注意不能直接打开index.html运行,需要开启http server运行代码。 直接运行我写好的配置文件就可以运行代码:

$ node prod.server.js

打开浏览器输入localhost:4444看build后的运行效果。

猜你喜欢

转载自www.cnblogs.com/scale/p/9263851.html