# myt_vue **Repository Path**: mcd_freeman/myt_vue ## Basic Information - **Project Name**: myt_vue - **Description**: 美业通微信端4.0改版,使用vue技术 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2019-06-14 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # mytty > A Vue.js project ## Build Setup ``` bash # install dependencies 安装npm依赖包 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 # run unit tests npm run unit # run e2e tests npm run e2e # run all tests npm test ``` For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). # Vue 2.0 # vue-cli webpack axios vuex router # 目录结构 ├── README.md 项目介绍 ├── index.html 入口页面 ├── build 构建脚本目录 │ ├── build-server.js 运行本地构建服务器,可以访问构建后的页面 │ ├── build.js 生产环境构建脚本 │ ├── dev-client.js 开发服务器热重载脚本,主要用来实现开发阶段的页面自动刷新 │ ├── dev-server.js 运行本地开发服务器 │ ├── utils.js 构建相关工具方法,设置通用less样式文件 │ ├── webpack.base.conf.js wabpack基础配置 │ ├── webpack.dev.conf.js wabpack开发环境配置 │ └── webpack.prod.conf.js wabpack生产环境配置 ├── config 项目配置 │ ├── dev.env.js 开发环境变量 │ ├── index.js 项目配置文件,编译后静态文件加载失败需定义build->assetsPublicPath: './', │ ├── prod.env.js 生产环境变量 | ├── proxyConfig.js 本地域名代理设置,解决开发环境的跨域问题(注:如果后端支持跨域就不用再设置该配置) │ └── test.env.js 测试环境变量 ├── package.json npm包配置文件,里面定义了项目的npm脚本,依赖包等信息 ├── src 源码目录 │ ├── main.js 入口js文件,配置全局变量等信息 │ ├── global.less 公用样式 │ ├── app.vue 根组件,每个项目仅有一个 │ ├── components 公共组件目录 │ │ └── noData.vue │ ├── assets 资源目录,这里的资源会被wabpack构建 │ │ └── images │ │ └── logo.png │ ├── api │ │ └── axios.js axios请求处理 │ │ └── *.js 各模块axios请求集合 │ ├── less 样式文件 │ ├── model 分模块存放组件 │ ├── router 前端路由 │ │ └── index.js │ │ └── *.js │ ├── store vuex应用级数据(state) │ │ └── index.js │ │ └── components │ │ └── *.js │ ├── utils 公用js │ │ └── area.js 三级联动地址选择 │ │ └── utils.js │ └── views 页面目录 │ ├── index │ │ └── index.vue ├── static 纯静态资源,不会被wabpack构建。 └── test 测试文件目录(unit&e2e) └── unit 单元测试 ├── index.js 入口脚本 ├── karma.conf.js karma配置文件 └── specs 单测case目录 └── Hello.spec.js # 环境安装 本项目依赖 node.js, 使用前先安装 node.js 和 cnpm(显著提升依赖包的下载速度)。 自行下载并安装 node.js: https://nodejs.org/en/download/ 然后安装 cnpm 命令: npm install -g cnpm --registry=https://registry.npm.taobao.org # UI框架 —— mint-ui npm install mint-ui -S # 接口请求 —— axios # 图片轮播 —— vue-awesome-swiper # html2canvas.js —— dom转图片 # qrcode.js —— 生成二维码