1.index.html中添加如下代码: 

<meta name="format-detection" content="telephone=yes" />

2.在需要调起手机拨号功能的页面,写如下函数: 

// 调用拨号功能
callPhone (phoneNumber) {
    window.location.href = 'tel://' + phoneNumber
}

Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐