Skip to content

Commit 511a187

Browse files
author
pixel
committed
当自动化代码报错时不下载
1 parent 024f461 commit 511a187

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

web/src/utils/request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ service.interceptors.response.use(
7373
if (response.data.data && response.data.data.reload) {
7474
store.commit('user/LoginOut')
7575
}
76-
return response.data.msg
76+
return response.data.msg ? response.data : response
7777
}
7878
},
7979
error => {

web/src/view/systemTools/autoCode/index.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ export default {
274274
return false;
275275
}
276276
const data = await createTemp(this.form);
277+
if(data.headers?.success == "false"){
278+
return
279+
}
277280
const blob = new Blob([data]);
278281
const fileName = "ginvueadmin.zip";
279282
if ("download" in document.createElement("a")) {

0 commit comments

Comments
 (0)