wujingjing
2024-11-15 0bff85716afb0519ee0e8afea7ba3e0985be261c
src/stores/chatRoom.ts
@@ -1,7 +1,8 @@
import { computed, ref } from 'vue';
import { computed, nextTick, ref } from 'vue';
import { CreateHistoryGroup, getSectionList, getSelectSample, getUserTemplateList } from '../api/ai/chat';
import type { ChatRoomItem } from '../layout/component/sidebar/components/types';
import { router } from '../router';
import emitter from '../utils/mitt';
import { gotoRoute } from '../utils/route';
import { Local } from '../utils/storage';
/**
@@ -174,21 +175,23 @@
         },
      });
   }
   setTimeout(() => {
      emitter.emit('isShowHomePage', room.isInitial);
   }, 300);
};
// 用户信息
export const userInfo ={
   get:()=>{
export const userInfo = {
   get: () => {
      return Local.get('userInfo');
   },
   set:(val)=>{
      return Local.set('userInfo',val);
   set: (val) => {
      return Local.set('userInfo', val);
   },
   clear:()=>{
   clear: () => {
      Local.remove('userInfo');
   },
   get isNew(){
   get isNew() {
      return !!this.get()?.web_login;
   }
}
   },
};