Commit 97df7b02 authored by youjie's avatar youjie

no message

parent 86f65c4d
...@@ -73,6 +73,7 @@ export const useUserStore = defineStore('user', { ...@@ -73,6 +73,7 @@ export const useUserStore = defineStore('user', {
// 更新多个字段 // 更新多个字段
updateProfile(fields: Partial<typeof this.personalInfor>) { updateProfile(fields: Partial<typeof this.personalInfor>) {
this.personalInfor = { ...this.personalInfor, ...fields } this.personalInfor = { ...this.personalInfor, ...fields }
this.memberData.photo = fields.photo || this.memberData.photo
}, },
/** /**
* 设置email * 设置email
...@@ -88,12 +89,7 @@ export const useUserStore = defineStore('user', { ...@@ -88,12 +89,7 @@ export const useUserStore = defineStore('user', {
setPhoto(photo: string){ setPhoto(photo: string){
this.memberData.photo = photo this.memberData.photo = photo
}, },
setPersonalInfor(personalInfor: any){ /** 当前登录类型 */
this.personalInfor = {
...this.personalInfor,
...personalInfor,
}
},
setLoginType(loginType: number){ setLoginType(loginType: number){
this.loginType = loginType this.loginType = loginType
}, },
......
...@@ -139,7 +139,6 @@ const goPage = (path:string) => { ...@@ -139,7 +139,6 @@ const goPage = (path:string) => {
const getPersonalInfor = async () => { const getPersonalInfor = async () => {
const response = await UserService.memberCenterAsync(tenantId.value) const response = await UserService.memberCenterAsync(tenantId.value)
// userStore.setPersonalInfor(response)
userStore.updateProfile(response) userStore.updateProfile(response)
} }
getPersonalInfor() getPersonalInfor()
......
...@@ -232,7 +232,6 @@ const unBindWeChatAccount = async (type: number) => { ...@@ -232,7 +232,6 @@ const unBindWeChatAccount = async (type: number) => {
const getPersonalInfor = async () => { const getPersonalInfor = async () => {
const response = await UserService.memberCenterAsync(systemConfig.tenantId) const response = await UserService.memberCenterAsync(systemConfig.tenantId)
// userStore.setPersonalInfor(response)
userStore.updateProfile(response) userStore.updateProfile(response)
} }
// 获取微信绑定AppID 域名 重定向页面 // 获取微信绑定AppID 域名 重定向页面
......
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