yubo
2026-04-06 6448ec15bfe0b65fb822a662105bceddc23b58d8
src/utils/request.js
@@ -7,8 +7,8 @@
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
// 请求超时时间,10s
const requestTimeOut = 10 * 1000
// 请求超时时间,4分钟
const requestTimeOut = 4 * 60 * 1000
const success = 200
// 更换令牌的时间区间
const checkRegion = 5 * 60 * 1000
@@ -84,10 +84,12 @@
        })
        break
      case 401:
        Message({
          message: '很抱歉,认证已失效,请重新登录',
          type: 'error',
          duration: messageDuration
        MessageBox.alert('很抱歉,认证已失效', '温馨提示', {
          confirmButtonText: '确定',
          showClose: false,
          callback: action => {
            router.push('/login')
          }
        })
        break
      default:
@@ -131,7 +133,8 @@
        return tansParams(params)
      }],
      headers: {
        'Authorization': authorizationValue
        'Authorization': authorizationValue,
        'Content-Type': 'application/x-www-form-urlencoded'
      }
    })
  },