mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 06:02:38 +08:00
Merge branch 'cool-team-official:5.x' into 5.x
This commit is contained in:
commit
fddfac1beb
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "front-next",
|
||||
"version": "5.2.1",
|
||||
"version": "5.2.2",
|
||||
"scripts": {
|
||||
"dev": "vite --host",
|
||||
"build": "vite build",
|
||||
|
@ -103,6 +103,10 @@ axios.interceptors.response.use(
|
||||
|
||||
const { code, data, message } = res.data;
|
||||
|
||||
if (!code) {
|
||||
return res.data;
|
||||
}
|
||||
|
||||
switch (code) {
|
||||
case 1000:
|
||||
return data;
|
||||
|
@ -352,12 +352,10 @@ async function httpRequest(req: any, item?: any) {
|
||||
update();
|
||||
})
|
||||
.catch((err) => {
|
||||
if (mode == "local") {
|
||||
ElMessage.error(err.message);
|
||||
item.error = err.message;
|
||||
emit("error", item);
|
||||
reject(err);
|
||||
}
|
||||
ElMessage.error(err.message);
|
||||
item.error = err.message;
|
||||
emit("error", item);
|
||||
reject(err);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user