admin管理员组

文章数量:1663441

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

需求:激活链接已发送至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
  }
}

本文标签: 邮箱相对应跳转到页面