手机号码格式校验
reg = /^(13[0-9]|14[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9])\d{8}$/
手机号加密
telEncrypt(val){ let phone = String(val) let reg = /(\d{3})\d{4}(\d{4})/ return phone.replace(reg, '$1****$2') }