ソースを参照

fix: listTenantForTargetTenant 取消targetTenantId的header

louhangfei 1 年間 前
コミット
9f00c9e081
2 ファイル変更2 行追加2 行削除
  1. 1 1
      src/api/tenant/index.ts
  2. 1 1
      src/layout/components/Header/SwitchTenant.vue

+ 1 - 1
src/api/tenant/index.ts

@@ -120,6 +120,6 @@ export function queryListTenant() {
       url: '/admin/tenant/listTenantForTargetTenant',
       method: 'post',
     },
-    { isShowErrorMessage: false, isShowMessage: false },
+    { isShowErrorMessage: false, isShowMessage: false, ignoreTargetTenantId: true },
   );
 }

+ 1 - 1
src/layout/components/Header/SwitchTenant.vue

@@ -50,7 +50,7 @@
 
   onMounted(() => {
     const routeTenantId = route.query.targetTenantId as string;
-    if (routeTenantId) {
+    if (routeTenantId && routeTenantId !== 'undefined') {
       const nextTenantId = Number(routeTenantId);
       currentTenant.value = nextTenantId;
       setValue(routeTenantId);