From f3d4db769ba9b51b799d981511a710fd443d0e08 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 21 四月 2025 12:18:03 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/api/index.js | 29 +++++++++++++++++++++++++---- 1 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 3d22d39..bf5de0a 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -61,9 +61,14 @@ return Promise.reject(response.data) } else { - if (response.data.ErrCode === 'E' && /姝婚攣/.test(response.data.message)) { - response.data.message = '鏈嶅姟鍣ㄧ箒蹇欙紝璇风◢鍚庨噸璇曪紒' - response.data.ErrMesg = '鏈嶅姟鍣ㄧ箒蹇欙紝璇风◢鍚庨噸璇曪紒' + if (response.data.ErrCode === 'E') { + if (/姝婚攣/.test(response.data.message)) { + response.data.message = window.GLOB.dict['server_busy'] || '鏈嶅姟鍣ㄧ箒蹇欙紝璇风◢鍚庨噸璇曪紒' + response.data.ErrMesg = response.data.message + } else if (/鏃犳硶鎵撳紑鐧诲綍鎵�璇锋眰鐨勬暟鎹簱|鍦ㄤ笌\s*SQL\s+Server\s*寤虹珛杩炴帴鏃跺嚭鐜�/.test(response.data.message)) { + response.data.message = '鏈嶅姟鍣ㄩ摼鎺ヤ笉鍙敤锛岃鍏抽棴娴忚鍣ㄩ噸鏂版墦寮�锛�' + response.data.ErrMesg = response.data.message + } } if (response.config.requestId) { response.data.$requestId = response.config.requestId @@ -73,7 +78,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, @@ -1067,6 +1080,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) => { -- Gitblit v1.8.0