前端拨打电话的几种方法(上班摸鱼好爽

时间:2020-08-11 11:51:49   收藏:0   阅读:215

1.直接a标签拨打电话

<a href="tel:110">点击拨打110</a>

2.也可以windows.href跳转

window.location.href = "tel://110"

3.uni-app框架里有封装好的方法
uni.makePhoneCall({phoneNumber: ‘110‘ }
 
4.reactNative中也有通用的接口来实现拨打电话的功能
  let phone = "110"
  Linking.canOpenURL(phone).then( res =>{
    if(res){
      return Linking.openURL(url);
    }
  }
啊啊啊啊啊摸鱼好爽
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!