feat: 处理性别之外的问题信息

This commit is contained in:
huangze
2025-07-04 18:52:08 +08:00
parent 3378a621b2
commit 48a20bf7f6

View File

@@ -35,7 +35,8 @@ export default {
computed: {
title() {
if (!Number(this.type)) return "欢迎使用幸福人寿生态系统!"
return `亲爱的${this.name}${this.sex == 1 ? '女士' : '先生'}`
return `亲爱的${this.name}${Number(this.sex) === 1 ? '女士' :
Number(this.sex) === 0 ? '先生' : ''}`
}
},
methods: {
@@ -59,8 +60,8 @@ export default {
fetchUserInfo().then(res => {
const { content } = res.content
this.name = content.name
this.sex = content.sex
this.type = content.type
this.sex = Number(content.sex)
this.type = Number(content.type)
})
}
else Dialog({