export function convertName(name: string): string {
  let userName = ''
  if (!name) return userName
  if (name.length == 2) {
    userName = name.substring(0, 1) + '*' //截取name 字符串截取第一个字符，
  } else if (name.length == 3) {
    userName = name.substring(0, 1) + '*' + name.substring(2, 3) //截取第一个和第三个字符
  } else if (name.length > 3) {
    userName = name.substring(0, 1) + '*' + '*' + name.substring(3, name.length) //截取第一个和大于第4个字符
  }
  return userName
}

export function convertIds(number: string): string {
  if (!number) return ''
  return number.replace(/(\d{6})\d*(\d{2})/, '$1**********$2')
}
