Browse Source

当自动化代码报错时不下载

main
pixel 4 years ago
parent
commit
14b5d67dbd
  1. 2
      web/src/utils/request.js
  2. 3
      web/src/view/systemTools/autoCode/index.vue

2
web/src/utils/request.js

@ -73,7 +73,7 @@ service.interceptors.response.use(
if (response.data.data && response.data.data.reload) { if (response.data.data && response.data.data.reload) {
store.commit('user/LoginOut') store.commit('user/LoginOut')
} }
return response.data.msg
return response.data.msg ? response.data : response
} }
}, },
error => { error => {

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

@ -274,6 +274,9 @@ export default {
return false; return false;
} }
const data = await createTemp(this.form); const data = await createTemp(this.form);
if(data.headers?.success == "false"){
return
}
const blob = new Blob([data]); const blob = new Blob([data]);
const fileName = "ginvueadmin.zip"; const fileName = "ginvueadmin.zip";
if ("download" in document.createElement("a")) { if ("download" in document.createElement("a")) {

Loading…
Cancel
Save