0
点赞
收藏
分享

微信扫一扫

手机号隐藏

yundejia 2022-05-30 阅读 137


手机号:
{{ telShow ? changetel(userInfo.contactWay) : userInfo.contactWay }}
{{
telShow ? "显示" : "隐藏"
}}

changetel(tel) {
return getTel(tel);
},
//显示手机号
showTelClick(tel) {
console.log("tel", tel);
this.telShow = !this.telShow;
},

export function getTel(tel) {
let reg = /^(\d{3})\d{4}(\d{4})$/;
if (tel) {
return tel.replace(reg, "$1****$2")
} else {
return ""
}
}

import { formatDate, getTel } from "@/filters/index.js";

举报

相关推荐

0 条评论