ZZJ
2022-03-31 d4e6d812bf1e9fa55ea62745983f0b2a878ed8aa
src/scripts/httpRequest.ts
@@ -78,7 +78,10 @@
    //   window.sessionStorage.setItem('policeCameravideoIsLoginTimeout', JSON.stringify(true))
    // }
    return res.data ? res.data : {}
    /* //return res.data ? res.data : {}; */
  },
@@ -157,16 +160,23 @@
    } else {
      errJson.message = '连接服务器失败!'
      Notification({
        title: '',
        showClose: true,
        message: '连接服务器失败!',
        type: 'error'
      })
      // router.push({
      //   path: '/login'
      // });
    }
    console.log(error.response);
    if(error.response&&error.response.data&&!error.response.data.success ) {
      errJson.message =error.response.data.msg
    }
     Notification({
        title: '错误',
        showClose: true,
        message:errJson.message,
        type: 'error'
      })
    // 返回 response 里的错误信息
    return Promise.reject(errJson)
  }