| | |
| | | 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'; |
| | | /** |
| | |
| | | }, |
| | | }); |
| | | } |
| | | 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; |
| | | } |
| | | } |
| | | }, |
| | | }; |