zouyu
2023-08-28 6003a771cd745347d7e864a3a2eb9e68d96fbef4
src/utils/request.js
@@ -48,6 +48,22 @@
    // if the custom code is not 20000, it is judged as an error.
    if (res.code !== 200) {
      if(res.code===400){
        Message({
        message: res.message,
        type: 'warning',
        duration: 5 * 1000
      })
      }
      if(res.code===401){
        Message({
        message: res.message,
        type: 'warning',
        duration: 5 * 1000
      })
      localStorage.removeItem("user")
      this.$router.push({ path: '/login' })
      }
      // Message({
      //   message: res.message || 'Error',
      //   type: 'error',