feat: 处理性别之外的问题信息
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user