vue-resource post get 请求后台接口报400(跨域问题解决方法)_this.$post('~/api/user/login?', form, (res) => {-CSDN博客

网站介绍:文章浏览阅读2.1k次。1.打开config/index.js,在proxyTable中添写如下代码proxyTable: { '/api': { //使用"/api"来代替"http://f.apiplus.c" target: 'http://f.apiplus.cn', //源地址 secure: false, // 如果是https接口,需要配置这个参..._this.$post('~/api/user/login?', form, (res) => {