摘要: import axios from 'axios' export function request(config, success, failure) { const instance = axios.create({ baseURL: 'http://123.207.32.32:8000', ti 阅读全文
posted @ 2021-07-15 20:16 thomas_blog 阅读(71) 评论(0) 推荐(0) 编辑
摘要: request.js import axios from 'axios' export function request(config, success, failure) { const instance = axios.create({ baseURL: 'http://123.207.32.3 阅读全文
posted @ 2021-07-15 19:22 thomas_blog 阅读(39) 评论(0) 推荐(0) 编辑
摘要: const instance = axios.create({ baseURL: 'http://123.207.32.32:8000', timeout: 1000, }); instance({ method: 'get', url: '/home/data', params: { type: 阅读全文
posted @ 2021-07-15 18:48 thomas_blog 阅读(198) 评论(0) 推荐(0) 编辑
摘要: // 全局配置 axios.defaults.baseURL = 'http://123.207.32.32:8000' axios.defaults.timeout = 500 axios({ method: 'get', url: '/home/data', params: { type: 's 阅读全文
posted @ 2021-07-15 18:12 thomas_blog 阅读(134) 评论(0) 推荐(0) 编辑
摘要: axios.all([{ method: 'get', url: 'http://123.207.32.32:8000/home/data', params: { type: 'sell', page: 1 } }, { method: 'get', url: 'http://123.207.32. 阅读全文
posted @ 2021-07-15 17:34 thomas_blog 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 安装 cnpm install axios 使用 import axios from 'axios' axios({ method: 'get', url: 'http://123.207.32.32:8000/home/multidata' }).then(res => { console.log 阅读全文
posted @ 2021-07-15 16:58 thomas_blog 阅读(81) 评论(0) 推荐(0) 编辑