# Easysend_old1 **Repository Path**: huangliusong/Easysend_old1 ## Basic Information - **Project Name**: Easysend_old1 - **Description**: No description available - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2018-04-26 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 易送 > huangliusong@ ## Build Setup ``` bash # install dependencies 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 ``` ## 头header组件完成 ![](/preview/header.jpg) ## 安装stylus ~~~ npm install stylus --save 然后 npm install stylus stylus-loader --save 或者 npm install stylus npm install stylus-loader ~~~ ## 安装fastClick ~~~ npm install fastclick -S 之后,在main.js中引入,并绑定到body import FastClick from 'fastclick' FastClick.attach(document.body); ~~~ ## 安装swipper > npm install vue-awesome-swiper --save [安装swipper详细链接github](https://github.com/huangliusong/vue-awesome-swiper) ## 真机测试 ~~~ "scripts": { "dev": "webpack-dev-server --host 0.0.0.0 --inline --progress --config build/webpack.dev.conf.js", "start": "npm run dev", "unit": "jest --config test/unit/jest.conf.js --coverage", "e2e": "node test/e2e/runner.js", "test": "npm run unit && npm run e2e", "lint": "eslint --ext .js,.vue src test/unit test/e2e/specs", "build": "node build/build.js" }, ~~~ ## 通过ip地址获取坐标 ~~~ http://api.map.baidu.com/location/ip?ak=HlC73DdZNi2UgVNdW7H0ciaatWUHgxPL&ip=222.216.128.162&coor=bd09ll ~~~ ## 问题修复 ~~~ This dependency was not found: * !!vue-style-loader!css-loader?{"minimize":false,"sourceMap":false}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-1d57e5ea","scoped":false,"hasInlineConfig":false}!stylus-loader?{"sourceMap":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./a.vue in ./src/components/a.vue To install it, you can run: npm install --save !!vue-style-loader!css-loader?{"minimize":false,"sourceMap":false}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-1d57e5ea","scoped":false,"hasInlineConfig":false}!stylus-loader?{"sourceMap":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./a.vu ~~~ ### 问题修复 > npm install stylus-loader css-loader style-loader --save-dev > npm install sass-loader --save >npm install node-sass --save > 然后运行npm run start就可以 ## webpack项目提示Invalid Host header ~~~ 在项目的根目录的package.json文件中 "dev": "webpack-dev-server --content-base ./ --open --inline --hot--compress --history-api-fallback --config build/webpack.dev.config.js" 的 后面添加 --host 192.168.1.5(填你自己的ip地址)。 这样就能通过ip访问了,但是通过服务器域名访问时还是显示 Invalid Host header, 这是由于新版的webpack-dev-server出于安全考虑, 默认检查hostname,如果hostname 不是配置内的,将中断访问。 可以在build目录中的 webpack.base.config.js 中添加如下 webpack-dev-server 配置: devServer: { disableHostCheck: true, }, ~~~ ## pull ~~~ git pull 无法拉去项目 ~~~ ## localResizeIMG ~~~ https://github.com/think2011/localResizeIMG/wiki/1.-%E5%90%8E%E7%AB%AF%E5%A4%84%E7%90%86 ocalResizeIMG在调用时,就可以指定压缩后图片的宽度高度以及质量(详细参考文档),至于要怎么把数据提交到后台,可以参考该库的wiki中提到的方案,一切都很简单。 https://github.com/think2011/localResizeIMG/wiki/1.-%E5%90%8E%E7%AB%AF%E5%A4%84%E7%90%86 ~~~ ## axios安装 > npm install axios --save