0
  • 最佳答案

    已解决,谢谢。


    modules: [
      '@nuxtjs/proxy'
    ],
    
    axios: {
      proxy: true,
      prefix: '/union/',
      credentials: true
    },
    
    proxy: {
      '/union/': {
        target: 'http://localhost:8081/',
        pathRewrite: {
          changeOrigin: true,
          '^/union/': ''
        }
      }
    },
    


    getActivitiesByProxy() {
      return request.requestGet('/union/activity/list');
    },
    


    1352296487031271424  评论     打赏       DesertSnow
    • 跨域问题哦,要不好好把视频看完吧。课程里都有讲到怎么解决的。

      1153952789488054272  评论     打赏       拉大锯
      • 断点-含光君  回复 @拉大锯
        一楼说的对
        断点-含光君 2021-01-27 10:39   回复 1139423796017500160
      • DesertSnow  回复 @拉大锯
        康师傅说的对,哈哈,解决了!
        DesertSnow 2021-01-27 11:02   回复 1352296487031271424
    相关问题
    deanhu · AOSP
    2024-04-25 21:53 2 10
    幻影~ · 提问
    2024-04-13 20:13 10 2
    幻影~ · 找工作
    2024-04-07 10:44 16 2
    幻影~ · 问题
    2024-03-31 17:20 7 2
    TONYGFX · AOSP
    2024-03-28 17:11 4 2