diff --git a/src/layouts/components/navbar/components/right-side/index.vue b/src/layouts/components/navbar/components/right-side/index.vue
index c9f0ff5..f49942b 100644
--- a/src/layouts/components/navbar/components/right-side/index.vue
+++ b/src/layouts/components/navbar/components/right-side/index.vue
@@ -25,12 +25,12 @@
>
-
+
- {{ userInfo.mobile?.slice(-3) }}
+ {{ userData.mobile?.slice(-3) }}
-
+
@@ -184,7 +184,8 @@ const primary_enterprise = computed(() => userStore.userInfo?.primary_enterprise
const enterprises = computed(() => {
return userStore.userInfo?.enterprises ?? [];
});
-const userInfo = computed(() => userStore.userInfo);
+const userData = computed(() => userStore.userInfo ?? {});
+
const enterpriseInfo = computed(() => {
return enterpriseStore?.enterpriseInfo ?? {};
});
diff --git a/src/stores/modules/chat/index.ts b/src/stores/modules/chat/index.ts
index 47da668..a333c34 100644
--- a/src/stores/modules/chat/index.ts
+++ b/src/stores/modules/chat/index.ts
@@ -39,6 +39,7 @@ export const useChatStore = defineStore('chat', {
clearAgentInfo() {
this.agentInfo = {};
this.searchValue = '';
+ rlsWithCatch('agentInfo');
},
async onCreateSession() {
const { code, data } = await createSession();
diff --git a/src/stores/modules/enterprise/index.ts b/src/stores/modules/enterprise/index.ts
index 44b5477..ad6b53b 100644
--- a/src/stores/modules/enterprise/index.ts
+++ b/src/stores/modules/enterprise/index.ts
@@ -1,5 +1,5 @@
import { fetchEnterpriseInfo } from '@/api/all/login';
-import { glsWithCatch, slsWithCatch } from '@/utils/stroage';
+import { glsWithCatch, slsWithCatch, rlsWithCatch } from '@/utils/stroage';
interface EnterpriseInfo {
id: number | string;
@@ -34,7 +34,7 @@ export const useEnterpriseStore = defineStore('enterprise', {
},
clearUserEnterpriseInfo() {
this.enterpriseInfo = null;
- localStorage.removeItem('enterpriseInfo');
+ rlsWithCatch('enterpriseInfo');
},
setEnterpriseName(name: string) {
if (this.enterpriseInfo) {