feat: chat首页渲染优化
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { createSession } from '@/api/all/chat';
|
||||
import { createSession, getAgentInfo } from '@/api/all/chat';
|
||||
|
||||
import { handleUserHome } from '@/utils/user';
|
||||
|
||||
interface ChatState {
|
||||
@ -24,6 +25,12 @@ export const useChatStore = defineStore('chat', {
|
||||
clearSearchValue() {
|
||||
this.searchValue = '';
|
||||
},
|
||||
async getAgentInfo() {
|
||||
const { code, data } = await getAgentInfo();
|
||||
if (code === 200) {
|
||||
this.setAgentInfo(data);
|
||||
}
|
||||
},
|
||||
setAgentInfo(agentInfo: agentInfo) {
|
||||
this.agentInfo = agentInfo;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user