fix(XPack): 第一次登陆认证失效问题修复
This commit is contained in:
parent
37f4384321
commit
1dfbd16144
|
@ -47,7 +47,6 @@
|
||||||
<script>
|
<script>
|
||||||
import {checkoutCurrentOrganization, checkoutCurrentWorkspace} from "@/common/js/utils";
|
import {checkoutCurrentOrganization, checkoutCurrentWorkspace} from "@/common/js/utils";
|
||||||
import Setting from "@/business/components/settings/router";
|
import Setting from "@/business/components/settings/router";
|
||||||
import {LicenseKey} from '@/common/js/constants';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsSettingMenu",
|
name: "MsSettingMenu",
|
||||||
|
@ -74,51 +73,14 @@
|
||||||
organizations: getMenus('organization'),
|
organizations: getMenus('organization'),
|
||||||
workspaces: getMenus('workspace'),
|
workspaces: getMenus('workspace'),
|
||||||
persons: getMenus('person'),
|
persons: getMenus('person'),
|
||||||
isValid: valid,
|
|
||||||
isCurrentOrganizationAdmin: false,
|
isCurrentOrganizationAdmin: false,
|
||||||
isCurrentWorkspaceUser: false,
|
isCurrentWorkspaceUser: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.isValid === true) {
|
|
||||||
this.valid();
|
|
||||||
}
|
|
||||||
this.isCurrentOrganizationAdmin = checkoutCurrentOrganization();
|
this.isCurrentOrganizationAdmin = checkoutCurrentOrganization();
|
||||||
this.isCurrentWorkspaceUser = checkoutCurrentWorkspace();
|
this.isCurrentWorkspaceUser = checkoutCurrentWorkspace();
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
valid() {
|
|
||||||
let data = localStorage.getItem(LicenseKey);
|
|
||||||
if (data != undefined && data != null) {
|
|
||||||
data = JSON.parse(data);
|
|
||||||
}
|
|
||||||
if (data === undefined || data === null || data.status != "valid") {
|
|
||||||
this.systems.forEach(item => {
|
|
||||||
if (item.valid != undefined && item.valid === true) {
|
|
||||||
this.systems.splice(this.systems.indexOf(item), 1);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
this.organizations.forEach(item => {
|
|
||||||
if (item.valid != undefined && item.valid === true) {
|
|
||||||
this.organizations.splice(this.organizations.indexOf(item), 1);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
this.workspaces.forEach(item => {
|
|
||||||
if (item.valid != undefined && item.valid === true) {
|
|
||||||
this.workspaces.splice(this.workspaces.indexOf(item), 1);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
this.persons.forEach(item => {
|
|
||||||
if (item.valid != undefined && item.valid === true) {
|
|
||||||
this.persons.splice(this.persons.indexOf(item), 1);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue