1
admin
2026-03-09 1201bf91b3dcac3f5b69c755ff2e54c362956467
src/service/request.js
@@ -101,13 +101,13 @@
          logout()
          break
        case 404:
          showToast({ message: '接口未找到', type: 'fail', duration: 2000 })
          showToast({ message: i18n.global.t('apiNotFound'), type: 'fail', duration: 2000 })
          break
        case 415:
          showToast({ message: 'HTTP协议不匹配,请确认', type: 'fail', duration: 2000 })
          showToast({ message: i18n.global.t('httpMismatch'), type: 'fail', duration: 2000 })
          break
        case 428:
          showToast({ message: '验证码不合法', type: 'fail', duration: 2000 })
          showToast({ message: i18n.global.t('invalidVerifyCode'), type: 'fail', duration: 2000 })
          break
        // case 500:
        //   showToast({ message: '服务未启动', type: 'fail', duration: 2000 })
@@ -118,11 +118,11 @@
        default:
          // console.log(error)
          if (error.config.url != '/api/api/hobi!getRealtime.action') {
            showToast({ message: i18n.global.t(error.message) || '服务错误', type: 'fail', duration: 2000 })
            showToast({ message: i18n.global.t(error.message) || i18n.global.t('serviceError'), type: 'fail', duration: 2000 })
          }
      }
    } else {
      showToast({ message: i18n.global.t(error.message) || '服务错误', type: 'fail', duration: 2000 })
      showToast({ message: i18n.global.t(error.message) || i18n.global.t('serviceError'), type: 'fail', duration: 2000 })
    }
    return Promise.reject(error)