微信小程序拨号功能,调起手机拨号!

发布于 4 年前作者 klai3112 次浏览最后编辑 4 年前来自 share

微信官方文档·:https://developers.weixin.qq.com/miniprogram/dev/api/device/phone/wx.makePhoneCall.html

方法也很简单,直接调用wx.makePhoneCall({}),如下图,phoneNumber就是电话号码,触发call方法后,会直接跳转到拨号页面,如下图:

call() { // 打电话
    let phone = "13123123123" // 仅为示例,并非真实的电话号码
	wx.makePhoneCall({
	  phoneNumber: phone  
	})
}



2 回复
mintao
mintao1 楼4 年前

社区大佬真多 我算是学到了

ychang
ychang2 楼3 个月前

受教👍👍