手机号隐藏中间4位变成****

/**
 * 手机号隐藏中间4位变成****
 **/
export function phone(num) {
  num = "" + num;
  let tel1 =num.replace(num.substring(3,7), "****");
 return tel1;
}

猜你喜欢

转载自www.cnblogs.com/mxyr/p/10768116.html