vue、nginx配置axios跨域
组件中发起跨域请求:this.$axios.get('/tengxun/location/v1/ip',{ params: { key: this.tengxunKey, ip : this.ip }}).then().catch()vue.config.js配置如下:module.exports = { devServer: { proxy: { '/tengxun': { target: 'https://apis.map.qq.com/
原创
2020-09-08 21:29:29 ·
1996 阅读 ·
0 评论