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