点击邮箱名跳转到相对应的邮箱登陆页面

编程入门 行业动态 更新时间:2024-10-11 13:19:17

用户注册后点击邮箱跳转相应的邮箱登陆页面

需求:激活链接已发送至xxx@xx.xxx,请在24小时内点击激活链接,当点击邮箱的时候跳转到相应的邮箱登陆页面

<p  @click="goToEmailAddress">{{email}}</p>
goToEmaulAddress(){
  let address =goToEmail(this.email)
  if(address){
    window.location.href=address
  }else{
    return
  }
}
//定义一个方法获取注册邮箱是属于哪个邮箱的
export function goToEmail(email){
  const hash = {
    'qq': 'http://mail.qq',
    'gmail': 'http://mail.google',
    'sina': 'http://mail.sina',
  }
  //获取注册邮箱@后面的地址
  let _email=email.split("@")[1].toLowerCase()
  if(hash.hasOwnProperty(_email)){
    return hash[_email]
  }else{
    return false
  }
}

更多推荐

点击邮箱名跳转到相对应的邮箱登陆页面

本文发布于:2023-06-11 03:38:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1379767.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:邮箱   相对应   跳转到   页面

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!