1. 安装依赖
npm install flyio --save
2. 配置文件
main.js 全局配置
var Fly=require("flyio/dist/npm/wx")var fly=new Fly...//添加全局配置、拦截器等Vue.prototype.$http=fly //将fly实例挂载在原型上
3. 使用
src/index.vue
onLoad() {var url="http://yapi.demo.qunar.com/mock/34830/carts";this.$http.get(url).then(res =>{return this.products=res.data})},
