# 移动端模板 **Repository Path**: webwlx/wap ## Basic Information - **Project Name**: 移动端模板 - **Description**: 移动端项目模板 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-01-03 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 该项目是移动端模板 ---- 配置了 ``` json "core-js": "^3.4.4", "lib-flexible": "^0.3.2", "postcss-px2rem": "^0.3.0", "qs.js": "^0.1.12", "vant": "^2.4.1", "vue": "^2.6.10", "vue-axios": "^2.1.5", "vue-router": "^3.1.3", "vuex": "^3.1.2" ``` 框架名称 | 使用文档 | 用处 -|-|- core-js | https://github.com/zloirock/core-js | 提供了es5、es6的polyfills lib-flexible | https://www.jianshu.com/p/6edffcd890e9 | 弹性布局方案 postcss-px2rem |https://blog.csdn.net/qq_40631679/article/details/103200912 | 可从像素单位生成rem单位。 qs.js | https://blog.csdn.net/qq_40631679/article/details/103818278 | 更好的处理url参数 vant | https://youzan.github.io/vant/#/zh-CN/home | 轻量、可靠的移动端 Vue 组件库 vue-axios | https://blog.csdn.net/qq_40631679/article/details/103818369| 将axios集成到Vue.js的小包装器 vuex | https://vuex.vuejs.org/zh/| 专为 Vue.js 应用程序开发的状态管理模式 ## 设置代理解决本地跨域问题 `vue.config.js` ``` js devServer: { // port: "8081",//代理端口 open: false, //项目启动时是否自动打开浏览器,我这里设置为false,不打开,true表示打开 proxy: { '/movie': { //代理api target: "https://douban.uieee.com/v2/movie", //服务器api地址 changeOrigin: true, //是否跨域 ws: true, // proxy websockets pathRewrite: { //重写路径 "^/movie": '' } } } }, ``` ``` js // px2rem基准 postcss: { // options here will be passed to postcss-loader plugins: [require('postcss-px2rem')({ remUnit: 37.5 })] } ```