ZZJ
2022-09-27 f2ef9272ed076bdca33d21b39bcc671e576553b3
src/scripts/httpRequest.ts
@@ -12,9 +12,6 @@
/* //POST传参序列化(添加请求拦截器) */
Axios.interceptors.request.use(
  (config) => {
    console.log(9898)
    console.log(config)
    if ((config.method === "post" && sessionStorage.getItem("clusterId")) || sessionStorage.getItem("devId")) {
      if (!config.data) {
        config.data = {}
@@ -26,6 +23,10 @@
      }
      if (config.url === "/saas/api-s/camera/rule/getLinkRulesByCameraIds") {
        config.data.devId = sessionStorage.getItem("cameraDevId")
      }
      if (config.url === "/saas/api-s/cameraTimerule/save") {
        config.data.devId = sessionStorage.getItem("cameraDevId")
      }
@@ -49,8 +50,7 @@
    return config
  },
  (error) => {
    console.log("请求错误")
    console.log(error)
    console.log("请求错误", error)
    /*  Message({
      showClose: true,
@@ -91,7 +91,6 @@
    var disposition = res.headers["content-disposition"]
    if (disposition) {
      var fileName = disposition.substring(disposition.indexOf("=") + 1)
      console.log(res)
      return {
        fileName: fileName,
@@ -104,8 +103,7 @@
    /* //return res.data ? res.data : {}; */
  },
  (error) => {
    console.log("响应错误")
    console.log(error)
    console.log("响应错误", error)
    let errJson: any = {
      success: false
    }