This commit is contained in:
2023-07-04 09:52:29 +08:00
parent 1f109d119c
commit ee8770e1fb
2 changed files with 15 additions and 5 deletions

View File

@ -4,6 +4,7 @@ import { saveAs } from "file-saver";
import { getToken } from "@/utils/auth";
import errorCode from "@/utils/errorCode";
import { blobValidate } from "@/utils/ruoyi";
import useUserStore from "@/store/modules/user";
const baseURL = import.meta.env.VITE_APP_BASE_API;
@ -19,7 +20,10 @@ export default {
method: "get",
url: url,
responseType: "blob",
headers: { Authorization: "Bearer " + getToken() },
headers: {
Authorization: "Bearer " + getToken(),
tenant: useUserStore().tenant,
},
}).then((res) => {
const isBlob = blobValidate(res.data);
if (isBlob) {
@ -39,7 +43,10 @@ export default {
method: "get",
url: url,
responseType: "blob",
headers: { Authorization: "Bearer " + getToken() },
headers: {
Authorization: "Bearer " + getToken(),
tenant: useUserStore().tenant,
},
}).then((res) => {
const isBlob = blobValidate(res.data);
if (isBlob) {
@ -56,7 +63,10 @@ export default {
method: "get",
url: url,
responseType: "blob",
headers: { Authorization: "Bearer " + getToken() },
headers: {
Authorization: "Bearer " + getToken(),
tenant: useUserStore().tenant,
},
}).then((res) => {
const isBlob = blobValidate(res.data);
if (isBlob) {

View File

@ -290,8 +290,8 @@ function handleQuery() {
/** 生成代码操作 */
function handleGenTable(row) {
proxy.$download.zip(
"/tool/gen/download/" + row.tableId,
row.tableName + ".zip"
"/tool/gen/download/" + row.tableId,
row.tableName + ".zip"
);
}
/** 同步数据库操作 */