diff --git a/src/layout/components/userInfo.vue b/src/layout/components/userInfo.vue index d469c1bdc..373b731e2 100644 --- a/src/layout/components/userInfo.vue +++ b/src/layout/components/userInfo.vue @@ -183,7 +183,11 @@ export default { methods: { geTel(tel) { const reg = /^(\d{3})\d{4}(\d{4})$/; - return tel.replace(reg, '$1****$2'); + if (tel) { + return tel.replace(reg, '$1****$2'); + } else { + return ''; + } }, doShow() { this.visible = true;