js 隐藏邮箱中间几位

// 替换邮箱字符
    const regEmail = (email) => {
      if (String(email).indexOf('@') > 0) {
        let str = email.split('@'),
          _s = ''
        if (str[0].length > 3) {
          for (let i = 0; i < str[0].length - 3; i++) {
            _s += '*'
          }
        }
        var new_email = str[0].substr(0, 3) + _s + '@' + str[1]
      }
      return new_email
    }
上一篇:Golang邮件发送


下一篇:使用微擎出现APP正在维护,请到公众号中访问