欢迎来到码农权的博客 MaNongGeGe.|

随笔分类 -  axios

封装axios
摘要:// 封装axios import axios from "axios"; const http = axios.create({ baseURL: "http://localhost:3006/api", timeout: 5000 }) // 请求拦截 http.interceptors.req
45
0
0
跨域解决方案
摘要:目前主流的跨域解决方案有两种 1. 后台解决(cors) 2. 前台解决(proxy) // 在 vue.config.js 中添加配置 devServer: { proxy: { '/api': { target: '<url>', changeOrigin: true } } } // 跨域配置
42
0
0
点击右上角即可分享
微信分享提示
深色
回顶
收起
  1. 1 不将就 码农权
  2. 2 Bleeding Love 码农权
  3. 3 想你念你 码农权
Bleeding Love - 码农权
00:00 / 00:00
An audio error has occurred, player will skip forward in 2 seconds.

Not available