| | |
| | | /* //POST传参序列化(添加请求拦截器) */ |
| | | Axios.interceptors.request.use( |
| | | config => { |
| | | console.log(9898); |
| | | console.log(config); |
| | | |
| | | |
| | | if ( |
| | | config.method === "post" && |
| | | sessionStorage.getItem('clusterId') || |
| | |
| | | config.data.clusterId = sessionStorage.getItem('clusterId') |
| | | config.data.devId = sessionStorage.getItem('devId') |
| | | } |
| | | |
| | | if(config.url === '/saas/api-s/camera/rule/getLinkRulesByCameraIds') { |
| | | config.data.devId = sessionStorage.getItem('cameraDevId') |
| | | } |
| | | |
| | | //后门 |
| | | if(config.url === '/saas/api-d/device/userClusterInfo') { |
| | | config.data.clusterId = '' |
| | | } |
| | | |
| | | if(config.url === '/saas/api-s/es/saveEsConfig') { |
| | | delete config.data.clusterId |
| | | delete config.data.devId |
| | | } |
| | | |
| | | } |
| | | |