king
2025-04-13 b8eb5445560fda74a7cf15face387ee54cc830b4
src/api/index.js
@@ -61,6 +61,10 @@
    return Promise.reject(response.data)
  } else {
    if (response.data.ErrCode === 'E' && /死锁/.test(response.data.message)) {
      response.data.message = window.GLOB.dict['server_busy'] || '服务器繁忙,请稍后重试!'
      response.data.ErrMesg = response.data.message
    }
    if (response.config.requestId) {
      response.data.$requestId = response.config.requestId
    }
@@ -69,7 +73,15 @@
}, (error) => {
  let response = error.response || ''
  if (response && response.status) {
  if (!response) {
    notification.error({
      className: 'notification-custom-error',
      bottom: 0,
      message: error.message.includes('Network Error') && sessionStorage.getItem('lang') === 'zh-CN' ? '网络连接失败!' : error.message,
      placement: 'bottomRight',
      duration: 15
    })
  } else if (response && response.status) {
    notification.error({
      className: 'notification-custom-error',
      bottom: 0,
@@ -1028,6 +1040,14 @@
      param.data_md5 = param.data_md5 || ''
      param.time_limit = param.time_limit || 0
      param.data.forEach(item => {
        item.exps.forEach(cell => {
          if (typeof(cell.value) === 'number') {
            cell.value = cell.value + ''
          }
        })
      })
      param = this.encryptParam(param)
      return new Promise((resolve) => {