From 007f2d1683d45fd9c8a6e7ecf133d95f093617d8 Mon Sep 17 00:00:00 2001 From: qx <1084500556@qq.com> Date: 星期四, 27 二月 2025 17:04:21 +0800 Subject: [PATCH] qx --- src/utils/request.js | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 06ed687..3a223a7 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -28,7 +28,6 @@ const isRepeatSubmit = (config.headers || {}).repeatSubmit === false if (getToken() && !isToken) { config.headers['Authorization'] = 'Bearer ' + getToken() - console.log(store) config.headers['hospId'] = Cookies.get("hospId"); } if (config.method === 'get' && config.params) { @@ -63,6 +62,12 @@ Promise.reject(error) }) +// 闇�瑕佺‘璁ゆ鐨勬帴鍙h矾寰� +const confirmDialogUrls = [ + '/hosp/order/addtTransition', + '/hosp/customer/cusIdcard' +]; + // 鍝嶅簲鎷︽埅鍣� service.interceptors.response.use(res => { const code = res.data.code || 200; @@ -88,17 +93,13 @@ } return Promise.reject('鏃犳晥鐨勪細璇濓紝鎴栬�呬細璇濆凡杩囨湡锛岃閲嶆柊鐧诲綍銆�') } else if (code === 500) { - if (res.config.url === '/hosp/order/addtTransition') { + if (confirmDialogUrls.includes(res.config.url)) { // 浣跨敤MessageBox鍜孧essage鏉ユ浛浠his.$confirm鍜宼his.$message - MessageBox.confirm(res.data.msg, '鎻愮ず', { + MessageBox.confirm(res.data.msg, { confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning', - center: true - }).then(() => { - - }).catch(() => { - + type: 'error', + showCancelButton: false, + closeOnClickModal: false }); return Promise.reject('鐗瑰畾鎺ュ彛鍙戠敓500閿欒'); } -- Gitblit v1.8.0