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