安装 vscode 编辑器
一切都已经配置好,入手即用。
需要在vue.config.js配置自己当前ip`host: "192.168.1.240"`
一般我们在H5开发Ui页面,之后再使用watch-build在apicloud环境下联调app环境
`npm run watch-build` apicloud环境
`npm run serve` H5环境
- apiCloud (执行 npm run watch-build 生成的 apiCloud 项目)
- public (公共文件)
- img (公共图片,webpack 不处理,只 copy)
- js
- api.js (apiCloud 可有可无的 api.js)
- config.xml (apiCloud 至关重要的 config.xml)
- favicon.ico
- index.html (模板)
- manifest.json
- robots.txt
- src (配置主要结构)
- assets (资产文件,放置 css,js,font,img 等资源类文件)
- common (公用文件)
- js (包含:自适应 rem.js,全局方法 mixin.js,微信 wx_sdk.js)
- styles (包含:css 初始 base.css,全局样式 mixin.less)
- components (vue 组件)
- accompany (速配列表组件)
- navbar (顶部导航组件)
- operation (操作类组件,评论/点赞/转发/关注)
- order (订单组件)
- tabbar (底部导航组件)
- upload (上传组件,裁切上传,普通上传,视频上传)
- user (用户组件,年龄性别)
- gameList (游戏列表组件)
- icons (SVG图标)
- router (vue 路由)
- server
- api.js (api 接口文件)
- axios.js (axios 二次封装,全局拦截处理)
- envconfig.js
- store (vuex 状态管理)
- views (vue 页面)
- App.vue
- main.js
apicloud+vue 单页模式可三端同时开发: https://github.com/122177638/vue-apiCloud-model-mobile
vue (移动端) axios 拦截封装,px 转 rem,页面切换动画,vant 组件库,缓存配置: https://github.com/122177638/vue-model-mobile
vue (pc 端) axios 拦截封装,element 组件库,兼容 IE9,缓存配置: https://github.com/122177638/vue-model-pc
npm install
npm run server
Compile and hot reload for development and push to APicloud-loader environment WIFI mobile phone synchronization
npm run watch-build
npm run build
npm run test
npm run lint
npm run test:unit