Commit 242984fe authored by nick zheng's avatar nick zheng

fix: web端用户初始化默认信息

parent d50fcdd6
...@@ -3,7 +3,7 @@ import { ss } from '@/utils/storage' ...@@ -3,7 +3,7 @@ import { ss } from '@/utils/storage'
import { type UserState, type UserInfo, UserStoreStorageKeyEnum } from '../types/user' import { type UserState, type UserInfo, UserStoreStorageKeyEnum } from '../types/user'
import { fetchUserDetailInfo } from '@/apis/user' import { fetchUserDetailInfo } from '@/apis/user'
function createDefaultUserInfoFactory(): UserInfo { export function createDefaultUserInfoFactory(): UserInfo {
return { return {
memberId: null, memberId: null,
avatarUrl: '', avatarUrl: '',
......
...@@ -9,7 +9,7 @@ import FooterInput from './components/footer-input.vue' ...@@ -9,7 +9,7 @@ import FooterInput from './components/footer-input.vue'
import { fetchCreateContinueQuestions, fetchCreateDialogues, fetchGetApplicationInfo } from '@/apis/agent-application' import { fetchCreateContinueQuestions, fetchCreateDialogues, fetchGetApplicationInfo } from '@/apis/agent-application'
import { PersonalAppConfigState } from '@/store/types/personal-app-config' import { PersonalAppConfigState } from '@/store/types/personal-app-config'
import { defaultPersonalAppConfigState } from '@/store/modules/personal-app-config' import { defaultPersonalAppConfigState } from '@/store/modules/personal-app-config'
import { useUserStore } from '@/store/modules/user' import { createDefaultUserInfoFactory, useUserStore } from '@/store/modules/user'
import { useLayoutConfig } from '@/composables/useLayoutConfig' import { useLayoutConfig } from '@/composables/useLayoutConfig'
import { fetchGetMemberInfoById } from '@/apis/user' import { fetchGetMemberInfoById } from '@/apis/user'
import { UserInfo } from '@/store/types/user' import { UserInfo } from '@/store/types/user'
...@@ -25,12 +25,7 @@ const { isMobile } = useLayoutConfig() ...@@ -25,12 +25,7 @@ const { isMobile } = useLayoutConfig()
const fullScreenLoading = ref(false) const fullScreenLoading = ref(false)
const agentId = ref('') const agentId = ref('')
const dialogsId = ref('') const dialogsId = ref('')
const agentMemberInfo = ref<UserInfo>({ const agentMemberInfo = ref<UserInfo>(createDefaultUserInfoFactory())
avatarUrl: 'https://gsst-poe-sit.gz.bcebos.com/data/20240910/1725952917468.png',
memberId: null,
mobilePhone: '',
nickName: '---',
})
const agentApplicationConfig = ref<PersonalAppConfigState>(defaultPersonalAppConfigState()) const agentApplicationConfig = ref<PersonalAppConfigState>(defaultPersonalAppConfigState())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment