Commit b8b6a933 authored by 罗超's avatar 罗超

修改用户头像和企业头像错误判断

parent 17743271
...@@ -69,10 +69,10 @@ export const useUserStore = defineStore('user', { ...@@ -69,10 +69,10 @@ export const useUserStore = defineStore('user', {
// d.iv = 0 // d.iv = 0
this.token = d.token this.token = d.token
this.userInfo = d.userinfo this.userInfo = d.userinfo
if(!this.userInfo.photo || !this.userInfo.photo.includes('http://')|| !this.userInfo.photo.includes('https://')){ if(!this.userInfo.photo || (!this.userInfo.photo.includes('http://')&& !this.userInfo.photo.includes('https://'))){
this.userInfo.photo = USER_DEFAULT_HEADER this.userInfo.photo = USER_DEFAULT_HEADER
} }
if(!this.userInfo.logo || !this.userInfo.logo.includes('http://')|| !this.userInfo.logo.includes('https://')){ if(!this.userInfo.logo || (!this.userInfo.logo.includes('http://')&& !this.userInfo.logo.includes('https://'))){
this.userInfo.logo = ENTERPRISE_DEFAULT_HEADER this.userInfo.logo = ENTERPRISE_DEFAULT_HEADER
} }
return { isSuccess:true, message:''} return { isSuccess:true, message:''}
...@@ -93,19 +93,19 @@ export const useUserStore = defineStore('user', { ...@@ -93,19 +93,19 @@ export const useUserStore = defineStore('user', {
setNewUserInfo(user:any){ setNewUserInfo(user:any){
this.token = user.token this.token = user.token
this.userInfo = user.userinfo this.userInfo = user.userinfo
if(!this.userInfo.photo || !this.userInfo.photo.includes('http://')|| !this.userInfo.photo.includes('https://')){ if(!this.userInfo.photo || (!this.userInfo.photo.includes('http://')&& !this.userInfo.photo.includes('https://'))){
this.userInfo.photo = USER_DEFAULT_HEADER this.userInfo.photo = USER_DEFAULT_HEADER
} }
if(!this.userInfo.logo || !this.userInfo.logo.includes('http://')|| !this.userInfo.logo.includes('https://')){ if(!this.userInfo.logo || (!this.userInfo.logo.includes('http://')&& !this.userInfo.logo.includes('https://'))){
this.userInfo.logo = ENTERPRISE_DEFAULT_HEADER this.userInfo.logo = ENTERPRISE_DEFAULT_HEADER
} }
}, },
setOnlyUserInfo(userinfo:any){ setOnlyUserInfo(userinfo:any){
this.userInfo = userinfo this.userInfo = userinfo
if(!this.userInfo.photo || !this.userInfo.photo.includes('http://')|| !this.userInfo.photo.includes('https://')){ if(!this.userInfo.photo || (!this.userInfo.photo.includes('http://')&& !this.userInfo.photo.includes('https://'))){
this.userInfo.photo = USER_DEFAULT_HEADER this.userInfo.photo = USER_DEFAULT_HEADER
} }
if(!this.userInfo.logo || !this.userInfo.logo.includes('http://')|| !this.userInfo.logo.includes('https://')){ if(!this.userInfo.logo || (!this.userInfo.logo.includes('http://')&& !this.userInfo.logo.includes('https://'))){
this.userInfo.logo = ENTERPRISE_DEFAULT_HEADER this.userInfo.logo = ENTERPRISE_DEFAULT_HEADER
} }
}, },
......
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