vue代理解决跨域问题

1、修改config/index.js

注:

  1. host配置0.0.0.0方便移动端预览,启动服务后可访问localhost:3000或者IP:3000
  2. 代理跨域使用vue-resource
  3. this.$http.get('/api/请求地址',    {参数})

猜你喜欢

转载自blog.csdn.net/lilongwei4321/article/details/81164032