点击邮箱名跳转到相对应的邮箱登陆页面
生活随笔
收集整理的這篇文章主要介紹了
点击邮箱名跳转到相对应的邮箱登陆页面
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
用戶注冊后點擊郵箱跳轉相應的郵箱登陸頁面
需求:激活鏈接已發送至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.com': 'http://mail.qq.com','gmail.com': 'http://mail.google.com','sina.com': 'http://mail.sina.com.cn',}//獲取注冊郵箱@后面的地址let _email=email.split("@")[1].toLowerCase()if(hash.hasOwnProperty(_email)){return hash[_email]}else{return false} }總結
以上是生活随笔為你收集整理的点击邮箱名跳转到相对应的邮箱登陆页面的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 临时邮箱
- 下一篇: 淘宝面试常见问题的答案来了,你看了吗?(