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 | 64 +++++++++++++++++++++++++++++++- 1 files changed, 62 insertions(+), 2 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 86a16f4..bf5de0a 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -61,6 +61,15 @@ return Promise.reject(response.data) } else { + 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 } @@ -69,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, @@ -309,6 +326,11 @@ // Type: 'X' 鏃� // param.Password = Utils.formatOptions(password) + // positecgroup + if (window.GLOB.appkey === '202011021844144334E823A3011414082AD77') { + param.svccode = 'oms' + } + let url = '/webapi/dologon' if (isCloud) { @@ -356,6 +378,36 @@ resolve({data: null, valid: false}) } }) + }) + } + + /** + * @description 鐧诲綍浜屾楠岃瘉 // positecgroup + */ + verifycode (verify) { + let param = { + certificate: 'certificate', + captcha: verify.code, + token: verify.token, + ati: verify.ati, + vid: verify.vid, + uid: verify.uid, + shopId: verify.shopId, + loginId: verify.loginId, + phone: verify.phone, + sellerNick: verify.sellerNick, + isRisk: verify.isRisk, + requestId: verify.requestId, + riskNum: verify.riskNum, + username: verify.username + } + + let url = '/webapi/dologon' + + return axios({ + url, + method: 'post', + data: param }) } @@ -738,7 +790,7 @@ } let url = '/webapi/dostars' - if (param.rduri && !window.GLOB.transfer) { + if (param.rduri && !window.GLOB.transfer) { // positecgroup url = param.rduri delete param.rduri } @@ -1028,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