1、修改config/index.js

vue代理解决跨域问题

注:

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

相关文章:

  • 2022-01-14
  • 2021-05-18
  • 2021-12-03
  • 2021-12-11
  • 2021-11-06
猜你喜欢
  • 2022-12-23
  • 2020-05-19
  • 2021-06-02
  • 2021-04-03
  • 2021-06-30
  • 2021-08-31
  • 2021-09-17
相关资源
相似解决方案