手机号中间隐藏为****
//电话加密
function geTel(phone) {
let NewPhone = phone.toString();
var reg = /^(\d{3})\d{4}(\d{4})$/;
return NewPhone.replace(reg, '$1****$2');
}
geTel(phone)
//电话加密
function geTel(phone) {
let NewPhone = phone.toString();
var reg = /^(\d{3})\d{4}(\d{4})$/;
return NewPhone.replace(reg, '$1****$2');
}
geTel(phone)