摘要: 1 createSwiper1() { 2 var option = { 3 // slidesPerView: 5, 4 slidesPerView: 3, 5 centeredSlides:true, 6 }; 7 if (this.state.newData.length > 2) { 8 o 阅读全文
posted @ 2019-01-21 15:02 Haoyin-杰克 阅读(1384) 评论(0) 推荐(0) 编辑
摘要: 我们引用的是axios 给src目录增加 api 文件夹 里面写上index.js 接口处理函数 这个函数每个项目都是不一样的,我现在调整的是适用于 https://cnodejs.org/api/v1 的接口,如果是其他接口 需要根据接口的参数进行调整。参考说明文档地址: https://cnod 阅读全文
posted @ 2019-01-21 14:49 Haoyin-杰克 阅读(4084) 评论(0) 推荐(0) 编辑
摘要: 一、main.js 1 import Vue from 'vue' 2 import App from './App' 3 import router from './router' 4 import Vuex from 'vuex' 5 import store from './store' 6 阅读全文
posted @ 2019-01-21 11:52 Haoyin-杰克 阅读(2337) 评论(0) 推荐(0) 编辑
摘要: 跨域post实例,用到了qs组件来避开ajax信使请求,并兼容Android。 1 import axios from 'axios'; 2 import qs from 'qs'; 3 4 axios.post('http://www.xyz.com/request', qs.stringify( 阅读全文
posted @ 2019-01-21 11:44 Haoyin-杰克 阅读(770) 评论(0) 推荐(0) 编辑