From 4436c040d89980c8624f88cd4876c808806c414f Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期一, 28 八月 2023 19:52:46 +0800 Subject: [PATCH] 下发参数 弹框修改 2023-8-28 --- src/utils/request.js | 48 ++++++++++++++++++++++++------------------------ 1 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 779664d..84d73c6 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -38,20 +38,20 @@ return res.data ? res.data : {}; } else { if(!res.config.loadingFlag){ - // Message({ - // // message: res.data.msg==res.data.data?res.data.data:res.data.msg+','+res.data.data, - // message: res.data.msg, - // type: 'error', - // duration: 5 * 1000 - // }) - MessageBox.confirm( res.data.msg+"?", "鎻愮ず", { - confirmButtonText: "纭畾", - cancelButtonText: "鍙栨秷", - type: "warning", + Message({ + // message: res.data.msg==res.data.data?res.data.data:res.data.msg+','+res.data.data, + message: res.data.msg, + type: 'error', + duration: 5 * 1000 }) - .then(() => { - }) - .catch(() => {}); + // MessageBox.confirm( res.data.msg+"?", "鎻愮ず", { + // confirmButtonText: "纭畾", + // cancelButtonText: "鍙栨秷", + // type: "warning", + // }) + // .then(() => { + // }) + // .catch(() => {}); } return res.data ? res.data : {}; } @@ -65,18 +65,18 @@ } else if (message.includes('Request failed with status code')) { message = '绯荤粺鎺ュ彛' + message.substr(message.length - 3) + '寮傚父' } - // Message({ - // message: message, - // type: 'error', - // duration: 5 * 1000 - // }) - MessageBox.confirm( message+"?", "鎻愮ず", { - confirmButtonText: "纭畾", - cancelButtonText: "鍙栨秷", - type: "warning", + Message({ + message: message, + type: 'error', + duration: 5 * 1000 }) - .then(() => {}) - .catch(() => {}); + // MessageBox.confirm( message+"?", "鎻愮ず", { + // confirmButtonText: "纭畾", + // cancelButtonText: "鍙栨秷", + // type: "warning", + // }) + // .then(() => {}) + // .catch(() => {}); return Promise.reject(error) } ) -- Gitblit v1.8.0