-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,11 +11,11 @@ | |
|
||
> vue2 + vue-router + vuex + cordova + nodejs 项目实战开发 | ||
> 所有的数据通过node request 获取的 | ||
> 所有的数据通过node request 获取的(后台代码详见backend目录) | ||
> 前后端分离的架构设计,配置webpack的反向代理实现前后端数据的通信. | ||
> 前后端分离的架构设计,配置webpack的反向代理实现前后端数据的通信.(前端代码详见haoshiqi目录) | ||
> 结合cordova api实现硬件访问功能,通过phonegap开发者预览工具进行测试 | ||
> 结合cordova api实现硬件访问功能,通过phonegap开发者预览工具进行测试(cordova工程详见hybirdApp目录) | ||
> 这个项目有两个输出产物,一个是单页面的webapp,一个是hybridapp | ||
|
@@ -27,3 +27,52 @@ | |
|
||
|
||
## 项目运行(nodejs 6.0+) | ||
``` bash | ||
# 1. git clone [email protected]:liupeijun/vue2-hybridapp-haoshiqi.git | ||
|
||
# 2. 进入backend 目录,安装依赖,启动node服务器 | ||
|
||
cd backend | ||
|
||
npm install | ||
|
||
npm start | ||
|
||
# 3. 进入haoshiqi目录,安装依赖,启动webpack dev server | ||
|
||
cd haoshiqi | ||
|
||
npm install | ||
|
||
npm run dev (开发环境) | ||
|
||
npm run build (发布环境,dist目录会生成在hybridApp\www 文件夹下,可以手动修改webpack.config.js) | ||
|
||
# 4. 如果要生成混合app,进入hybridApp目录,生成android,ios工程, 最后编译 | ||
|
||
cd hybridApp | ||
|
||
cordova platform add android (cordova platform add ios) | ||
|
||
cordova build android | ||
|
||
``` | ||
|
||
# 效果演示 | ||
![](https://github.com/liupeijun/vue2-hybridapp-haoshiqi/blob/master/screenshot/1.png) | ||
![](https://github.com/liupeijun/vue2-hybridapp-haoshiqi/blob/master/screenshot/2.png) | ||
![](https://github.com/liupeijun/vue2-hybridapp-haoshiqi/blob/master/screenshot/3.png) | ||
![](https://github.com/liupeijun/vue2-hybridapp-haoshiqi/blob/master/screenshot/4.png) | ||
|
||
# 待办事项 | ||
|
||
> 第三方登录 | ||
> 购物车支付 | ||
> 消息推送 | ||
## License | ||
|
||
[MIT](http://opensource.org/licenses/MIT) | ||
|
||
Copyright (c) 2016-present, Kerwin Liu |