Loading

07 2020 档案

摘要:A函数: axios的拦截器封装 1 import axios from 'axios' 2 import {Message} from 'element-ui' 3 import store from '@/store' 4 5 // 创建axios实例 6 const service = axi 阅读全文
posted @ 2020-07-03 23:14 wsongl 阅读(538) 评论(0) 推荐(0) 编辑
摘要:代码(fun.js): 1 // 原生的axios 2 // var axios = require('axios') 3 export function fun01(name1) { 4 return new Promise((resolve, reject) => { 5 axios.get(' 阅读全文
posted @ 2020-07-02 15:30 wsongl 阅读(263) 评论(0) 推荐(0) 编辑
摘要:解释:request是axios的拦截器封装 方式一(vue文件函数里具体代码): 1 async_method: async function () { 2 try { 3 // 异步操作同步化 4 let response = await request({url: '/api/cmdb/bus 阅读全文
posted @ 2020-07-02 13:38 wsongl 阅读(4026) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示