From 40377a90d7e7627e3fbdee9054f1cfa17f7d069f Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期四, 11 四月 2024 22:09:53 +0800
Subject: [PATCH] 组件维护页面
---
src/utils/request.js | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/utils/request.js b/src/utils/request.js
index d505ec7..3253bbf 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -1,5 +1,5 @@
import axios from 'axios';
-import { ElNotification, ElMessageBox } from 'element-plus';
+import { ElNotification, ElMessageBox, ElMessage } from 'element-plus';
import sysConfig from "@/config";
import tool from '@/utils/tool';
import router from '@/router';
@@ -130,7 +130,14 @@
}).then((response) => {
resolve(response.data);
}).catch((error) => {
- reject(error);
+ if(error.status == 400) {
+ ElMessage({
+ message: error.data.msg,
+ type: 'warning',
+ })
+ }else {
+ reject(error);
+ }
})
})
},
@@ -141,6 +148,7 @@
*/
postJ: function(url, data={}, config={}) {
return new Promise((resolve, reject) => {
+ console.log(qsStringify(data))
axios({
method: 'post',
url: url,
--
Gitblit v1.9.3