接口地址:https://ss.dd.dd.d.cn:9006/thirdist/portalApi/biz-api/eemp/supervision/v1//getPeiCountData?batch=2¢=0
1、配置一(代理没起作用)
(1)设置baseURL为https://ss.dd.dd.d.cn:9006
(2)proxy为 ‘/api’:’ ’
(3)请求get(‘/api/thirdist/portalApi/…’)
2、配置二(代理没起作用)
(1)设置baseURL为 https://ss.dd.dd.d.cn:9006
(2)proxy为 ‘/api’:’ /api’
(3)请求get(‘/thirdist/portalApi/…’)
3、配置三(200)
(1)设置baseURL为 ‘/’
(2)proxy为 ‘/api’:’ ’
(3)请求get(‘/api/thirdist/portalApi/…’)
4、配置四(404)
(1)设置baseURL为 ‘/’
(2)proxy为 ‘/api’:’ /api’
(3)请求get(‘/api/thirdist/portalApi/…’)
5、配置五(200)
(1)设置baseURL为 ‘/’
(2)proxy为 ‘/posts’:’ /thirdist
(3)请求get('/thirdist/portalApi/…)
代理标识:‘/api/idaas/’
开发:http://localhost:3000/api/idaas/protocol/pagepageIndex
正式:http://90.34.56.12:8000/api/idaas/protocol/pagepageIndex
vue中proxy代理配置(测试一)
devServer.proxy不生效问题解决